UNPKG

mmir-lib

Version:

MMIR (Mobile Multimodal Interaction and Relay) library

2 lines 40.5 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.scionCoreLib=e():t.scionCoreLib=e()}(self,(function(){return t={497:(t,e,n)=>{t.exports=n(824)},906:t=>{function e(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,c=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,s=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw s}}}}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function r(t){t=t||[],this.o=new Set(t)}r.prototype={add:function(t){this.o.add(t)},remove:function(t){return this.o.delete(t)},union:function(t){var n,r=e(t.o);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.o.add(i)}}catch(t){r.e(t)}finally{r.f()}return this},difference:function(t){var n,r=e(t.o);try{for(r.s();!(n=r.n()).done;){var i=n.value;this.o.delete(i)}}catch(t){r.e(t)}finally{r.f()}return this},contains:function(t){return this.o.has(t)},iter:function(){return Array.from(this.o)},isEmpty:function(){return!this.o.size},size:function(){return this.o.size},equals:function(t){if(this.o.size!==t.size())return!1;var n,r=e(this.o);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!t.contains(i))return!1}}catch(t){r.e(t)}finally{r.f()}return!0},toString:function(){return 0===this.o.size?"<empty>":Array.from(this.o).join(",\n")}},t.exports=r},834:t=>{t.exports={STATE_TYPES:{BASIC:0,COMPOSITE:1,PARALLEL:2,HISTORY:3,INITIAL:4,FINAL:5},SCXML_IOPROCESSOR_TYPE:"http://www.w3.org/TR/scxml/#SCXMLEventProcessor",HTTP_IOPROCESSOR_TYPE:"http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor",RX_TRAILING_WILDCARD:/\.\*$/}},866:(t,e,n)=>{function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(834),o=i.STATE_TYPES,s=i.RX_TRAILING_WILDCARD;function a(t,e){return(t=t.replace(s,""))===e||!(t.length>e.length)&&"."===e.charAt(t.length)&&0===e.indexOf(t)}function c(t,e){return t.events.some((function(t){return"*"===t||a(t,e)}))}function u(t,e){return t.depth>e.depth?-1:t.depth<e.depth||t.documentOrder<e.documentOrder?1:t.documentOrder>e.documentOrder?-1:0}t.exports={extend:function(t,e){return Object.keys(e).forEach((function(n){t[n]=e[n]})),t},transitionWithTargets:function(t){return t.targets},transitionComparator:function(t,e){return t.documentOrder-e.documentOrder},initializeModel:function(t,e){var n=[],i=new Map,s=0,a={};var c=[];function u(t){if(!t.initialRef)throw new Error("Unable to locate initial state for composite state: "+t.id)}var l=/\s+/;function f(t){var e="internal"===t.type&&t.source.typeEnum===o.COMPOSITE&&t.source.parent&&t.targets&&t.targets.every((function(e){return t.source.descendants.indexOf(e)>-1}));return t.targets?e?t.source:t.lcca:null}function p(t,n){for(var r=[],i=0,s=t.ancestors.length;i<s;i++){var a=t.ancestors[i];(e&&e.legacySemantics?a.typeEnum===o.COMPOSITE:a.typeEnum===o.COMPOSITE||a.typeEnum===o.PARALLEL)&&a.descendants.indexOf(n)>-1&&r.push(a)}if(!r.length)throw new Error("Could not find LCA for states.");return r[0]}!function t(e){if(e.id&&i.set(e.id,e),e.states)for(var n=0,r=e.states.length;n<r;n++)t(e.states[n])}(t);var h,d={$deserializeDatamodel:(h=t).$deserializeDatamodel||function(){},$serializeDatamodel:h.$serializeDatamodel||function(){return null},$idToStateMap:i,docUrl:h.docUrl,name:h.name,states:[{$type:"initial",transitions:[{target:h}]},h]};return function t(e,r){r.transitions&&n.push.apply(n,r.transitions),r.$type=r.$type||"state",r.ancestors=e,r.depth=e.length,r.parent=e[0],r.documentOrder=s++,r.transitions=r.transitions||[];for(var l=0,f=r.transitions.length;l<f;l++){var p=r.transitions[l];p.documentOrder=s++,p.source=r}if(r.states){var h=[r].concat(e);for(l=0,f=r.states.length;l<f;l++)t(h,r.states[l])}switch(r.$type){case"parallel":r.typeEnum=o.PARALLEL,r.isAtomic=!1;break;case"initial":r.typeEnum=o.INITIAL,r.isAtomic=!0;break;case"history":r.typeEnum=o.HISTORY,r.isAtomic=!0;break;case"final":r.typeEnum=o.FINAL,r.isAtomic=!0;break;case"state":case"scxml":r.states&&r.states.length?(r.typeEnum=o.COMPOSITE,r.isAtomic=!1):(r.typeEnum=o.BASIC,r.isAtomic=!0);break;default:throw new Error("Unknown state type: "+r.$type)}var d;if(r.states?r.descendants=r.states.concat(r.states.map((function(t){return t.descendants})).reduce((function(t,e){return t.concat(e)}),[])):r.descendants=[],r.typeEnum===o.COMPOSITE&&(Array.isArray(r.initial)||"string"==typeof r.initial?c.push(r):(d=r.states.filter((function(t){return"initial"===t.$type})),r.initialRef=[d.length?d[0]:r.states[0]],u(r))),r.typeEnum===o.COMPOSITE||r.typeEnum===o.PARALLEL){var y=r.states.filter((function(t){return"history"===t.$type}));r.historyRef=y}r.id||(r.id=function(t){void 0===a[t]&&(a[t]=0);do{var e="$generated-"+t+"-"+a[t]++}while(i.has(e));return e}(r.$type),i.set(r.id,r)),["onEntry","onExit"].forEach((function(t){r[t]&&(Array.isArray(r[t])||(r[t]=[r[t]]),r[t].every((function(t){return Array.isArray(t)}))||(r[t]=[r[t]]))})),r.invokes&&!Array.isArray(r.invokes)&&(r.invokes=[r.invokes],r.invokes.forEach((function(t){t.finalize&&!Array.isArray(t.finalize)&&(t.finalize=[t.finalize])})))}([],d),function(){for(var t=0,e=n.length;t<e;t++)if((s=n[t]).onTransition&&!Array.isArray(s.onTransition)&&(s.onTransition=[s.onTransition]),"string"==typeof s.event&&(s.events=s.event.trim().split(l)),delete s.event,!s.targets&&void 0!==s.target)if("string"==typeof s.target){var o=i.get(s.target);if(!o)throw new Error("Unable to find target state with id "+s.target);s.target=o,s.targets=[s.target]}else if(Array.isArray(s.target))s.targets=s.target.map((function(t){if("string"==typeof t){if(!(t=i.get(t)))throw new Error("Unable to find target state with id "+s.target);return t}return t}));else{if("object"!==r(s.target))throw new Error("Transition target has unknown type: "+s.target);s.targets=[s.target]}for(t=0,e=n.length;t<e;t++){var s;(s=n[t]).targets&&(s.lcca=p(s.source,s.targets[0])),s.scope=f(s)}}(),function(){for(var t=0,e=c.length;t<e;t++){var n=c[t],r=Array.isArray(n.initial)?n.initial:[n.initial];n.initialRef=r.map((function(t){return i.get(t)})),u(n)}}(),d},isEventPrefixMatch:a,isTransitionMatch:c,scxmlPrefixTransitionSelector:function(t,e,n,r){return(r?!t.events:t.events&&e&&e.name&&c(t,e.name))&&(!t.cond||n(t.cond))},eventlessTransitionSelector:function(t){return t.transitions.filter((function(t){return!t.events||t.events&&0===t.events.length}))},getTransitionWithHigherSourceChildPriority:function(t){var e=t[0],n=t[1];return u(e.source,n.source),e.source.depth<n.source.depth?n:n.source.depth<e.source.depth||e.documentOrder<n.documentOrder?e:n},sortInEntryOrder:function(t,e){return-1*u(t,e)},getStateWithHigherSourceChildPriority:u,initializeModelGeneratorFn:function(t,e,n){return t.call(n,e._x,e._x._sessionid,e._x._ioprocessors,n.isIn.bind(n))},deserializeSerializedConfiguration:function(t,e){return t.map((function(t){var n=e.get(t);if(!n)throw new Error("Error loading serialized configuration. Unable to locate state with id "+t);return n}))},deserializeHistory:function(t,e){var n={};return Object.keys(t).forEach((function(r){n[r]=t[r].map((function(t){var n=e.get(t);if(!n)throw new Error("Error loading serialized history. Unable to locate state with id "+t);return n}))})),n}}},667:(t,e,n)=>{var r=n(834),i={isDescendant:function(t,e){return e.descendants.indexOf(t)>-1},getAncestors:function(t,e){var n;return(n=t.ancestors.indexOf(e))>-1?t.ancestors.slice(0,n):t.ancestors},isOrthogonalTo:function(t,e){return!this.isAncestrallyRelatedTo(t,e)&&this.getLCA(t,e).typeEnum===r.STATE_TYPES.PARALLEL},isAncestrallyRelatedTo:function(t,e){return this.getAncestorsOrSelf(e).indexOf(t)>-1||this.getAncestorsOrSelf(t).indexOf(e)>-1},getAncestorsOrSelf:function(t,e){return[t].concat(i.getAncestors(t,e))},getDescendantsOrSelf:function(t){return[t].concat(t.descendants)},getLCA:function(t,e){return this.getAncestors(t).filter((function(t){return t.descendants.indexOf(e)>-1}),this)[0]}};t.exports=i},177:(t,e,n)=>{"use strict";function r(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=s(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function f(t,e,n){return e&&l(t.prototype,e),n&&l(t,n),t}function p(t,e){return(p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(t,e){return!e||"object"!==c(e)&&"function"!=typeof e?d(t):e}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var v=n(714).v,g=n(267),m=n(906),_=n(834),S=n(866),E=n(667),b=S.extend,x=S.transitionWithTargets,T=S.transitionComparator,w=S.initializeModel,A=(S.isEventPrefixMatch,S.isTransitionMatch,S.scxmlPrefixTransitionSelector),k=(S.eventlessTransitionSelector,S.getTransitionWithHigherSourceChildPriority),O=S.sortInEntryOrder,I=S.getStateWithHigherSourceChildPriority,C=S.initializeModelGeneratorFn,P=S.deserializeSerializedConfiguration,R=S.deserializeHistory,j=_.STATE_TYPES.BASIC,M=_.STATE_TYPES.COMPOSITE,z=_.STATE_TYPES.PARALLEL,B=_.STATE_TYPES.HISTORY,L=_.STATE_TYPES.INITIAL,D=_.STATE_TYPES.FINAL,F=_.SCXML_IOPROCESSOR_TYPE,$="undefined"!=typeof process&&!!process.env.DEBUG,U=function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&p(t,e)}(l,e);var n,s,a=(n=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=y(n);if(s){var r=y(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return h(this,t)});function l(e,n){var r;u(this,l),(r=a.call(this)).opts=n,r.opts.InterpreterScriptingContext=r.opts.InterpreterScriptingContext||N,r._isStepping=!1,r._scriptingContext=r.opts.interpreterScriptingContext||(r.opts.InterpreterScriptingContext?new r.opts.InterpreterScriptingContext(d(r)):{}),r.opts.generateSessionid=r.opts.generateSessionid||l.generateSessionid,r.opts.sessionid=r.opts.sessionid||r.opts.generateSessionid(),r.opts.sessionRegistry=r.opts.sessionRegistry||l.sessionRegistry,r.opts.invokerExecutionContext=n.invokerExecutionContext||e._executionContext;var i,o={};if(o[F]={location:"#_scxml_".concat(r.opts.sessionid)},o.scxml=o[F],r.opts._x={_sessionid:r.opts.sessionid,_ioprocessors:o},"function"==typeof e)i=C(e,r.opts,d(r));else{if("object"!==c(e))throw new Error("Unexpected model type. Expected model factory function, or scjson object.");i=JSON.parse(JSON.stringify(e))}return r._model=w(i,r.opts),r.opts.console=r.opts.console||("undefined"==typeof console?{log:function(){}}:console),r.opts.Set=r.opts.Set||m,r.opts.priorityComparisonFn=r.opts.priorityComparisonFn||k,r.opts.transitionSelector=r.opts.transitionSelector||A,r.opts.sessionRegistry.set(String(r.opts.sessionid),d(r)),r._scriptingContext.log=r._scriptingContext.log||function(){this.opts.console.log.apply?this.opts.console.log.apply(this.opts.console,arguments):this.opts.console.log(Array.prototype.slice.apply(arguments).join(","))}.bind(d(r)),r._externalEventQueue=[],r._internalEventQueue=[],r.opts.params&&r._model.$deserializeDatamodel(r.opts.params),r.opts.snapshot?(r._configuration=new r.opts.Set(P(r.opts.snapshot[0],r._model.$idToStateMap)),r._historyValue=R(r.opts.snapshot[1],r._model.$idToStateMap),r._isInFinalState=r.opts.snapshot[2],r._model.$deserializeDatamodel(r.opts.snapshot[3]),r._internalEventQueue=r.opts.snapshot[4]):(r._configuration=new r.opts.Set,r._historyValue={},r._isInFinalState=!1),l.EVENTS.forEach((function(t){this.on(t,this._log.bind(this,t))}),d(r)),t.exports.emit("new",d(r)),r}return f(l,[{key:"cancel",value:function(){delete this.opts.parentSession,this._isInFinalState||(this._isInFinalState=!0,this._log("session cancelled ".concat(this.opts.invokeid)),this._exitInterpreter(null))}},{key:"_exitInterpreter",value:function(t){var e=this;this._cancelAllDelayedSends();for(var n=this._getFullConfiguration().sort(I),r=0,i=n.length;r<i;r++){var o=n[r];if(void 0!==o.onExit)for(var s=0,a=o.onExit.length;s<a;s++)for(var c=o.onExit[s],u=0,l=c.length;u<l;u++){var f=c[u];try{f.call(this._scriptingContext,null)}catch(t){this._handleError(t,f);break}}o.invokes&&o.invokes.forEach((function(t){e._scriptingContext.cancelInvoke(t.id)})),"final"===o.$type&&"scxml"===o.parent.$type&&(this.opts.parentSession&&this._scriptingContext.send({target:"#_parent",name:"done.invoke."+this.opts.invokeid,data:o.donedata&&o.donedata.call(this._scriptingContext,t)}),this.opts.sessionRegistry.delete(this.opts.sessionid),this.emit("onExitInterpreter",t))}}},{key:"start",value:function(){return this._initStart(),this._performBigStep(),this.getConfiguration()}},{key:"startAsync",value:function(t){t=this._initStart(t),this.genAsync(null,t)}},{key:"_initStart",value:function(t){var e=this;return"function"!=typeof t&&(t=Y),this._log("performing initial big step"),this._model.initialRef.forEach((function(t){return e._configuration.add(t)})),t}},{key:"getConfiguration",value:function(){return this._configuration.iter().map((function(t){return t.id}))}},{key:"_getFullConfiguration",value:function(){return this._configuration.iter().map((function(t){return[t].concat(E.getAncestors(t))}),this).reduce((function(t,e){return t.concat(e)}),[]).reduce((function(t,e){return t.indexOf(e)>-1?t:t.concat(e)}),[])}},{key:"getFullConfiguration",value:function(){return this._getFullConfiguration().map((function(t){return t.id}))}},{key:"isIn",value:function(t){return this.getFullConfiguration().indexOf(t)>-1}},{key:"isFinal",value:function(){return this._isInFinalState}},{key:"_performBigStep",value:function(t){var e,n,r,i,s=o(this._startBigStep(t),4);for(r=s[0],i=s[1],n=s[2],e=s[3];n;){var a=o(this._selectTransitionsAndPerformSmallStep(e,i,r),2);e=a[0],n=a[1]}this._finishBigStep(e,i,r)}},{key:"_selectTransitionsAndPerformSmallStep",value:function(t,e,n){var r=this._selectTransitions(t,!0);if(r.isEmpty()){var i=this._internalEventQueue.shift();i&&(t=i,r=this._selectTransitions(t,!1))}if(!r.isEmpty()){var s,a;this.emit("onSmallStepBegin",t);var c=o(this._performSmallStep(t,r),2);s=c[0],a=c[1],s&&s.forEach((function(t){return n.add(t)})),a&&a.forEach((function(t){return e.add(t)})),this.emit("onSmallStepEnd",t)}return[t,!r.isEmpty()||this._internalEventQueue.length]}},{key:"_startBigStep",value:function(t){var e=this;this.emit("onBigStepBegin",t),this._configuration.iter().forEach((function(n){n.invokes&&n.invokes.forEach((function(n){n.autoforward&&e._scriptingContext.send({target:"#_".concat(n.id),name:t.name,data:t.data}),n.id===t.invokeid&&n.finalize&&n.finalize.forEach((function(n){return e._evaluateAction(t,n)}))}))})),t&&this._internalEventQueue.push(t);var n=new Set;return[new Set,n,!0,t]}},{key:"_finishBigStep",value:function(t,e,n,r){var o=this;Array.from(new Set(i(e).filter((function(t){return t.invokes&&!n.has(t)})))).sort(O).forEach((function(e){e.invokes.forEach((function(e){return o._evaluateAction(t,e)}))})),n.forEach((function(t){t.invokes&&t.invokes.forEach((function(t){o._scriptingContext.cancelInvoke(t.id)}))})),this._isInFinalState=this._configuration.iter().every((function(t){return t.typeEnum===D})),this._isInFinalState&&this._exitInterpreter(t),this.emit("onBigStepEnd",t),r&&r(void 0,this.getConfiguration())}},{key:"_cancelAllDelayedSends",value:function(){var t,e=r(this._scriptingContext._timeouts);try{for(e.s();!(t=e.n()).done;){var n=t.value;n.sendOptions.delay&&(this._log("cancelling delayed send",n),clearTimeout(n.timeoutHandle),this._scriptingContext._timeouts.delete(n))}}catch(t){e.e(t)}finally{e.f()}Object.keys(this._scriptingContext._timeoutMap).forEach((function(t){delete this._scriptingContext._timeoutMap[t]}),this)}},{key:"_performBigStepAsync",value:function(t,e){var n,r,i,s=o(this._startBigStep(t),4);r=s[0],i=s[1],s[2],n=s[3],function t(s){this.emit(s);var a=o(this._selectTransitionsAndPerformSmallStep(n,i,r),2);n=a[0],a[1]?(this.emit("onBigStepSuspend"),setImmediate(t.bind(this,"onBigStepResume"))):this._finishBigStep(n,i,r,e)}.call(this,"onBigStepBegin")}},{key:"_performSmallStep",value:function(t,e){var n,r;if(this._log("selecting transitions with currentEvent",t),this._log("selected transitions",e),!e.isEmpty()){var i=new this.opts.Set(e.iter().filter(x));n=this._exitStates(t,i),this._executeTransitions(t,e),r=this._enterStates(t,i),this._log("new configuration ",this._configuration)}return[n,r]}},{key:"_exitStates",value:function(t,e){var n,i=o(this._getStatesExited(e),2);i[0],n=i[1],this._log("exiting states");for(var s=0,a=n.length;s<a;s++){var c,u=n[s];if(u.isAtomic&&this._configuration.remove(u),this._log("exiting ",u.id),this.emit("onExit",u.id),void 0!==u.onExit)for(var l=0,f=u.onExit.length;l<f;l++)for(var p=u.onExit[l],h=0,d=p.length;h<d;h++){var y=p[h];try{y.call(this._scriptingContext,t)}catch(t){this._handleError(t,y);break}}if(u.historyRef){var v,g=r(u.historyRef);try{for(g.s();!(v=g.n()).done;){var m=v.value;c=m.isDeep?function(t){return t.typeEnum===j&&u.descendants.indexOf(t)>-1}:function(t){return t.parent===u},this._historyValue[m.id]=n.filter(c)}}catch(t){g.e(t)}finally{g.f()}}}return n}},{key:"_getStatesExited",value:function(t){for(var e=new this.opts.Set,n=new this.opts.Set,r=t.iter(),i=0,o=r.length;i<o;i++)for(var s=r[i].scope,a=s.descendants,c=this._configuration.iter(),u=0,l=c.length;u<l;u++){var f=c[u];if(a.indexOf(f)>-1){n.add(f),e.add(f);for(var p=E.getAncestors(f,s),h=0,d=p.length;h<d;h++)e.add(p[h])}}return[n,e.iter().sort(I)]}},{key:"_executeTransitions",value:function(t,e){var n=e.iter().sort(T);this._log("executing transitition actions");for(var r=0,i=n.length;r<i;r++){var o=n[r],s=o.targets&&o.targets.map((function(t){return t.id}));if(this.emit("onTransition",o.source.id,s,o.source.transitions.indexOf(o)),void 0!==o.onTransition)for(var a=0,c=o.onTransition.length;a<c;a++){var u=o.onTransition[a];try{u.call(this._scriptingContext,t)}catch(t){this._handleError(t,u);break}}}}},{key:"_enterStates",value:function(t,e){var n=this;this._log("entering states");var i=new Set,o=new Set,s={};this._computeEntrySet(e,i,o,s),i=Array.from(i).sort(O),this._log("statesEntered ",i);for(var a=0,c=i.length;a<c;a++){if((T=i[a]).isAtomic&&this._configuration.add(T),this._log("entering",T.id),this.emit("onEntry",T.id),void 0!==T.onEntry)for(var u=0,l=T.onEntry.length;u<l;u++)for(var f=T.onEntry[u],p=0,h=f.length;p<h;p++){var d=f[p];try{d.call(this._scriptingContext,t)}catch(t){this._handleError(t,d);break}}if(o.has(T)){var y,v=r(T.initialRef);try{for(v.s();!(y=v.n()).done;){var g=y.value;if(this.emit("onDefaultEntry",g.id),g.typeEnum===L){var m=g.transitions[0];if(void 0!==m.onTransition){this._log("executing initial transition content for initial state of parent state",T.id);for(var _=0,S=m.onTransition.length;_<S;_++){var E=m.onTransition[_];try{E.call(this._scriptingContext,t)}catch(t){this._handleError(t,E);break}}}}}}catch(t){v.e(t)}finally{v.f()}}if(s[T.id]){var b=s[T.id];if(void 0!==b.onTransition)for(this._log("executing history transition content for history state of parent state",T.id),_=0,S=b.onTransition.length;_<S;_++){var x=b.onTransition[_];try{x.call(this._scriptingContext,t)}catch(t){this._handleError(t,x);break}}}}for(a=0,c=i.length;a<c;a++){var T;if((T=i[a]).typeEnum===D){var w=T.parent,A=w.parent;this._internalEventQueue.push({name:"done.state."+w.id,data:T.donedata&&T.donedata.call(this._scriptingContext,t)}),A&&A.typeEnum===z&&A.states.every((function(t){return n.isInFinalState(t)}))&&this._internalEventQueue.push({name:"done.state."+A.id})}}return i}},{key:"_getEffectiveTargetStates",value:function(t){var e,n=new Set,o=r(t.targets);try{for(o.s();!(e=o.n()).done;){var s=e.value;s.typeEnum===B?s.id in this._historyValue?this._historyValue[s.id].forEach((function(t){return n.add(t)})):i(this._getEffectiveTargetStates(s.transitions[0])).forEach((function(t){return n.add(t)})):n.add(s)}}catch(t){o.e(t)}finally{o.f()}return n}},{key:"_computeEntrySet",value:function(t,e,n,i){var o,s=r(t.iter());try{for(s.s();!(o=s.n()).done;){var a,c=o.value,u=r(c.targets);try{for(u.s();!(a=u.n()).done;){var l=a.value;this._addDescendantStatesToEnter(l,e,n,i)}}catch(t){u.e(t)}finally{u.f()}var f,p=c.scope,h=r(this._getEffectiveTargetStates(c));try{for(h.s();!(f=h.n()).done;){var d=f.value;this._addAncestorStatesToEnter(d,p,e,n,i)}}catch(t){h.e(t)}finally{h.f()}}}catch(t){s.e(t)}finally{s.f()}}},{key:"_computeExitSet",value:function(t){var e,n=new Set,i=r(t);try{for(i.s();!(e=i.n()).done;){var o=e.value;if(o.targets){var s,a=o.scope,c=r(this._getFullConfiguration());try{for(c.s();!(s=c.n()).done;){var u=s.value;E.isDescendant(u,a)&&n.add(u)}}catch(t){c.e(t)}finally{c.f()}}}}catch(t){i.e(t)}finally{i.f()}return n}},{key:"_addAncestorStatesToEnter",value:function(t,e,n,o,s){var a,c=this,u=function(t){if(t.typeEnum===z){var e,a=r(t.states);try{var u=function(){var t=e.value;t.typeEnum===B||i(n).some((function(e){return E.isDescendant(e,t)}))||c._addDescendantStatesToEnter(t,n,o,s)};for(a.s();!(e=a.n()).done;)u()}catch(t){a.e(t)}finally{a.f()}}},l=r(E.getAncestors(t,e));try{for(l.s();!(a=l.n()).done;){var f=a.value;n.add(f),u(f)}}catch(t){l.e(t)}finally{l.f()}u(e)}},{key:"_addDescendantStatesToEnter",value:function(t,e,n,o){var s=this;if(t.typeEnum===B)if(this._historyValue[t.id]){var a,c=r(this._historyValue[t.id]);try{for(c.s();!(a=c.n()).done;){var u=a.value;this._addDescendantStatesToEnter(u,e,n,o)}}catch(t){c.e(t)}finally{c.f()}var l,f=r(this._historyValue[t.id]);try{for(f.s();!(l=f.n()).done;){var p=l.value;this._addAncestorStatesToEnter(p,t.parent,e,n,o)}}catch(t){f.e(t)}finally{f.f()}}else{o[t.parent.id]=t.transitions[0];var h,d=r(t.transitions[0].targets);try{for(d.s();!(h=d.n()).done;){var y=h.value;this._addDescendantStatesToEnter(y,e,n,o)}}catch(t){d.e(t)}finally{d.f()}var v,g=r(t.transitions[0].targets);try{for(g.s();!(v=g.n()).done;){var m=v.value;this._addAncestorStatesToEnter(m,t.parent,e,n,o)}}catch(t){g.e(t)}finally{g.f()}}else if(e.add(t),t.typeEnum===M){n.add(t);var _,S=r(t.initialRef);try{for(S.s();!(_=S.n()).done;){var b,x=_.value,T=r(x.typeEnum===L?x.transitions[0].targets:[x]);try{for(T.s();!(b=T.n()).done;){var w=b.value;this._addDescendantStatesToEnter(w,e,n,o)}}catch(t){T.e(t)}finally{T.f()}}}catch(t){S.e(t)}finally{S.f()}var A,k=r(t.initialRef);try{for(k.s();!(A=k.n()).done;){var O,I=A.value,C=r(I.typeEnum===L?I.transitions[0].targets:[I]);try{for(C.s();!(O=C.n()).done;){var P=O.value;this._addAncestorStatesToEnter(P,t,e,n,o)}}catch(t){C.e(t)}finally{C.f()}}}catch(t){k.e(t)}finally{k.f()}}else if(t.typeEnum===z){var R,j=r(t.states);try{var D=function(){var t=R.value;t.typeEnum===B||i(e).some((function(e){return E.isDescendant(e,t)}))||s._addDescendantStatesToEnter(t,e,n,o)};for(j.s();!(R=j.n()).done;)D()}catch(t){j.e(t)}finally{j.f()}}}},{key:"isInFinalState",value:function(t){var e=this;return t.typeEnum===M?t.states.some((function(t){return t.typeEnum===D&&e._configuration.contains(t)})):t.typeEnum===z&&t.states.every(this.isInFinalState.bind(this))}},{key:"_evaluateAction",value:function(t,e){try{return e.call(this._scriptingContext,t)}catch(t){this._handleError(t,e)}}},{key:"_handleError",value:function(t,e){var n=t instanceof Error||"string"==typeof t.__proto__.name&&t.__proto__.name.match(/^.*Error$/)?{name:"error.execution",data:{tagname:e.tagname,line:e.line,column:e.column,reason:t.message},type:"platform"}:t.name?t:{name:"error.execution",data:t,type:"platform"};this._internalEventQueue.push(n),this.emit("onError",n)}},{key:"_log",value:function(){if($){var t=Array.from(arguments);this.opts.console.log("".concat(t[0],": ").concat(t.slice(1).map((function(t){return null===t?"null":void 0===t?"undefined":"string"==typeof t?t:"[object Object]"===t.toString()?g.inspect(t):t.toString()})).join(", "),"\n"))}}},{key:"registerListener",value:function(t){l.EVENTS.forEach((function(e){t[e]&&this.on(e,t[e])}),this)}},{key:"unregisterListener",value:function(t){l.EVENTS.forEach((function(e){t[e]&&this.off(e,t[e])}),this)}},{key:"getAllTransitionEvents",value:function(){var t={};return function e(n){if(n.transitions)for(var r=0,i=n.transitions.length;r<i;r++)t[n.transitions[r].event]=!0;if(n.states)for(var o=0,s=n.states.length;o<s;o++)e(n.states[o])}(this._model),Object.keys(t)}},{key:"getSnapshot",value:function(){return[this.getConfiguration(),this._serializeHistory(),this._isInFinalState,this._model.$serializeDatamodel(),this._internalEventQueue.slice()]}},{key:"_serializeHistory",value:function(){var t={};return Object.keys(this._historyValue).forEach((function(e){t[e]=this._historyValue[e].map((function(t){return t.id}))}),this),t}},{key:"gen",value:function(t,e){var n;switch(c(t)){case"string":n={name:t,data:e};break;case"object":if("string"!=typeof t.name)throw new Error('Event object must have "name" property of type string.');n=t;break;default:throw new Error("First argument to gen must be a string or object.")}if(this._isStepping)throw new Error("Cannot call gen during a big-step");return this._isStepping=!0,this._performBigStep(n),this._isStepping=!1,this.getConfiguration()}},{key:"genAsync",value:function(t,e){if(null!==t&&("object"!==c(t)||!t||"string"!=typeof t.name))throw new Error("Expected currentEvent to be null or an Object with a name");"function"!=typeof e&&(e=Y),this._externalEventQueue.push([t,e]),this._isStepping||(this._isStepping=!0,function t(e,n){this._performBigStepAsync(e,function(e,r){n(e,r),this._externalEventQueue.length?t.apply(this,this._externalEventQueue.shift()):this._isStepping=!1}.bind(this))}.apply(this,this._externalEventQueue.shift()))}}]),l}(v);function Y(){}U.EVENTS=["onEntry","onExit","onTransition","onDefaultEntry","onError","onBigStepBegin","onBigStepSuspend","onBigStepResume","onSmallStepBegin","onSmallStepEnd","onBigStepEnd","onExitInterpreter"],U.sessionIdCounter=1,U.generateSessionid=function(){return U.sessionIdCounter++},U.sessionRegistry=new Map;var N=function(){function t(e){u(this,t),this._interpreter=e,this._timeoutMap={},this._invokeMap={},this._timeouts=new Set,this.validateUriRegex=/(#_.*)|\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i,this.invokeSendTargetRegex=/^#_(.*)$/,this.scxmlSendTargetRegex=/^#_scxml_(.*)$/}return f(t,[{key:"raise",value:function(t){this._installDefaultPropsOnEvent(t,!0),this._interpreter._internalEventQueue.push(t)}},{key:"parseXmlStringAsDOM",value:function(e){return(this._interpreter.opts.xmlParser||t.xmlParser).parse(e)}},{key:"invoke",value:function(e){var n=this;this._invokeMap[e.id]=new Promise((function(r,i){(n._interpreter.opts.invokers||t.invokers)[e.type](n._interpreter,e,n._interpreter.opts.invokerExecutionContext,(function(t,e){if(t)return i(t);n._interpreter.emit("onInvokedSessionInitialized",e),r(e)}))}))}},{key:"cancelInvoke",value:function(t){var e=this,n=this._invokeMap[t];this._interpreter._log("cancelling session with invokeid ".concat(t)),n&&(this._interpreter._log("sessionPromise found"),n.then((function(n){e._interpreter._log("resolved session ".concat(t,". cancelling... ")),n.cancel(),delete e._invokeMap[t]}),(function(t){})))}},{key:"_installDefaultPropsOnEvent",value:function(t,e){e||(t.origin=this._interpreter.opts._x._ioprocessors.scxml.location,t.origintype=t.type||F),void 0===t.type&&(t.type=e?"internal":"external"),["name","sendid","invokeid","data","origin","origintype"].forEach((function(e){void 0===t[e]&&(t[e]=void 0)}))}},{key:"send",value:function(t,e){this._interpreter._log("send event",t,e);var n,r=(e=e||{}).type||F;n="https://github.com/jbeard4/SCION#publish"===t.type?function(){this._interpreter.emit(t.name,t.data)}:this._interpreter.opts.customSend?this._interpreter.opts.customSend:function(t,e){var n,r=this;if("undefined"==typeof setTimeout)throw new Error("Default implementation of BaseInterpreter.prototype.send will not work unless setTimeout is defined globally.");if("#_internal"===t.target)this.raise(t);else if(this._installDefaultPropsOnEvent(t,!1),t.origintype=F,t.target)if("#_parent"===t.target){if(!this._interpreter.opts.parentSession)throw{name:"error.communication",data:"Parent session not specified",sendid:t.sendid,type:"platform"};t.invokeid=this._interpreter.opts.invokeid,a.call(this,this._interpreter.opts.parentSession)}else if(n=t.target.match(this.scxmlSendTargetRegex)){var i=n[1],o=this._interpreter.opts.sessionRegistry.get(i);if(!o)throw{name:"error.communication",sendid:t.sendid,type:"platform"};a.call(this,o)}else{if(!(n=t.target.match(this.invokeSendTargetRegex)))throw new Error("Unrecognized send target.");var s=n[1];this._invokeMap[s].then((function(t){a.call(r,t)}))}else a.call(this,this._interpreter);function a(n){var r=setTimeout(function(){t.sendid&&delete this._timeoutMap[t.sendid],this._timeouts.delete(i),this._interpreter.opts.doSend?this._interpreter.opts.doSend(n,t):n[this._interpreter.opts.sendAsync?"genAsync":"gen"](t)}.bind(this),e.delay||0),i={sendOptions:e,timeoutHandle:r};t.sendid&&(this._timeoutMap[t.sendid]=r),this._timeouts.add(i)}},e=e||{},this._interpreter._log("sending event",t.name,"with content",t.data,"after delay",e.delay),function(t,e,n){if(t.target&&!this.validateUriRegex.test(t.target))throw{name:"error.execution",data:"Target is not valid URI",sendid:t.sendid,type:"platform"};if(r!==F)throw{name:"error.execution",data:"Unsupported event processor type",sendid:t.sendid,type:"platform"};n.call(this,t,e)}.call(this,t,e,n)}},{key:"cancel",value:function(t){if(this._interpreter.opts.customCancel)return this._interpreter.opts.customCancel.apply(this,[t]);if("undefined"==typeof clearTimeout)throw new Error("Default implementation of BaseInterpreter.prototype.cancel will not work unless setTimeout is defined globally.");t in this._timeoutMap&&(this._interpreter._log("cancelling ",t," with timeout id ",this._timeoutMap[t]),clearTimeout(this._timeoutMap[t]))}}]),t}();t.exports=b(new v,{BaseInterpreter:U,ArraySet:m,STATE_TYPES:_.STATE_TYPES,initializeModel:w,InterpreterScriptingContext:N,helpers:S,query:E})},824:(t,e,n)=>{function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=s(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function s(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p=n(177),h=(p.helpers,p.query),d=p.helpers.transitionComparator,y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(p,t);var e,n,r,s,a=(r=p,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=f(r);if(s){var n=f(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return l(this,t)});function p(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p),(e=e||{}).legacySemantics=!1,a.call(this,t,e)}return e=p,(n=[{key:"_selectTransitions",value:function(t,e){var n,r=this.opts.transitionSelector,i=new this.opts.Set,s=this._evaluateAction.bind(this,t),a=o(this._configuration.iter().sort(d));try{for(a.s();!(n=a.n()).done;){var c,u=n.value,l=o([u].concat(h.getAncestors(u)));try{t:for(l.s();!(c=l.n()).done;){var f,p=o(c.value.transitions);try{for(p.s();!(f=p.n()).done;){var y=f.value;if(r(y,t,s,e)){i.add(y);break t}}}catch(t){p.e(t)}finally{p.f()}}}catch(t){l.e(t)}finally{l.f()}}}catch(t){a.e(t)}finally{a.f()}var v=this._removeConflictingTransition(i);return this._log("priorityEnabledTransitions",v),v}},{key:"_removeConflictingTransition",value:function(t){var e,n=this,r=new this.opts.Set,s=o(t.iter());try{for(s.s();!(e=s.n()).done;){var a,c=e.value,u=!1,l=new Set,f=o(r.iter());try{var p=function(){var t=a.value,e=n._computeExitSet([c]),r=n._computeExitSet([t]),o=i(e).some((function(t){return r.has(t)}))||i(r).some((function(t){return e.has(t)}));if(n._log("t1ExitSet",c.source.id,i(e).map((function(t){return t.id}))),n._log("t2ExitSet",t.source.id,i(r).map((function(t){return t.id}))),n._log("hasIntersection",o),o){if(!(t.source.descendants.indexOf(c.source)>-1))return u=!0,"break";l.add(t)}};for(f.s();!(a=f.n()).done&&"break"!==p(););}catch(t){f.e(t)}finally{f.f()}if(!u){var h,d=o(l);try{for(d.s();!(h=d.n()).done;){var y=h.value;r.remove(y)}}catch(t){d.e(t)}finally{d.f()}r.add(c)}}}catch(t){s.e(t)}finally{s.f()}return r}}])&&c(e.prototype,n),p}(p.BaseInterpreter);p.Statechart=y,p.InterpreterScriptingContext.invokers={"http://www.w3.org/TR/scxml/":function(t,e,n,r){if(!e.constructorFunction)throw new Error("Invoke object needs a constructorFunction property");var i,o=e.constructorFunction,s={invokeid:e.id,params:e.params,parentSession:t,docUrl:e.docUrl},a=n;s.parentSession instanceof y&&(i=new y(o,s)),r(null,i,o,a),setImmediate((function(){return i.start()}))}},p.InterpreterScriptingContext.invokers[void 0]=p.InterpreterScriptingContext.invokers.null=p.InterpreterScriptingContext.invokers.scxml=p.InterpreterScriptingContext.invokers["http://www.w3.org/TR/scxml/"],t.exports=p},714:t=>{function e(){this._listeners={}}e.prototype.on=function(t,e){return Array.isArray(this._listeners[t])||(this._listeners[t]=[]),-1===this._listeners[t].indexOf(e)&&this._listeners[t].push(e),this},e.prototype.once=function(t,e){var n=this;function r(){for(var i=[],o=0;o<arguments.length;o+=1)i[o]=arguments[o];n.off(t,r),e.apply(n,i)}return r.listener=e,this.on(t,r)},e.prototype.off=function(t,e){if(!Array.isArray(this._listeners[t]))return this;if(void 0===e)return this._listeners[t]=[],this;var n=this._listeners[t].indexOf(e);if(-1===n)for(var r=0;r<this._listeners[t].length;r+=1)if(this._listeners[t][r].listener===e){n=r;break}return this._listeners[t].splice(n,1),this},e.prototype.emit=function(t){if(!Array.isArray(this._listeners[t]))return this;for(var e=[],n=1;n<arguments.length;n+=1)e[n-1]=arguments[n];return this._listeners[t].forEach((function(t){t.apply(this,e)}),this),this},t.exports.v=e},267:(t,e)=>{function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.inspect=function(t,e){try{return JSON.stringify(t,(r="undefined"!=typeof WeakSet?new WeakSet:new Set,function(t,e){if("object"===n(e)&&null!==e){if(r.has(e))return"[Circular Reference]";r.add(e)}return e}),2)}catch(e){return""+t}var r}}},e={},function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}(497);var t,e})); //# sourceMappingURL=scion-core-lib.min.js.map