!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports","tslib"],e)}(function(e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var t=e("tslib");function o(){function e(e){e=Error.call(this,e),this.name=e.name,this.message=e.message,this.stack=e.stack}return e.prototype=Error.prototype,e}var i,n=(i=o(),t.__extends(s,i),s);function s(){return null!==i&&i.apply(this,arguments)||this}r.ActivityError=n;var a,e=(a=n,t.__extends(c,a),c);function c(){return null!==a&&a.apply(this,arguments)||this}(r.ActivityCancellationError=e).prototype.message="[WF: activity cancellation error] The activity was cancelled.",e.prototype.code="WF: activity cancellation error";var p,e=(p=n,t.__extends(d,p),d);function d(e,r){var t=p.call(this)||this;return t.code=e||"WF: activity error",t.message="["+t.code+"] "+(r||"Some errors occurred."),t}r.GenericActivityError=e;var l,e=(l=o(),t.__extends(u,l),u);function u(){return null!==l&&l.apply(this,arguments)||this}(r.ProgramStartError=e).prototype.code="WF: start error",e.prototype.message="[WF: start error] The given workflow program contains no start point and none was given in the options.";var v,e=(v=o(),t.__extends(m,v),m);function m(){return null!==v&&v.apply(this,arguments)||this}(r.UnspecifiedError=e).prototype.code="WF: unspecified error",e.prototype.message="[WF: unspecified error] The given workflow program completed with an unspecified error.";var y,e=(y=n,t.__extends(h,y),h);function h(e,r,t){var o=y.call(this)||this;return o.action=r,o.error=t,o}(r.ActivityBindingError=e).prototype.code="WF: binding error",e.prototype.message="[WF: binding error] The given workflow program contains some activities which are not valid.";var g,e=(g=o(),t.__extends(f,g),f);function f(e){var r=g.call(this)||this;return r.error=e,r}(r.EngineRuntimeError=e).prototype.code="WF: runtime error",e.prototype.message="[WF: runtime error] The workflow engine experienced an internal error.";var x,e=(x=o(),t.__extends(_,x),_);function _(e){var r=x.call(this)||this;return r.error=e,r}(r.ProgramParserError=e).prototype.code="WF: parser error",e.prototype.message="[WF: parsing error] The given workflow program could not be parsed.";var E,e=(E=n,t.__extends(F,E),F);function F(e,r,t,o){var i=E.call(this)||this;return i.activityId=e,i.inputName=r,i.expression=t,i.error=o,i.code="WF: expression evaluation error",i.message="["+i.code+"] The given expression could not be evaluated.",t&&(i.message+=' "'+t+'"'),o&&o.message&&(i.message+=" "+o.message),i}r.ExpressionEvaluationError=e;var W,e=(W=n,t.__extends(w,W),w);function w(e,r,t,o){var i=W.call(this)||this;return i.activityId=e,i.inputName=r,i.expression=t,i.error=o,i.code="WF: expression syntax error",i.message="["+i.code+"] The given expression could not be parsed.",t&&(i.message+=' "'+t+'"'),o&&o.message&&(i.message+=" "+o.message),i}r.ExpressionSyntaxError=e;var b,e=(b=n,t.__extends(T,b),T);function T(e,r,t,o){var i=b.call(this)||this;return i.activityId=e,i.accessorName=r,i.error=t,i.code="WF: expression accessor error",i.message="["+i.code+"] The requested accessor could not be resolved.",i.error=t,i.errors=o,i}r.ExpressionAccessorError=e;var A,e=(A=n,t.__extends(k,A),k);function k(e,r,t){var o=A.call(this)||this;return o.activityId=e,o.type=r,o.error=t,o.code="WF: activity activation error",o.message="["+o.code+"] The requested facility could not be activated.",o.error=t,o}r.ActivityActivationError=e;var I,e=(I=n,t.__extends(N,I),N);function N(e,r){var t=I.call(this)||this;return t.activityId=e,t.code="WF: aggregate error",t.message="["+t.code+"] The activity experienced multiple errors.",t.errors=r,t}r.AggregateActivityError=e;var q,e=(q=n,t.__extends(P,q),P);function P(e,r){var t=q.call(this)||this;return t.inputName=e,t.assertion=r,t}(r.ActivityInputError=e).prototype.code="WF: activity input error",e.prototype.message="[WF: activity input error] The activity has invalid inputs.";var j,t=(j=n,t.__extends(S,j),S);function S(e){var r=j.call(this)||this;return r.message="[WF: activity not implemented] The "+e+" activity has not been implemented.",r}(r.ActivityNotImplementedError=t).prototype.code="WF: activity not implemented"});