UNPKG

phaser4-rex-plugins

Version:
2 lines (1 loc) 18.4 kB
var t,e;t=void 0,e=function(){function t(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function e(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var r={};!function(t){var r=function(){var t=function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},e=[1,11],r=[1,3],n=[1,4],i=[1,5],s=[1,6],o=[1,8],a=[1,9],h=[1,10],c=[1,13],l=[1,14],u=[1,15],y=[1,16],p=[1,17],f=[1,18],g=[1,19],d=[1,20],_=[1,21],m=[1,22],b=[1,23],k=[1,24],v=[1,25],x=[1,26],P=[5,7,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,28,30],$=[5,7,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30],E=[5,7,12,13,14,19,20,21,22,23,24,25,26,28,30],w=[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],I=[5,7,12,25,26,28,30],A=[7,28],T={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(t,e,r,n,i,s,o){var a=s.length-1;switch(i){case 1:var h=s[a-1];return"function"==typeof h?h:function(t){return h};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(t){return R(n.parser,t,"_add",[s[a-2],s[a]])};break;case 8:this.$=function(t){return R(n.parser,t,"_subtract",[s[a-2],s[a]])};break;case 9:this.$=function(t){return R(n.parser,t,"_multiply",[s[a-2],s[a]])};break;case 10:this.$=function(t){return R(n.parser,t,"_divide",[s[a-2],s[a]])};break;case 11:this.$=function(t){return R(n.parser,t,"_mod",[s[a-2],s[a]])};break;case 12:this.$=function(t){return R(n.parser,t,"_pow",[s[a-2],s[a]])};break;case 13:this.$=function(t){return 1==R(n.parser,t,"_greaterThen",[s[a-2],s[a]])};break;case 14:this.$=function(t){return 1==R(n.parser,t,"_lessThen",[s[a-2],s[a]])};break;case 15:this.$=function(t){return 1==R(n.parser,t,"_equalTo",[s[a-2],s[a]])};break;case 16:this.$=function(t){return 0==R(n.parser,t,"_equalTo",[s[a-2],s[a]])};break;case 17:this.$=function(t){return 0==R(n.parser,t,"_lessThen",[s[a-2],s[a]])};break;case 18:this.$=function(t){return 0==R(n.parser,t,"_greaterThen",[s[a-2],s[a]])};break;case 19:this.$=function(t){return 1==R(n.parser,t,"_or",[s[a-2],s[a]])};break;case 20:this.$=function(t){return 1==R(n.parser,t,"_and",[s[a-2],s[a]])};break;case 21:this.$=function(t){return-O(s[a],t)};break;case 22:this.$=function(t){return O(s[a-1],t)};break;case 23:this.$=function(t){return O(s[a-5],t)?O(s[a-2],t):O(s[a],t)};break;case 24:this.$=!0;break;case 25:this.$=!1;break;case 26:this.$=function(t){return n.parser.getDotProperty(t,N(s[a],t),0)};break;case 27:this.$=function(t){return j(n.parser,t,N(s[a-2],t),void 0,!0)};break;case 28:this.$=function(t){return j(n.parser,t,N(s[a-3],t),s[a-1],!0)};break;case 29:this.$=t.slice(1,-1);break;case 30:this.$=Number(t);break;case 31:this.$=parseInt(t,16)}},table:[{3:1,4:2,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},{1:[3]},{5:[1,12],13:c,14:l,15:u,16:y,17:p,18:f,19:g,20:d,21:_,22:m,23:b,24:k,25:v,26:x},{4:27,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},{4:28,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},t(P,[2,24]),t(P,[2,25]),t(P,[2,26],{9:[1,30],11:[1,31],27:[1,29]}),t(P,[2,29]),t(P,[2,30]),t(P,[2,31]),t($,[2,6]),{1:[2,1]},{4:32,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},{4:33,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},{4:34,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},{4:35,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},{4:36,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},{4:37,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},{4:38,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},{4:39,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},{4:40,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},{4:41,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},{4:42,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},{4:43,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},{4:44,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},{4:45,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},t(P,[2,21]),{13:c,14:l,15:u,16:y,17:p,18:f,19:g,20:d,21:_,22:m,23:b,24:k,25:v,26:x,28:[1,46]},{4:49,6:48,8:7,10:e,14:r,27:n,28:[1,47],31:i,32:s,33:o,34:a,35:h},{10:[1,50]},{4:51,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},t(E,[2,7],{15:u,16:y,17:p,18:f}),t(E,[2,8],{15:u,16:y,17:p,18:f}),t(w,[2,9],{18:f}),t(w,[2,10],{18:f}),t([5,7,12,13,14,17,19,20,21,22,23,24,25,26,28,30],[2,11],{15:u,16:y,18:f}),t(P,[2,12]),t(S,[2,13],{13:c,14:l,15:u,16:y,17:p,18:f}),t(S,[2,14],{13:c,14:l,15:u,16:y,17:p,18:f}),t(S,[2,15],{13:c,14:l,15:u,16:y,17:p,18:f}),t(S,[2,16],{13:c,14:l,15:u,16:y,17:p,18:f}),t(S,[2,17],{13:c,14:l,15:u,16:y,17:p,18:f}),t(S,[2,18],{13:c,14:l,15:u,16:y,17:p,18:f}),t(I,[2,19],{13:c,14:l,15:u,16:y,17:p,18:f,19:g,20:d,21:_,22:m,23:b,24:k}),t(I,[2,20],{13:c,14:l,15:u,16:y,17:p,18:f,19:g,20:d,21:_,22:m,23:b,24:k}),t(P,[2,22],{29:[1,52]}),t(P,[2,27]),{7:[1,54],28:[1,53]},t(A,[2,3],{13:c,14:l,15:u,16:y,17:p,18:f,19:g,20:d,21:_,22:m,23:b,24:k,25:v,26:x}),t($,[2,4]),{12:[1,55],13:c,14:l,15:u,16:y,17:p,18:f,19:g,20:d,21:_,22:m,23:b,24:k,25:v,26:x},{4:56,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},t(P,[2,28]),{4:57,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},t($,[2,5]),{13:c,14:l,15:u,16:y,17:p,18:f,19:g,20:d,21:_,22:m,23:b,24:k,25:v,26:x,30:[1,58]},t(A,[2,2],{13:c,14:l,15:u,16:y,17:p,18:f,19:g,20:d,21:_,22:m,23:b,24:k,25:v,26:x}),{4:59,8:7,10:e,14:r,27:n,31:i,32:s,33:o,34:a,35:h},t([5,7,12,28,30],[2,23],{13:c,14:l,15:u,16:y,17:p,18:f,19:g,20:d,21:_,22:m,23:b,24:k,25:v,26:x})],defaultActions:{12:[2,1]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=this,r=[0],n=[null],i=[],s=this.table,o="",a=0,h=0,c=i.slice.call(arguments,1),l=Object.create(this.lexer),u={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(u.yy[y]=this.yy[y]);l.setInput(t,u.yy),u.yy.lexer=l,u.yy.parser=this,void 0===l.yylloc&&(l.yylloc={});var p=l.yylloc;i.push(p);var f=l.options&&l.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,d,_,m,b,k,v,x,P,$={};;){if(d=r[r.length-1],this.defaultActions[d]?_=this.defaultActions[d]:(null==g&&(P=void 0,"number"!=typeof(P=l.lex()||1)&&(P=e.symbols_[P]||P),g=P),_=s[d]&&s[d][g]),void 0===_||!_.length||!_[0]){var E="";for(b in x=[],s[d])this.terminals_[b]&&b>2&&x.push("'"+this.terminals_[b]+"'");E=l.showPosition?"Parse error on line "+(a+1)+":\n"+l.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(E,{text:l.match,token:this.terminals_[g]||g,line:l.yylineno,loc:p,expected:x})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+d+", token: "+g);switch(_[0]){case 1:r.push(g),n.push(l.yytext),i.push(l.yylloc),r.push(_[1]),g=null,h=l.yyleng,o=l.yytext,a=l.yylineno,p=l.yylloc;break;case 2:if(k=this.productions_[_[1]][1],$.$=n[n.length-k],$._$={first_line:i[i.length-(k||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(k||1)].first_column,last_column:i[i.length-1].last_column},f&&($._$.range=[i[i.length-(k||1)].range[0],i[i.length-1].range[1]]),void 0!==(m=this.performAction.apply($,[o,h,a,u.yy,_[1],n,i].concat(c))))return m;k&&(r=r.slice(0,-1*k*2),n=n.slice(0,-1*k),i=i.slice(0,-1*k)),r.push(this.productions_[_[1]][0]),n.push($.$),i.push($._$),v=s[r[r.length-2]][r[r.length-1]],r.push(v);break;case 3:return!0}}return!0}};function O(t,e){return"function"==typeof t?t(e):t}function N(t,e){return t&&(t=t.map((function(t){return O(t,e)}))),t}function R(t,e,r,n){return t[r].apply(t,N(n,e))}function j(t,e,r,n,i){var s,o,a;if((s="string"==typeof r?i?r.split("."):[r]:r).length>1){var h=s.pop();o=(a=t.getDotProperty(e,s))[h]}else o=t.getProperty(e,r),a=t;return null==o&&(o=t.getProperty(e,"defaultHandler"),a=t),o.apply(a,N(n,e))}var D={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,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 t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),r.length-1&&(this.yylineno-=r.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:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),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(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,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))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;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 t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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 t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},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(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,n){switch(r){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}}};function L(){this.yy={}}return T.lexer=D,L.prototype=T,T.Parser=L,new L}();void 0!==e&&(t.parser=r,t.Parser=r.Parser,t.parse=function(){return r.parse.apply(r,arguments)})}(r);var n=t(r),i=function(t,e,r,n){if(void 0===n&&(n=!0),t&&"number"!=typeof t&&"string"!=typeof t){if(e in t)return t[e];if(n&&(Array.isArray(e)||-1!==e.indexOf("."))){for(var i=Array.isArray(e)?e:e.split("."),s=t,o=0;o<i.length;o++){if(!((e=i[o])in s)){s=r;break}s=s[e]}return s}return r}return r};class s extends n.Parser{getProperty(t,e,r){var n=i(t,e,void 0,!1);return void 0!==n?n:i(this,e,r,!1)}getDotProperty(t,e,r){var n=i(t,e,void 0,!0);return void 0!==n?n:i(this,e,r,!0)}static GetProperty(t,e,r,n){return i(t,e,r,n)}_add(t,e){return t+e}_subtract(t,e){return t-e}_multiply(t,e){return t*e}_divide(t,e){return t/e}_mod(t,e){return t%e}_pow(t,e){return Math.pow(t,e)}_greaterThen(t,e){return t>e}_lessThen(t,e){return t<e}_equalTo(t,e){return t==e}_or(t,e){return t||e}_and(t,e){return t&&e}defaultHandler(t,e){return 0}compile(t){return this.parse(t)}exec(t,e){return"string"==typeof t&&(t=this.compile(t)),t(e)}}class o{constructor(t){void 0===t&&(t={});var e=t.delimiters;void 0===e&&(e=["{{","}}"]),this.setDelimiters(e[0],e[1]);var r=t.expressionParser;void 0===r&&(r=new s),this.setExpressionParser(r)}setDelimiters(t,e){return void 0===e&&(e=t[1],t=t[0]),this.delimiterLeft=t,this.delimiterRight=e,this.reDelimiter=RegExp(`${t}|${e}`,"gi"),this.reSplit=RegExp(`${t}.*?${e}`,"gi"),this}setExpressionParser(t){return this.expressionParser=t,this}compile(t,e){var r,n,i;if(e)if(e instanceof s)(c=e)&&(i=this.expressionParser,this.setExpressionParser(c));else{var o=e.delimiters;o&&(r=this.delimiterLeft,n=this.delimiterRight,this.setDelimiters(o[0],o[1])),(c=e.expressionParser)&&(i=this.expressionParser,this.setExpressionParser(c))}for(var a=this.reDelimiter,h=this.reSplit,c=this.expressionParser,l=[],u=0;;){var y=h.exec(t);if(!y)break;var p=y[0],f=h.lastIndex,g=f-p.length;u<g&&l.push(t.substring(u,g));var d=t.substring(g,f).replace(a,"");l.push(c.compile(d)),u=f}var _=t.length;return u<_&&l.push(t.substring(u,_)),r&&this.setDelimiters(r,n),i&&this.setExpressionParser(i),function(t){return l.map((function(e){return"function"==typeof e&&(e=e(t)),e})).join("")}}render(t,e,r){return("string"==typeof t?this.compile(t,r):t)(e)}}var a=new o,h=function(t,e){return a.compile(t,e)},c=function(t){return null==t||""===t||0===t.length};class l extends Phaser.Plugins.BasePlugin{constructor(t){super(t)}start(){this.game.events.on("destroy",this.destroy,this)}add(t){return new o(t)}compile(t,e){return h(t,e)}render(t,e,r){return function(t,e,r){return("string"==typeof t?h(t,r):t)(e)}(t,e,r)}createProxyContext(t,e){return function(t,e){if(!t.hasOwnProperty("has"))throw"Need has(target, key):boolean handler";if(!t.hasOwnProperty("get"))throw"Need get(target, key):any handler";return void 0===e&&(e={}),new Proxy(e,{has:t.has,get:t.get})}(t,e)}}return function(t,e,r,n){if(void 0===n&&(n="."),"object"==typeof t)if(c(e)){if(null==r)return;"object"==typeof r&&(t=r)}else{"string"==typeof e&&(e=e.split(n));var i=e.pop(),s=function(t,e,r){var n=t;if(c(e));else{var i;"string"==typeof e&&(e=e.split("."));for(var s=0,o=e.length;s<o;s++){var a;null!=n[i=e[s]]&&"object"==typeof n[i]||(a=s===o-1?void 0===r?{}:r:{},n[i]=a),n=n[i]}}return n}(t,e);s[i]=r}}(window,"RexPlugins.StringTemplate",o),l},"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).rexstringtemplateplugin=e();