assassin-bug/framework/engine.js

2 lines
322 KiB
JavaScript
Raw Permalink Normal View History

2021-11-04 19:58:37 +00:00
var Engine;(()=>{"use strict";var t={729:t=>{var e=Object.prototype.hasOwnProperty,s="~";function i(){}function n(t,e,s){this.fn=t,this.context=e,this.once=s||!1}function h(t,e,i,h,a){if("function"!=typeof i)throw new TypeError("The listener must be a function");var u=new n(i,h||t,a),r=s?s+e:e;return t._events[r]?t._events[r].fn?t._events[r]=[t._events[r],u]:t._events[r].push(u):(t._events[r]=u,t._eventsCount++),t}function a(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function u(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(s=!1)),u.prototype.eventNames=function(){var t,i,n=[];if(0===this._eventsCount)return n;for(i in t=this._events)e.call(t,i)&&n.push(s?i.slice(1):i);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},u.prototype.listeners=function(t){var e=s?s+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,h=i.length,a=new Array(h);n<h;n++)a[n]=i[n].fn;return a},u.prototype.listenerCount=function(t){var e=s?s+t:t,i=this._events[e];return i?i.fn?1:i.length:0},u.prototype.emit=function(t,e,i,n,h,a){var u=s?s+t:t;if(!this._events[u])return!1;var r,l,o=this._events[u],c=arguments.length;if(o.fn){switch(o.once&&this.removeListener(t,o.fn,void 0,!0),c){case 1:return o.fn.call(o.context),!0;case 2:return o.fn.call(o.context,e),!0;case 3:return o.fn.call(o.context,e,i),!0;case 4:return o.fn.call(o.context,e,i,n),!0;case 5:return o.fn.call(o.context,e,i,n,h),!0;case 6:return o.fn.call(o.context,e,i,n,h,a),!0}for(l=1,r=new Array(c-1);l<c;l++)r[l-1]=arguments[l];o.fn.apply(o.context,r)}else{var d,v=o.length;for(l=0;l<v;l++)switch(o[l].once&&this.removeListener(t,o[l].fn,void 0,!0),c){case 1:o[l].fn.call(o[l].context);break;case 2:o[l].fn.call(o[l].context,e);break;case 3:o[l].fn.call(o[l].context,e,i);break;case 4:o[l].fn.call(o[l].context,e,i,n);break;default:if(!r)for(d=1,r=new Array(c-1);d<c;d++)r[d-1]=arguments[d];o[l].fn.apply(o[l].context,r)}}return!0},u.prototype.on=function(t,e,s){return h(this,t,e,s,!1)},u.prototype.once=function(t,e,s){return h(this,t,e,s,!0)},u.prototype.removeListener=function(t,e,i,n){var h=s?s+t:t;if(!this._events[h])return this;if(!e)return a(this,h),this;var u=this._events[h];if(u.fn)u.fn!==e||n&&!u.once||i&&u.context!==i||a(this,h);else{for(var r=0,l=[],o=u.length;r<o;r++)(u[r].fn!==e||n&&!u[r].once||i&&u[r].context!==i)&&l.push(u[r]);l.length?this._events[h]=1===l.length?l[0]:l:a(this,h)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=s?s+t:t,this._events[e]&&a(this,e)):(this._events=new i,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=s,u.EventEmitter=u,t.exports=u}},e={};function s(i){var n=e[i];if(void 0!==n)return n.exports;var h=e[i]={exports:{}};return t[i](h,h.exports,s),h.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{s.r(i),s.d(i,{AssetManager:()=>v,BaseItem:()=>T,CheckboxItem:()=>R,EditItem:()=>B,EventBus:()=>m,EventItem:()=>p,Input:()=>I,Menu:()=>Q,MenuItem:()=>$,SelectorItem:()=>V,SliderItem:()=>U,TTS:()=>F,World:()=>f});var t=s(729),e=s.n(t);function n(t,e){return t?`${t}/${e}`:e}var h=function(t,e,s,i){return new(s||(s=Promise))((function(n,h){function a(t){try{r(i.next(t))}catch(t){h(t)}}function u(t){try{r(i.throw(t))}catch(t){h(t)}}function r(t){var e;t.done?n(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(a,u)}r((i=i.apply(t,e||[])).next())}))};class a extends(e()){constructor(t,e,s=""){super(),this.storage=t,this.queue=e,this.basePath=s}setBasePath(t){this.basePath=this.basePath}download(){return h(this,void 0,void 0,(function*(){const t=new Map;let e=0;for(;this
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW5naW5lLmpzIiwibWFwcGluZ3MiOiI2Q0FFQSxJQUFJQSxFQUFNQyxPQUFPQyxVQUFVQyxlQUN2QkMsRUFBUyxJQVNiLFNBQVNDLEtBNEJULFNBQVNDLEVBQUdDLEVBQUlDLEVBQVNDLEdBQ3ZCQyxLQUFLSCxHQUFLQSxFQUNWRyxLQUFLRixRQUFVQSxFQUNmRSxLQUFLRCxLQUFPQSxJQUFRLEVBY3RCLFNBQVNFLEVBQVlDLEVBQVNDLEVBQU9OLEVBQUlDLEVBQVNDLEdBQ2hELEdBQWtCLG1CQUFQRixFQUNULE1BQU0sSUFBSU8sVUFBVSxtQ0FHdEIsSUFBSUMsRUFBVyxJQUFJVCxFQUFHQyxFQUFJQyxHQUFXSSxFQUFTSCxHQUMxQ08sRUFBTVosRUFBU0EsRUFBU1MsRUFBUUEsRUFNcEMsT0FKS0QsRUFBUUssUUFBUUQsR0FDWEosRUFBUUssUUFBUUQsR0FBS1QsR0FDMUJLLEVBQVFLLFFBQVFELEdBQU8sQ0FBQ0osRUFBUUssUUFBUUQsR0FBTUQsR0FEaEJILEVBQVFLLFFBQVFELEdBQUtFLEtBQUtILElBRGxDSCxFQUFRSyxRQUFRRCxHQUFPRCxFQUFVSCxFQUFRTyxnQkFJN0RQLEVBVVQsU0FBU1EsRUFBV1IsRUFBU0ksR0FDSSxL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