phaser3-rex-plugins
Version:
1 lines • 319 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).rexmarkedeventsheetsplugin=t();}(undefined,(function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(i=r.key,s=void 0,"symbol"==typeof(s=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return ("string"===t?String:Number)(e)}(i,"string"))?s:String(s)),r);}var i,s;}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t);}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e){var t=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(e){return !1}}();return function(){var n,r=s(e);if(t){var i=s(this).constructor;n=Reflect.construct(r,arguments,i);}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a(e)}(this,n)}}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=s(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},c.apply(this,arguments)}function l(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h(e,t)}(e)||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 h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function f(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype;}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}});})),n}var g={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1;}function s(e,t,r,s,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var a=new i(r,s||e,o),u=n?n+t:t;return e._events[u]?e._events[u].fn?e._events[u]=[e._events[u],a]:e._events[u].push(a):(e._events[u]=a,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t];}function a(){this._events=new r,this._eventsCount=0;}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),a.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},a.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return [];if(r.fn)return [r.fn];for(var i=0,s=r.length,o=new Array(s);i<s;i++)o[i]=r[i].fn;return o},a.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},a.prototype.emit=function(e,t,r,i,s,o){var a=n?n+e:e;if(!this._events[a])return !1;var u,c,l=this._events[a],h=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),h){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,i),!0;case 5:return l.fn.call(l.context,t,r,i,s),!0;case 6:return l.fn.call(l.context,t,r,i,s,o),!0}for(c=1,u=new Array(h-1);c<h;c++)u[c-1]=arguments[c];l.fn.apply(l.context,u);}else {var p,f=l.length;for(c=0;c<f;c++)switch(l[c].once&&this.removeListener(e,l[c].fn,void 0,!0),h){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,t);break;case 3:l[c].fn.call(l[c].context,t,r);break;case 4:l[c].fn.call(l[c].context,t,r,i);break;default:if(!u)for(p=1,u=new Array(h-1);p<h;p++)u[p-1]=arguments[p];l[c].fn.apply(l[c].context,u);}}return !0},a.prototype.on=function(e,t,n){return s(this,e,t,n,!1)},a.prototype.once=function(e,t,n){return s(this,e,t,n,!0)},a.prototype.removeListener=function(e,t,r,i){var s=n?n+e:e;if(!this._events[s])return this;if(!t)return o(this,s),this;var a=this._events[s];if(a.fn)a.fn!==t||i&&!a.once||r&&a.context!==r||o(this,s);else {for(var u=0,c=[],l=a.length;u<l;u++)(a[u].fn!==t||i&&!a[u].once||r&&a[u].context!==r)&&c.push(a[u]);c.length?this._events[s]=1===c.length?c[0]:c:o(this,s);}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a;}(g);var v=function(e){i(s,e);var n=u(s);function s(){return t(this,s),n.apply(this,arguments)}return r(s,[{key:"shutdown",value:function(){this.removeAllListeners();}},{key:"destroy",value:function(){this.removeAllListeners();}}]),s}(f(g.exports)),m="tree",y="composite",k="decorator",b="action",D="$state",_="$currentTime",E=window.crypto&&window.crypto.randomUUID,w=null,x="#",C=function(e){void 0===e&&(e=null),w=e;},S=function(){return w},A=function(){return null===w?E?window.crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return ("x"===e?t:3&t|8).toString(16)})):(w+=1,"".concat(x).concat(w))},M=function(e,t,n){for(var r=[e];r.length>0;){var i=r.shift();if(!t.call(n,i))switch(i.category){case y:r.push.apply(r,l(i.children)),(s=i.services)&&r.push.apply(r,l(s));break;case k:r.push(i.child);break;case b:var s;(s=i.services)&&r.push.apply(r,l(s));}}},P=function t(n){var r,i,s;if(null==n||"object"!==e(n))return n;if(r=Array.isArray(n)?[]:{},function(t){if("object"!==e(t)||t.nodeType||t===t.window)return !1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return !1}catch(e){return !1}return !0}(n))for(s in n)i=n[s],r[s]=t(i);else r=n;return r},O=function(){function e(){t(this,e);}return r(e,[{key:"setExpressionHandler",value:function(e){return this.expressionHandler=e,this}},{key:"eval",value:function(e){return this.expressionHandler(e)}}]),e}();function F(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var B={};!function(e){var t=function(){var e=function(e,t,n,r){for(n=n||{},r=e.length;r--;n[e[r]]=t);return n},t=[1,11],n=[1,3],r=[1,4],i=[1,5],s=[1,6],o=[1,8],a=[1,9],u=[1,10],c=[1,13],l=[1,14],h=[1,15],p=[1,16],f=[1,17],d=[1,18],g=[1,19],v=[1,20],m=[1,21],y=[1,22],k=[1,23],b=[1,24],D=[1,25],_=[1,26],E=[5,7,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,30],w=[5,7,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30],x=[5,7,12,13,14,19,20,21,22,23,24,25,26,28,30],C=[5,7,12,13,14,15,16,17,19,20,21,22,23,24,25,26,28,30],S=[5,7,12,19,20,21,22,23,24,25,26,28,30],A=[5,7,12,25,26,28,30],M=[7,28],P={trace:function(){},yy:{},symbols_:{error:2,expressions:3,e:4,EOF:5,expression_list:6,",":7,dot_name:8,".":9,NAME:10,"[":11,"]":12,"+":13,"-":14,"*":15,"/":16,"%":17,"^":18,">":19,"<":20,"==":21,"!=":22,">=":23,"<=":24,"||":25,"&&":26,"(":27,")":28,"?":29,":":30,true:31,false:32,QUOTED_STRING:33,NUMBER:34,HEXNUMBER:35,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",7:",",9:".",10:"NAME",11:"[",12:"]",13:"+",14:"-",15:"*",16:"/",17:"%",18:"^",19:">",20:"<",21:"==",22:"!=",23:">=",24:"<=",25:"||",26:"&&",27:"(",28:")",29:"?",30:":",31:"true",32:"false",33:"QUOTED_STRING",34:"NUMBER",35:"HEXNUMBER"},productions_:[0,[3,2],[6,3],[6,1],[8,3],[8,4],[8,1],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,2],[4,3],[4,7],[4,1],[4,1],[4,1],[4,3],[4,4],[4,1],[4,1],[4,1]],performAction:function(e,t,n,r,i,s,o){var a=s.length-1;switch(i){case 1:var u=s[a-1];return "function"==typeof u?u:function(e){return u};case 2:case 4:this.$=s[a-2].concat([s[a]]);break;case 3:case 6:this.$=[s[a]];break;case 5:this.$=s[a-3].concat([s[a-1]]);break;case 7:this.$=function(e){return B(r.parser,e,"_add",[s[a-2],s[a]])};break;case 8:this.$=function(e){return B(r.parser,e,"_subtract",[s[a-2],s[a]])};break;case 9:this.$=function(e){return B(r.parser,e,"_multiply",[s[a-2],s[a]])};break;case 10:this.$=function(e){return B(r.parser,e,"_divide",[s[a-2],s[a]])};break;case 11:this.$=function(e){return B(r.parser,e,"_mod",[s[a-2],s[a]])};break;case 12:this.$=function(e){return B(r.parser,e,"_pow",[s[a-2],s[a]])};break;case 13:this.$=function(e){return 1==B(r.parser,e,"_greaterThen",[s[a-2],s[a]])};break;case 14:this.$=function(e){return 1==B(r.parser,e,"_lessThen",[s[a-2],s[a]])};break;case 15:this.$=function(e){return 1==B(r.parser,e,"_equalTo",[s[a-2],s[a]])};break;case 16:this.$=function(e){return 0==B(r.parser,e,"_equalTo",[s[a-2],s[a]])};break;case 17:this.$=function(e){return 0==B(r.parser,e,"_lessThen",[s[a-2],s[a]])};break;case 18:this.$=function(e){return 0==B(r.parser,e,"_greaterThen",[s[a-2],s[a]])};break;case 19:this.$=function(e){return 1==B(r.parser,e,"_or",[s[a-2],s[a]])};break;case 20:this.$=function(e){return 1==B(r.parser,e,"_and",[s[a-2],s[a]])};break;case 21:this.$=function(e){return -O(s[a],e)};break;case 22:this.$=function(e){return O(s[a-1],e)};break;case 23:this.$=function(e){return O(s[a-5],e)?O(s[a-2],e):O(s[a],e)};break;case 24:this.$=!0;break;case 25:this.$=!1;break;case 26:this.$=function(e){return r.parser.getDotProperty(e,F(s[a],e),0)};break;case 27:this.$=function(e){return T(r.parser,e,F(s[a-2],e),void 0,!0)};break;case 28:this.$=function(e){return T(r.parser,e,F(s[a-3],e),s[a-1],!0)};break;case 29:this.$=e.slice(1,-1);break;case 30:this.$=Number(e);break;case 31:this.$=parseInt(e,16);}},table:[{3:1,4:2,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},{1:[3]},{5:[1,12],13:c,14:l,15:h,16:p,17:f,18:d,19:g,20:v,21:m,22:y,23:k,24:b,25:D,26:_},{4:27,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},{4:28,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},e(E,[2,24]),e(E,[2,25]),e(E,[2,26],{9:[1,30],11:[1,31],27:[1,29]}),e(E,[2,29]),e(E,[2,30]),e(E,[2,31]),e(w,[2,6]),{1:[2,1]},{4:32,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},{4:33,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},{4:34,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},{4:35,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},{4:36,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},{4:37,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},{4:38,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},{4:39,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},{4:40,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},{4:41,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},{4:42,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},{4:43,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},{4:44,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},{4:45,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},e(E,[2,21]),{13:c,14:l,15:h,16:p,17:f,18:d,19:g,20:v,21:m,22:y,23:k,24:b,25:D,26:_,28:[1,46]},{4:49,6:48,8:7,10:t,14:n,27:r,28:[1,47],31:i,32:s,33:o,34:a,35:u},{10:[1,50]},{4:51,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},e(x,[2,7],{15:h,16:p,17:f,18:d}),e(x,[2,8],{15:h,16:p,17:f,18:d}),e(C,[2,9],{18:d}),e(C,[2,10],{18:d}),e([5,7,12,13,14,17,19,20,21,22,23,24,25,26,28,30],[2,11],{15:h,16:p,18:d}),e(E,[2,12]),e(S,[2,13],{13:c,14:l,15:h,16:p,17:f,18:d}),e(S,[2,14],{13:c,14:l,15:h,16:p,17:f,18:d}),e(S,[2,15],{13:c,14:l,15:h,16:p,17:f,18:d}),e(S,[2,16],{13:c,14:l,15:h,16:p,17:f,18:d}),e(S,[2,17],{13:c,14:l,15:h,16:p,17:f,18:d}),e(S,[2,18],{13:c,14:l,15:h,16:p,17:f,18:d}),e(A,[2,19],{13:c,14:l,15:h,16:p,17:f,18:d,19:g,20:v,21:m,22:y,23:k,24:b}),e(A,[2,20],{13:c,14:l,15:h,16:p,17:f,18:d,19:g,20:v,21:m,22:y,23:k,24:b}),e(E,[2,22],{29:[1,52]}),e(E,[2,27]),{7:[1,54],28:[1,53]},e(M,[2,3],{13:c,14:l,15:h,16:p,17:f,18:d,19:g,20:v,21:m,22:y,23:k,24:b,25:D,26:_}),e(w,[2,4]),{12:[1,55],13:c,14:l,15:h,16:p,17:f,18:d,19:g,20:v,21:m,22:y,23:k,24:b,25:D,26:_},{4:56,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},e(E,[2,28]),{4:57,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},e(w,[2,5]),{13:c,14:l,15:h,16:p,17:f,18:d,19:g,20:v,21:m,22:y,23:k,24:b,25:D,26:_,30:[1,58]},e(M,[2,2],{13:c,14:l,15:h,16:p,17:f,18:d,19:g,20:v,21:m,22:y,23:k,24:b,25:D,26:_}),{4:59,8:7,10:t,14:n,27:r,31:i,32:s,33:o,34:a,35:u},e([5,7,12,28,30],[2,23],{13:c,14:l,15:h,16:p,17:f,18:d,19:g,20:v,21:m,22:y,23:k,24:b,25:D,26:_})],defaultActions:{12:[2,1]},parseError:function(e,t){if(!t.recoverable){var n=new Error(e);throw n.hash=t,n}this.trace(e);},parse:function(e){var t=this,n=[0],r=[null],i=[],s=this.table,o="",a=0,u=0,c=i.slice.call(arguments,1),l=Object.create(this.lexer),h={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(h.yy[p]=this.yy[p]);l.setInput(e,h.yy),h.yy.lexer=l,h.yy.parser=this,void 0===l.yylloc&&(l.yylloc={});var f=l.yylloc;i.push(f);var d=l.options&&l.options.ranges;"function"==typeof h.yy.parseError?this.parseError=h.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,v,m,y,k,b,D,_,E,w={};;){if(v=n[n.length-1],this.defaultActions[v]?m=this.defaultActions[v]:(null==g&&(E=void 0,"number"!=typeof(E=l.lex()||1)&&(E=t.symbols_[E]||E),g=E),m=s[v]&&s[v][g]),void 0===m||!m.length||!m[0]){var x="";for(k in _=[],s[v])this.terminals_[k]&&k>2&&_.push("'"+this.terminals_[k]+"'");x=l.showPosition?"Parse error on line "+(a+1)+":\n"+l.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(x,{text:l.match,token:this.terminals_[g]||g,line:l.yylineno,loc:f,expected:_});}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(m[0]){case 1:n.push(g),r.push(l.yytext),i.push(l.yylloc),n.push(m[1]),g=null,u=l.yyleng,o=l.yytext,a=l.yylineno,f=l.yylloc;break;case 2:if(b=this.productions_[m[1]][1],w.$=r[r.length-b],w._$={first_line:i[i.length-(b||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(b||1)].first_column,last_column:i[i.length-1].last_column},d&&(w._$.range=[i[i.length-(b||1)].range[0],i[i.length-1].range[1]]),void 0!==(y=this.performAction.apply(w,[o,u,a,h.yy,m[1],r,i].concat(c))))return y;b&&(n=n.slice(0,-1*b*2),r=r.slice(0,-1*b),i=i.slice(0,-1*b)),n.push(this.productions_[m[1]][0]),r.push(w.$),i.push(w._$),D=s[n[n.length-2]][n[n.length-1]],n.push(D);break;case 3:return !0}}return !0}};function O(e,t){return "function"==typeof e?e(t):e}function F(e,t){return e&&(e=e.map((function(e){return O(e,t)}))),e}function B(e,t,n,r){return e[n].apply(e,F(r,t))}function T(e,t,n,r,i){var s,o,a;if((s="string"==typeof n?i?n.split("."):[n]:n).length>1){var u=s.pop();o=(a=e.getDotProperty(t,s))[u];}else o=e.getProperty(t,n),a=e;return null==o&&(o=e.getProperty(t,"defaultHandler"),a=e),o.apply(a,F(r,t))}var L=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t);},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e));},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return (e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var s in i)this[s]=i[s];return !1}return !1},next:function(){if(this.done)return this.EOF;var e,t,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((n=this._input.match(this.rules[i[s]]))&&(!t||n[0].length>t[0].length)){if(t=n,r=s,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,i[s])))return e;if(this._backtrack){t=!1;continue}return !1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e||this.lex()},begin:function(e){this.conditionStack.push(e);},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(e){return (e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e);},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,n,r){switch(n){case 0:break;case 1:return 34;case 2:return 35;case 3:return 15;case 4:return 16;case 5:return 14;case 6:return 13;case 7:return 18;case 8:return 17;case 9:return ">=";case 10:return "<=";case 11:return 19;case 12:return 20;case 13:return "==";case 14:return "!=";case 15:return "||";case 16:return "&&";case 17:return "?";case 18:return ":";case 19:return 27;case 20:return 28;case 21:return 11;case 22:return 12;case 23:return 7;case 24:return 9;case 25:return 31;case 26:return 32;case 27:return 10;case 28:return 33;case 29:return 5;case 30:return "INVALID"}},rules:[/^(?:\s+)/,/^(?:[0-9]+(\.[0-9]+)?\b)/,/^(?:\b0x[0-9A-Fa-f]+\b)/,/^(?:\*)/,/^(?:\/)/,/^(?:-)/,/^(?:\+)/,/^(?:\^)/,/^(?:%)/,/^(?:>=)/,/^(?:<=)/,/^(?:>)/,/^(?:<)/,/^(?:==)/,/^(?:!=)/,/^(?:\|\|)/,/^(?:&&)/,/^(?:\?)/,/^(?::)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?:\.)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:[^\s\*\/\-\+\^\%\>\=\<\!\|\&\?\:\(\)\[\]\,\.]+)/,/^(?:"(\\.|[^\"\\])*"|'(\\.|[^\'\\])*')/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30],inclusive:!0}}};return e}();function j(){this.yy={};}return P.lexer=L,j.prototype=P,P.Parser=j,new j}();void 0!==F&&(e.parser=t,e.Parser=t.Parser,e.parse=function(){return t.parse.apply(t,arguments)});}(B);var T=function(e,t,n,r){if(void 0===r&&(r=!0),e&&"number"!=typeof e&&"string"!=typeof e){if(t in e)return e[t];if(r&&(Array.isArray(t)||-1!==t.indexOf("."))){for(var i=Array.isArray(t)?t:t.split("."),s=e,o=0;o<i.length;o++){if(!((t=i[o])in s)){s=n;break}s=s[t];}return s}return n}return n},L=function(e){i(s,e);var n=u(s);function s(){return t(this,s),n.apply(this,arguments)}return r(s,[{key:"getProperty",value:function(e,t,n){var r=T(e,t,void 0,!1);return void 0!==r?r:T(this,t,n,!1)}},{key:"getDotProperty",value:function(e,t,n){var r=T(e,t,void 0,!0);return void 0!==r?r:T(this,t,n,!0)}},{key:"_add",value:function(e,t){return e+t}},{key:"_subtract",value:function(e,t){return e-t}},{key:"_multiply",value:function(e,t){return e*t}},{key:"_divide",value:function(e,t){return e/t}},{key:"_mod",value:function(e,t){return e%t}},{key:"_pow",value:function(e,t){return Math.pow(e,t)}},{key:"_greaterThen",value:function(e,t){return e>t}},{key:"_lessThen",value:function(e,t){return e<t}},{key:"_equalTo",value:function(e,t){return e==t}},{key:"_or",value:function(e,t){return e||t}},{key:"_and",value:function(e,t){return e&&t}},{key:"defaultHandler",value:function(e,t){return 0}},{key:"compile",value:function(e){return this.parse(e)}},{key:"exec",value:function(e,t){return "string"==typeof e&&(e=this.compile(e)),e(t)}}],[{key:"GetProperty",value:function(e,t,n,r){return T(e,t,n,r)}}]),s}(f(B).Parser),j=new L,R=function(e){return j.compile(e)},N=function(e){i(s,e);var n=u(s);function s(e){var r,i;return t(this,s),r=n.call(this),i="number"==typeof e?function(){return e}:R(e),r.setExpressionHandler(i),r}return r(s)}(O),I=function(e){i(o,e);var n=u(o);function o(){return t(this,o),n.apply(this,arguments)}return r(o,[{key:"eval",value:function(e){return !!c(s(o.prototype),"eval",this).call(this,e)}}]),o}(N),$=new(function(){function e(n){t(this,e),void 0===n&&(n={});var r=n.delimiters;void 0===r&&(r=["{{","}}"]),this.setDelimiters(r[0],r[1]);var i=n.expressionParser;void 0===i&&(i=new L),this.setExpressionParser(i);}return r(e,[{key:"setDelimiters",value:function(e,t){return void 0===t&&(t=e[1],e=e[0]),this.delimiterLeft=e,this.delimiterRight=t,this.reDelimiter=RegExp("".concat(e,"|").concat(t),"gi"),this.reSplit=RegExp("".concat(e,".*?").concat(t),"gi"),this}},{key:"setExpressionParser",value:function(e){return this.expressionParser=e,this}},{key:"compile",value:function(e,t){var n,r,i;if(t){var s=t.delimiters;s&&(n=this.delimiterLeft,r=this.delimiterRight,this.setDelimiters(s[0],s[1])),(u=t.expressionParser)&&(i=this.expressionParser,this.setExpressionParser(u));}for(var o=this.reDelimiter,a=this.reSplit,u=this.expressionParser,c=[],l=0;;){var h=a.exec(e);if(!h)break;var p=h[0],f=a.lastIndex,d=f-p.length;l<d&&c.push(e.substring(l,d));var g=e.substring(d,f).replace(o,"");c.push(u.compile(g)),l=f;}var v=e.length;return l<v&&c.push(e.substring(l,v)),n&&this.setDelimiters(n,r),i&&this.setExpressionParser(i),function(e){return c.map((function(t){return "function"==typeof t&&(t=t(e)),t})).join("")}}},{key:"render",value:function(e,t,n){return ("string"==typeof e?this.compile(e,n):e)(t)}}]),e}()),G=function(e){i(s,e);var n=u(s);function s(e){var r;t(this,s),r=n.call(this);var i,o,a=(i=e,$.compile(i,o));return r.setExpressionHandler(a),r}return r(s)}(O),V=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.id,i=n.category,s=n.name,o=n.title,a=n.description,u=n.properties;t(this,e),void 0===r&&(r=A()),this.parent=null,this.id=r,this.category=i||"",this.name=s||"",this.title=o||this.name,this.description=a||"",this.properties=u||{};}return r(e,[{key:"setTitle",value:function(e){return this.title=e,this}},{key:"setName",value:function(e){return this.name=e,this}},{key:"setDescription",value:function(e){return this.description=e,this}},{key:"setParent",value:function(e){return this.parent=e,this}},{key:"getParent",value:function(){return this.parent}},{key:"getTree",value:function(e){if(e)return e.tree;for(var t=this.parent;t;){if(t.category===m)return t;t=t.parent;}return null}},{key:"addExpression",value:function(e){return new N(e)}},{key:"addBooleanExpression",value:function(e){return new I(e)}},{key:"addStringTemplateExpression",value:function(e){return new G(e)}},{key:"_execute",value:function(e){this._enter(e),this.getOpenState(e)||this._open(e);var t=this._tick(e);return 1!==t&&2!==t&&5!==t&&9!==t||this._close(e),this._exit(e),t}},{key:"_enter",value:function(e){e._enterNode(this),this.enter(e);}},{key:"_open",value:function(e){e._openNode(this),this.setOpenState(e,!0),this.open(e);}},{key:"_tick",value:function(e){return e._tickNode(this),this.tick(e)}},{key:"_close",value:function(e){e._closeNode(this),this.setOpenState(e,!1),this.close(e),this.abortChildren(e);}},{key:"_exit",value:function(e){e._exitNode(this),this.exit(e);}},{key:"_abort",value:function(e){this._close(e),this.abort(e);}},{key:"enter",value:function(e){}},{key:"open",value:function(e){}},{key:"tick",value:function(e){}},{key:"close",value:function(e){}},{key:"exit",value:function(e){}},{key:"abortChildren",value:function(e){}},{key:"abort",value:function(e){}},{key:"getNodeMemory",value:function(e){return e.getNodeMemory(this.id)}},{key:"getOpenState",value:function(e){return this.getNodeMemory(e).$isOpen}},{key:"setOpenState",value:function(e,t){return void 0===t&&(t=!0),this.getNodeMemory(e).$isOpen=t,this}},{key:"SUCCESS",get:function(){return 1}},{key:"FAILURE",get:function(){return 2}},{key:"RUNNING",get:function(){return 3}},{key:"PENDING",get:function(){return 4}},{key:"ERROR",get:function(){return 9}}]),e}(),U=function(e){i(s,e);var n=u(s);function s(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.name,o=void 0===i?"Action":i,a=r.title,u=r.properties,c=r.services,l=arguments.length>1?arguments[1]:void 0;if(t(this,s),e=n.call(this,{category:b,name:o,title:a,properties:u}),c)for(var h=0,p=c.length;h<p;h++)e.addService(c[h],l);return e}return r(s,[{key:"addService",value:function(e,t){return "string"==typeof e&&(e=t[e]),void 0===this.services&&(this.services=[]),-1===this.services.indexOf(e)&&(this.services.push(e),e.setParent(this)),this}},{key:"_tick",value:function(e){if(e._tickNode(this),this.services)for(var t=0,n=this.services.length;t<n;t++)this.services[t]._tick(e);return this.tick(e)}}]),s}(V),z=function(e){i(s,e);var n=u(s);function s(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.children,o=void 0===i?[]:i,a=r.name,u=void 0===a?"Composite":a,c=r.title,l=r.properties,h=r.services,p=arguments.length>1?arguments[1]:void 0;t(this,s),(e=n.call(this,{category:y,name:u,title:c,properties:l})).children=[];for(var f=0,d=o.length;f<d;f++)e.addChild(o[f],p);if(h)for(f=0,d=h.length;f<d;f++)e.addService(h[f],p);return e}return r(s,[{key:"insertChild",value:function(e,t,n){return "string"==typeof e&&(e=t[e]),-1===this.children.indexOf(e)&&(n<0&&(n=this.children.length+n),void 0===n||n>=this.children.length?this.children.push(e):this.children.splice(n,0,e),e.setParent(this)),this}},{key:"addChild",value:function(e,t){return this.insertChild(e,t),this}},{key:"addService",value:function(e,t){return "string"==typeof e&&(e=t[e]),void 0===this.services&&(this.services=[]),-1===this.services.indexOf(e)&&(this.services.push(e),e.setParent(this)),this}},{key:"_tick",value:function(e){if(e._tickNode(this),this.services)for(var t=0,n=this.services.length;t<n;t++)this.services[t]._tick(e);return this.tick(e)}},{key:"abortChildren",value:function(e){for(var t=0,n=this.children.length;t<n;t++){var r=this.children[t];r.getOpenState(e)&&r._abort(e);}}}]),s}(V),H=function(e){i(s,e);var n=u(s);function s(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.child,o=void 0===i?null:i,a=r.name,u=void 0===a?"Decorator":a,c=r.title,l=r.properties,h=arguments.length>1?arguments[1]:void 0;return t(this,s),(e=n.call(this,{category:k,name:u,title:c,properties:l})).child=null,o&&e.addChild(o,h),e}return r(s,[{key:"addChild",value:function(e,t){return "string"==typeof e&&(e=t[e]),this.child=e,e.setParent(this),this}},{key:"isChildRunning",value:function(e){return this.child.getOpenState(e)}},{key:"abortChildren",value:function(e){this.isChildRunning(e)&&this.child._abort(e);}},{key:"openChild",value:function(e){return this.child.setOpenState(e,!0),this}}]),s}(V),W=function(e){i(s,e);var n=u(s);function s(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.interval,o=void 0===i?0:i,a=r.randomDeviation,u=void 0===a?0:a,c=r.name,l=void 0===c?"Service":c,h=r.title,p=r.properties;return t(this,s),void 0===p&&(p={}),p.interval=o,p.randomDeviation=u,(e=n.call(this,{category:"service",name:l,title:h,properties:p})).intervalExpression=e.addExpression(o),e.randomDeviationExpression=e.addExpression(u),e}return r(s,[{key:"_tick",value:function(e){this.canTick(e)&&this.tick(e);}},{key:"canTick",value:function(e){var t=this.getNodeMemory(e),n=e.currentTime,r=t.$lastEndTime,i=t.$interval,s=void 0===r||n-r>=i;if(s){t.$lastEndTime=n;i=e.evalExpression(this.intervalExpression);var o=e.evalExpression(this.randomDeviationExpression);o>0&&(i+=(.5-Math.random())*o),t.$interval=i;}return s}}]),s}(V),q=function(e){i(s,e);var n=u(s);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.services,i=e.title,o=e.name,a=void 0===o?"Succeeder":o;return t(this,s),n.call(this,{services:r,title:i,name:a})}return r(s,[{key:"tick",value:function(e){return 1}}]),s}(U),K=function(e){i(s,e);var n=u(s);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.services,i=e.title,o=e.name,a=void 0===o?"Failer":o;return t(this,s),n.call(this,{services:r,title:i,name:a})}return r(s,[{key:"tick",value:function(e){return 2}}]),s}(U),X=function(e){i(s,e);var n=u(s);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.services,i=e.title,o=e.name,a=void 0===o?"Runner":o;return t(this,s),n.call(this,{services:r,title:i,name:a})}return r(s,[{key:"tick",value:function(e){return 3}}]),s}(U),J=function(e){i(s,e);var n=u(s);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.services,i=e.title,o=e.name,a=void 0===o?"Error":o;return t(this,s),n.call(this,{services:r,title:i,name:a})}return r(s,[{key:"tick",value:function(e){return 9}}]),s}(U),Z=function(e){i(s,e);var n=u(s);function s(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.duration,o=void 0===i?0:i,a=r.services,u=r.title,c=r.name,l=void 0===c?"Wait":c;return t(this,s),(e=n.call(this,{title:u,name:l,properties:{duration:o},services:a})).durationExpression=e.addExpression(o),e}return r(s,[{key:"open",value:function(e){var t=this.getNodeMemory(e);t.$startTime=e.currentTime,t.$duration=e.evalExpression(this.durationExpression);}},{key:"tick",value:function(e){var t=this.getNodeMemory(e);return e.currentTime-t.$startTime<t.$duration?3:1}}]),s}(U),Y=function(e){i(s,e);var n=u(s);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.services,i=e.title,o=e.name,a=void 0===o?"Abort":o;return t(this,s),n.call(this,{services:r,title:i,name:a})}return r(s,[{key:"tick",value:function(e){return 5}}]),s}(U),Q=function(e){i(s,e);var n=u(s);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.children,i=void 0===r?[]:r,o=e.services,a=e.title,u=e.name,c=void 0===u?"Selector":u,l=arguments.length>1?arguments[1]:void 0;return t(this,s),n.call(this,{children:i,services:o,title:a,name:c},l)}return r(s,[{key:"open",value:function(e){this.getNodeMemory(e).$runningChild=-1;}},{key:"tick",value:function(e){if(0===this.children.length)return 9;var t,n=this.getNodeMemory(e),r=n.$runningChild;if(r<0){for(var i=0,s=this.children.length;i<s;i++)if(3===(t=this.children[i]._execute(e))||1===t||5===t){r=i;break}}else t=this.children[r]._execute(e);return n.$runningChild=3===t?r:-1,t}},{key:"abortChildren",value:function(e){var t=this.getNodeMemory(e),n=this.children[t.$runningChild];n&&(n._abort(e),t.$runningChild=-1);}}]),s}(z),ee=function(e){i(s,e);var n=u(s);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.children,i=void 0===r?[]:r,o=e.services,a=e.title,u=e.name,c=void 0===u?"Sequence":u,l=arguments.length>1?arguments[1]:void 0;return t(this,s),n.call(this,{children:i,services:o,title:a,name:c},l)}return r(s,[{key:"open",value:function(e){this.getNodeMemory(e).$runningChild=0;}},{key:"tick",value:function(e){if(0===this.children.length)return 9;for(var t,n=this.getNodeMemory(e),r=n.$runningChild,i=this.children.length;r<i&&(3!==(t=this.children[r]._execute(e))&&2!==t&&5!==t);r++);return n.$runningChild=3===t?r:-1,t}},{key:"abortChildren",value:function(e){var t=this.getNodeMemory(e),n=this.children[t.$runningChild];n&&(n._abort(e),t.$runningChild=-1);}}]),s}(z),te=function(e,t){if(!(t>=e.length)){for(var n=e.length-1,r=e[t],i=t;i<n;i++)e[i]=e[i+1];return e.length=n,r}},ne=function(e,t,n,r){var i;if(void 0===r&&(r=e),!Array.isArray(t))return -1!==(i=e.indexOf(t))?(te(e,i),n&&n.call(r,t),t):null;for(var s=t.length-1;s>=0;){var o=t[s];-1!==(i=e.indexOf(o))?(te(e,i),n&&n.call(r,o)):t.pop(),s--;}return t},re=function(e){i(s,e);var n=u(s);function s(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.finishMode,o=void 0===i?0:i,a=r.returnSuccess,u=void 0===a||a,c=r.children,l=void 0===c?[]:c,h=r.services,p=r.title,f=r.name,d=void 0===f?"Parallel":f,g=arguments.length>1?arguments[1]:void 0;return t(this,s),(e=n.call(this,{children:l,services:h,title:p,name:d,properties:{finishMode:o,returnSuccess:u}},g)).finishMode=o,e.returnSuccess=u,e}return r(s,[{key:"open",value:function(e){this.getNodeMemory(e).$runningChildren=this.children.map((function(e,t){return t}));}},{key:"tick",value:function(e){if(0===this.children.length)return 9;for(var t=this.getNodeMemory(e),n=t.$runningChildren,r={},i=!1,s=!1,o=!1,a=!1,u=!1,c=0,l=n.length;c<l;c++){var h=n[c],p=this.children[h]._execute(e);switch(r[h]=p,0===h&&(t.$mainTaskStatus=p),p){case 1:case 2:i=!0;break;case 3:o=!0;break;case 4:s=!0;break;case 5:a=!0;break;case 9:u=!0;}}if(i)for(var h in r){1!==(p=r[h])&&2!==p||ne(n,parseInt(h));}return 0===this.finishMode?t.$mainTaskStatus:u?9:a?5:s?4:o?3:this.returnSuccess?1:t.$mainTaskStatus}},{key:"abortChildren",value:function(e){for(var t=this.getNodeMemory(e),n=t.$runningChildren,r=0,i=n.length;r<i;r++){var s=n[r];this.children[s]._abort(e);}t.$runningChildren.length=0;}}]),s}(z),ie=function(e){i(s,e);var n=u(s);function s(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.expression,o=void 0===i?"true":i,a=r.returnPending,u=void 0!==a&&a,c=r.children,l=void 0===c?[]:c,h=r.services,p=r.title,f=r.name,d=void 0===f?"IfSelector":f,g=arguments.length>1?arguments[1]:void 0;return t(this,s),(e=n.call(this,{children:l,services:h,title:p,name:d,properties:{expression:o,returnPending:u}},g)).expression=e.addBooleanExpression(o),e.returnPending=u,e.forceSelectChildIndex=void 0,e}return r(s,[{key:"open",value:function(e){this.getNodeMemory(e).$runningChild=-1;}},{key:"setSelectChildIndex",value:function(e){return this.forceSelectChildIndex=e,this}},{key:"evalCondition",value:function(e){return void 0!==this.forceSelectChildIndex?this.forceSelectChildIndex:e.evalExpression(this.expression)?0:1}},{key:"tick",value:function(e){if(0===this.children.length)return 9;var t=this.getNodeMemory(e),n=t.$runningChild;if(n<0&&(n=this.evalCondition(e),this.returnPending))return t.$runningChild=n,4;var r=this.children[n]._execute(e);return t.$runningChild=3===r?n:-1,r}},{key:"abortChildren",value:function(e){var t=this.getNodeMemory(e),n=this.children[t.$runningChild];n&&(n._abort(e),t.$runningChild=-1);}}]),s}(z),se=function(e){i(s,e);var n=u(s);function s(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.expression,o=void 0===i?null:i,a=r.keys,u=void 0===a?void 0:a,c=r.returnPending,l=void 0!==c&&c,h=r.children,p=void 0===h?{}:h,f=r.services,d=r.title,g=r.name,v=void 0===g?"SwitchSelector":g,m=arguments.length>1?arguments[1]:void 0;return t(this,s),void 0===u&&(u=Object.keys(p),p=Object.values(p)),(e=n.call(this,{children:p,services:f,title:d,name:v,properties:{expression:o,keys:u,returnPending:l}},m)).expression=e.addExpression(o),e.keys=u,e.returnPending=l,e.forceSelectChildIndex=void 0,e}return r(s,[{key:"open",value:function(e){this.getNodeMemory(e).$runningChild=-1;}},{key:"setSelectChildIndex",value:function(e){return this.forceSelectChildIndex=e,this}},{key:"evalCondition",value:function(e){if(void 0!==this.forceSelectChildIndex)return "number"==typeof this.forceSelectChildIndex?this.forceSelectChildIndex:this.keys.indexOf(this.forceSelectChildIndex);var t=e.evalExpression(this.expression);return this.keys.indexOf(t)}},{key:"tick",value:function(e){if(0===this.children.length)return 9;var t=this.getNodeMemory(e),n=t.$runningChild;if(n<0){if(-1===(n=this.evalCondition(e))&&(n=this.keys.indexOf("default")),-1===n)return 9;if(this.returnPending)return t.$runningChild=n,PENDING}var r=this.children[n]._execute(e);return t.$runningChild=3===r?n:-1,r}},{key:"abortChildren",value:function(e){var t=this.getNodeMemory(e),n=this.children[t.$runningChild];n&&(n._abort(e),t.$runningChild=-1);}}]),s}(z),oe=function(e){i(s,e);var n=u(s);function s(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.expression,o=void 0===i?null:i,a=r.weights,u=void 0===a?void 0:a,c=r.returnPending,l=void 0!==c&&c,h=r.children,p=void 0===h?[]:h,f=r.services,d=r.title,g=r.name,v=void 0===g?"WeightSelector":g,m=arguments.length>1?arguments[1]:void 0;if(t(this,s),void 0===u){u=[];for(var y=0,k=0,b=p.length;k<b;k++){var D,_=p[k];_ instanceof V||"string"==typeof _?D=1:(D=_.weight,p[k]=_.node),u.push(D),y+=D;}for(k=0,b=u.length;k<b;k++)u[k]/=y;}return (e=n.call(this,{children:p,services:f,title:d,name:v,properties:{expression:o,weights:u,returnPending:l}},m)).expression=o?e.addExpression(o):null,e.weights=u,e.returnPending=l,e.forceSelectChildIndex=void 0,e}return r(s,[{key:"open",value:function(e){this.getNodeMemory(e).$runningChild=-1;}},{key:"setSelectChildIndex",value:function(e){return void 0!==this.forceSelectChildIndex?this.forceSelectChildIndex:(this.forceSelectChildIndex=e,this)}},{key:"evalCondition",value:function(e){if(void 0!==this.forceSelectChildIndex)return this.forceSelectChildIndex;for(var t=this.expression?e.evalExpression(this.expression):Math.random(),n=0,r=this.weights.length;n<r;n++)if((t-=this.weights[n])<0)return n}},{key:"tick",value:function(e){if(0===this.children.length)return 9;var t=this.getNodeMemory(e),n=t.$runningChild;if(n<0&&(void 0===(n=this.evalCondition(e))&&(n=this.children.length-1),this.returnPending))return t.$runningChild=n,PENDING;var r=this.children[n]._execute(e);return t.$runningChild=3===r?n:-1,r}},{key:"abortChildren",value:function(e){var t=this.getNodeMemory(e),n=this.children[t.$runningChild];n&&(n._abort(e),t.$runningChild=-1);}}]),s}(z),ae=function(e){i(s,e);var n=u(s);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.children,i=void 0===r?[]:r,o=e.services,a=e.title,u=e.name,c=void 0===u?"RandomSelector":u,l=arguments.length>1?arguments[1]:void 0;return t(this,s),n.call(this,{children:i,services:o,title:a,name:c},l)}return r(s,[{key:"open",value:function(e){this.getNodeMemory(e).$runningChild=-1;}},{key:"tick",value:function(e){if(0===this.children.length)return ERROR;var t=this.getNodeMemory(e),n=t.$runningChild;n<0&&(n=Math.floor(Math.random()*this.children.length));var r=this.children[n]._execute(e);return t.$runningChild=r===RUNNING?n:-1,r}},{key:"abortChildren",value:function(e){var t=this.getNodeMemory(e),n=this.children[t.$runningChild];n&&(n._abort(e),t.$runningChild=-1);}}]),s}(z),ue=function(e){i(s,e);var n=u(s);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.children,i=void 0===r?[]:r,o=e.services,a=e.title,u=e.name,c=void 0===u?"ShuffleSelector":u,l=arguments.length>1?arguments[1]:void 0;return t(this,s),n.call(this,{children:i,services:o,title:a,name:c},l)}return r(s,[{key:"open",value:function(e){var t=this.getNodeMemory(e);t.$runningChild=0,t.$children||(t.$children=this.children.map((function(e,t){return t}))),function(e){for(var t=e.length-1;t>0;t--){var n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r;}}(t.$children);}},{key:"tick",value:function(e){if(0===this.children.length)return 9;for(var t,n=this.getNodeMemory(e),r=n.$runningChild,i=n.$children,s=r,o=i.length;s<o&&(3!==(t=this.children[i[s]]._execute(e))&&1!==t&&5!==t);s++);return n.$runningChild=3===t?s:-1,t}},{key:"abortChildren",value:function(e){var t=this.getNodeMemory(e),n=this.children[t.$runningChild];n&&(n._abort(e),t.$runningChild=-1);}}]),s}(z),ce=function(e){i(s,e);var n=u(s);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.child,i=void 0===r?null:r,o=e.title,a=e.name,u=void 0===a?"Bypass":a,c=arguments.length>1?arguments[1]:void 0;return t(this,s),n.call(this,{child:i,title:o,name:u},c)}return r(s,[{key:"tick",value:function(e){return this.child?this.child._execute(e):9}}]),s}(H),le=function(e){i(s,e);var n=u(s);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.child,i=void 0===r?null:r,o=e.title,a=e.name,u=void 0===a?"ForceSuccess":a,c=arguments.length>1?arguments[1]:void 0;return t(this,s),n.call(this,{child:i,title:o,name:u,properties:{}},c)}return r(s,[{key:"tick",value:function(e){if(!this.child)return 9;var t=this.child._execute(e);return 2===t?1:t}}]),s}(H),he=function(e){i(s,e);var n=u(s);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.child,i=void 0===r?null:r,o=e.title,a=e.name,u=void 0===a?"ForceFailure":a,c=arguments.length>1?arguments[1]:void 0;return t(this,s),n.call(this,{child:i,title:o,name:u,properties:{}},c)}return r(s,[{key:"tick",value:function(e){if(!this.child)return 9;var t=this.child._execute(e);return 1===t?2:t}}]),s}(H),pe=function(e){i(s,e);var n=u(s);function s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.child,i=void 0===r?null:r,o=e.title,a=e.name,u=void 0===a?"Invert":a,c=arguments.length>1?arguments[1]:void 0;return t(this,s),n.call(this,{child:i,title:o,name:u},c)}return r(s,[{key:"tick",value:function(e){if(!this.child)return 9;var t=this.child._execute(e);return 1===t?t=2:2===t&&(t=1),t}}]),s}(H),fe=function(e){i(s,e);var n=u(s);function s(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.duration,o=void 0===i?0:i,a=r.returnSuccess,u=void 0===a||a,c=r.child,l=void 0===c?null:c,h=r.title,p=r.name,f=void 0===p?"TimeLimit":p,d=arguments.length>1?arguments[1]:void 0;return t(this,s),(e=n.call(this,{child:l,title:h,name:f,properties:{duration:o,returnSuccess:u}},d)).durationExpression=e.addExpression(o),e.returnSuccess=u,e}return r(s,[{key:"open",value:function(e){var t=this.getNodeMemory(e);t.$startTime=e.currentTime,t.$duration=e.evalExpression(this.durationExpression);}},{key:"tick",value:function(e){if(!this.child)return 9;var t=this.getNodeMemory(e);return e.currentTime-t.$startTime>=t.$duration?this.returnSuccess?SUCCESS:2:this.child._execute(e)}}]),s}(H),de=function(e){i(s,e);var n=u(s);function s(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.duration,o=void 0===i?0:i,a=r.child,u=void 0===a?null:a,c=r.title,l=r.name,h=void 0===l?"Cooldown":l,p=arguments.length>1?arguments[1]:void 0;return t(this,s),(e=n.call(this,{child:u,title:c,name:h,properties:{duration:o}},p)).durationExpression=e.addExpression(o),e}return r(s,[{key:"open",value:function(e){this.getNodeMemory(e).$cooldownTime=e.evalExpression(this.durationExpression);}},{key:"tick",value:function(e){if(!this.child)return 9;var t=this.getNodeMemory(e),n=e.currentTime,r=t.$lastEndTime,i=t.$cooldownTime;if(void 0!==r&&n-r<i)return 2;var s=this.child._execute(e);return 1!==s&&2!==s&&5!==s||(t.$lastEndTime=n),s}}]),s}(H),ge=function(e){i(s,e);var n=u(s);function s(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.maxLoop,o=void 0===i?-1:i,a=r.child,u=void 0===a?null:a,c=r.title,l=r.name,h=void 0===l?"Repeat":l,p=arguments.length>1?arguments[1]:void 0;return t(this,s),(e=n.call(this,{child:u,title:c,name:h,properties:{maxLoop:o}},p)).maxLoopExpression=e.addExpression(o),e}return r(s,[{key:"open",value:function(e){var t=this.getNodeMemory(e);t.$maxLoop=e.evalExpression(this.maxLoopExpression),t.$i=0;}},{key:"tick",value:function(e){if(!this.child)return 9;for(var t=this.getNodeMemory(e),n=t.$maxLoop,r=t.$i,i=1;(n<0||r<n)&&(1===(i=this.child._execute(e))||2===i);)r++;return t.$i=r,i}}]),s}(H),ve=function(e){i(s,e);var n=u(s);function s(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.maxLoop,o=void 0===i?-1:i,a=r.returnSuccess,u=void 0!==a&&a,c=r.child,l=void 0===c?null:c,h=r.title,p=r.name,f=void 0===p?"RepeatUntilFailure":p,d=arguments.length>1?arguments[1]:void 0;return t(this,s),(e=n.call(this,{child:l,title:h,name:f,properties:{returnSuccess:u,maxLoop:o}},d)).maxLoopExpression=e.addExpression(o),e.returnSuccess=u,e}return r(s,[{key:"open",value:function(e){var t=this.getNodeMemory(e);t.$maxLoop=e.evalExpression(this.maxLoopExpression),t.$i=0;}},{key:"tick",value:function(e){if(!this.child)return 9;for(var t=this.getNodeMemory(e),n=t.$maxLoop,r=t.$i,i=9;(n<0||r<n)&&1===(i=this.child._execute(e));)r++;return t.$i=r,i===this.FAILURE&&this.returnSuccess&&(i=1),i}}]),s}(H),me=function(e){i(s,e);var n=u(s);function s(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.maxLoop,o=void 0===i?-1:i,a=r.child,u=void 0===a?null:a,c=r.title,l=r.name,h=void 0===l?"RepeatUntilSuccess":l,p=arguments.length>1?arguments[1]:void 0;return t(this,s),(e=n.call(this,{child:u,title:c,name:h,properties:{maxLoop:o}},p)).maxLoopExpression=e.addExpression(o),e}return r(s,[{key:"open",value:function(e){var t=this.getNodeMemory(e);t.$maxLoop=e.evalExpression(this.maxLoopExpression),t.$i=0;}},{key:"tick",value:function(e){if(!this.child)return 9;for(var t=this.getNodeMemory(e),n=t.$maxLoop,r=t.$i,i=9;(n<0||r<n)&&2===(i=this.child._execute(e));)r++;return t.$i=r,i}}]),s}(H),ye=function(e){i(s,e);var n=u(s);function s(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=r.maxLoop,o=void 0===i?1:i,a=r.child,u=void 0===a?null:a,c=r.title,l=r.name,h=void 0===l?"Limiter":l,p=arguments.length>1?arguments[1]:void 0;return t(this,s),(e=n.call(this,{child:u,title:c,name:h,properties:{maxLoop:o}},p)).maxLo