@drincs/pixi-vn 1.9.4 → 1.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +186 -170
  2. package/dist/{ContainerMemory-DNqSVzLY.d.cts → ContainerMemory-De04YSUc.d.cts} +2 -1
  3. package/dist/{ContainerMemory-DNqSVzLY.d.ts → ContainerMemory-De04YSUc.d.ts} +2 -1
  4. package/dist/canvas.cjs +2 -2
  5. package/dist/canvas.d.cts +1008 -918
  6. package/dist/canvas.d.ts +1008 -918
  7. package/dist/canvas.mjs +2 -2
  8. package/dist/characters.cjs +1 -1
  9. package/dist/characters.d.cts +3 -2
  10. package/dist/characters.d.ts +3 -2
  11. package/dist/characters.mjs +1 -1
  12. package/dist/{chunk-S7HZUIEI.mjs → chunk-A5FN4SNI.mjs} +1 -1
  13. package/dist/chunk-B46NFIFC.mjs +1 -0
  14. package/dist/chunk-FPMP2OWB.mjs +1 -0
  15. package/dist/{chunk-6OABTG5R.mjs → chunk-OJKUK6GL.mjs} +1 -1
  16. package/dist/{chunk-5MVDNAT4.mjs → chunk-WYGKBGMH.mjs} +1 -1
  17. package/dist/chunk-XLRCR56W.mjs +1 -0
  18. package/dist/core.d.cts +12 -5
  19. package/dist/core.d.ts +12 -5
  20. package/dist/filters.cjs +1 -1
  21. package/dist/filters.d.cts +18 -3
  22. package/dist/filters.d.ts +18 -3
  23. package/dist/filters.mjs +1 -1
  24. package/dist/history.cjs +1 -1
  25. package/dist/history.d.cts +10 -5
  26. package/dist/history.d.ts +10 -5
  27. package/dist/history.mjs +1 -1
  28. package/dist/index.cjs +2 -2
  29. package/dist/index.d.cts +16 -7
  30. package/dist/index.d.ts +16 -7
  31. package/dist/index.mjs +2 -2
  32. package/dist/motion.cjs +1 -1
  33. package/dist/motion.d.cts +8 -2
  34. package/dist/motion.d.ts +8 -2
  35. package/dist/motion.mjs +1 -1
  36. package/dist/narration.cjs +2 -2
  37. package/dist/narration.d.cts +7 -2
  38. package/dist/narration.d.ts +7 -2
  39. package/dist/narration.mjs +1 -1
  40. package/dist/pixi/browser.js +182 -148
  41. package/dist/sound.cjs +1 -1
  42. package/dist/sound.d.cts +3 -2
  43. package/dist/sound.d.ts +3 -2
  44. package/dist/sound.mjs +1 -1
  45. package/dist/storage.cjs +1 -1
  46. package/dist/storage.d.cts +7 -2
  47. package/dist/storage.d.ts +7 -2
  48. package/dist/storage.mjs +1 -1
  49. package/dist/tickers.cjs +1 -1
  50. package/dist/tickers.d.cts +72 -1
  51. package/dist/tickers.d.ts +72 -1
  52. package/dist/tickers.mjs +1 -1
  53. package/dist/vite-listener.mjs +1 -1
  54. package/dist/vite.cjs +1 -1
  55. package/dist/vite.d.cts +2 -1
  56. package/dist/vite.d.ts +2 -1
  57. package/dist/vite.mjs +1 -1
  58. package/dist/worker.cjs +1 -1
  59. package/dist/worker.d.cts +2 -1
  60. package/dist/worker.d.ts +2 -1
  61. package/package.json +11 -10
  62. package/dist/chunk-AW5XWF24.mjs +0 -1
  63. package/dist/chunk-K7JIC2F2.mjs +0 -1
package/dist/canvas.cjs CHANGED
@@ -1,2 +1,2 @@
1
- 'use strict';var core=require('@drincs/pixi-vn/core'),ut=require('@drincs/pixi-vn/pixi.js'),tickers=require('@drincs/pixi-vn/tickers'),devtools=require('@pixi/devtools'),filters=require('@drincs/pixi-vn/filters');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var ut__default=/*#__PURE__*/_interopDefault(ut);var pn=Object.defineProperty;var zi=t=>{throw TypeError(t)};var gn=(t,e,i)=>e in t?pn(t,e,{enumerable:true,configurable:true,writable:true,value:i}):t[e]=i;var ve=(t,e,i)=>gn(t,typeof e!="symbol"?e+"":e,i),oi=(t,e,i)=>e.has(t)||zi("Cannot "+i);var s=(t,e,i)=>(oi(t,e,"read from private field"),i?i.call(t):e.get(t)),te=(t,e,i)=>e.has(t)?zi("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),z=(t,e,i,n)=>(oi(t,e,"write to private field"),e.set(t,i),i),F=(t,e,i)=>(oi(t,e,"access private method"),i);var Ut=(t,e,i,n)=>({set _(o){z(t,e,o);},get _(){return s(t,e,n)}});var mn={extension:{type:"sceneProperties",name:"additional-positions"},testNode(t){return "xAlign"in t||"yAlign"in t||"percentageX"in t||"percentageY"in t||"positionType"in t},testProp(t){switch(t){case "xAlign":case "yAlign":case "percentageX":case "percentageY":case "positionType":return true;default:return false}},setProperty(t,e,i){switch(e){case "xAlign":"xAlign"in t&&(t.xAlign=i/100);break;case "yAlign":"yAlign"in t&&(t.yAlign=i/100);break;case "percentageX":"percentageX"in t&&(t.percentageX=i/100);break;case "percentageY":"percentageY"in t&&(t.percentageY=i/100);break}},getProperties(t){return [{value:t.positionType,prop:"positionType",entry:{section:"Transform",type:"text",label:"Position Type"}},{value:t.xAlign*100,prop:"xAlign",entry:{section:"Transform",type:"range",label:"X Align",tooltip:"0% is left, 100% is right",options:{min:0,max:100}}},{value:t.yAlign*100,prop:"yAlign",entry:{section:"Transform",type:"range",label:"Y Align",tooltip:"0% is top, 100% is bottom",options:{min:0,max:100}}},{value:t.percentageX*100,prop:"percentageX",entry:{section:"Transform",type:"range",label:"X Percentage Position",tooltip:"0% is left, 100% is right",options:{min:0,max:100}}},{value:t.percentageY*100,prop:"percentageY",entry:{section:"Transform",type:"range",label:"Y Percentage Position",tooltip:"0% is top, 100% is bottom",options:{min:0,max:100}}}]}},Yi=mn;var Le="__game_layer__",yt="Container",Wt="ImageContainer",xt="Image",Pt="Sprite",vt="Text",It="Video";var k;(o=>(o.log=(l,...c)=>console.log(`[Pixi\u2019VN] ${l}`,...c),o.warn=(l,...c)=>console.warn(`[Pixi\u2019VN] ${l}`,...c),o.error=(l,...c)=>console.error(`[Pixi\u2019VN] ${l}`,...c),o.info=(l,...c)=>console.info(`[Pixi\u2019VN] ${l}`,...c)))(k||={});function Ui(t,e){let i=0;return async(...n)=>{let o=Date.now();if(o-i>=e)return i=o,await t(...n)}}var fe=class t{constructor(){}static _app=void 0;static get app(){if(!t._app)throw k.error("The canvas is not initialized"),new core.PixiError("invalid_usage","CanvasManagerStatic.app is undefined");return t._app}static get gameLayer(){let e=t.app.stage.getChildByLabel(Le);return e||(e=new ut__default.default.Container,e.label=Le,t.app.stage.addChild(e)),e}static htmlLayers=[];static canvasWidth=300;static canvasHeight=300;static _isInitialized=false;static async init(e,i,n){let{id:o="pixi-vn-canvas",width:l=800,height:c=600,resolution:y=1,autoDensity:x=true,resizeMode:u="contain",...P}=i||{};return t.canvasWidth=l,t.canvasHeight=c,t._app=new ut__default.default.Application,t.app.init({width:l,height:c,resolution:y,autoDensity:x,...P}).then(()=>{let{app:b=t.app,extensions:A=[],...L}=n||{};if(devtools.initDevtools({app:b,extensions:[Yi,...A],...L}),t._isInitialized=true,t.addCanvasIntoHTMLElement(e,o),u==="contain"){let H=Ui(async()=>{requestAnimationFrame(()=>t.resize());},10);new ResizeObserver(H).observe(e),t.resize(),setTimeout(()=>t.resize(),750);}t.gameLayer;})}static addCanvasIntoHTMLElement(e,i){t._isInitialized?(e.appendChild(t.app.canvas),t.app.canvas.id=i):k.error("GameWindowManager is not initialized");}static addHtmlLayer(e,i,n={}){let{position:o="absolute",pointerEvents:l="none",userSelect:c="none"}=n,y=document.createElement("div");y.setAttribute("id",e),y.style.position=o,y.style.pointerEvents=l,y.style.userSelect=c;let x=i.appendChild(y);return t.htmlLayers.push(y),t.resize(),x}static removeHtmlLayer(e){let i=t.htmlLayers.find(n=>n.id===e);i&&(i.remove(),t.htmlLayers=t.htmlLayers.filter(n=>n.id!==e));}static getHtmlLayer(e){return t.htmlLayers.find(i=>i.id===e)}static async resize(){let e=t.canvasWidth,i=t.canvasHeight,n=t.app.resizeTo,o=t.app.canvas.style;n instanceof HTMLElement||(n=document.documentElement);let l,c;if(n===document.body||n===document.documentElement)l=document.documentElement.clientWidth||window.innerWidth,c=document.documentElement.clientHeight||window.innerHeight;else {let A=n.getBoundingClientRect();l=A.width||n.clientWidth,c=A.height||n.clientHeight;}let y=Math.min(l/e,c/i),x=Math.floor(y*e),u=Math.floor(y*i);o.width=`${x}px`,o.height=`${u}px`;let P=(l-x)/2,b=(c-u)/2;o.marginLeft=`${P}px`,o.marginRight=`${P}px`,o.marginTop=`${b}px`,o.marginBottom=`${b}px`,t.htmlLayers.forEach(A=>{A.style.width=`${x}px`,A.style.height=`${u}px`,A.style.marginLeft=`${P}px`,A.style.marginRight=`${P}px`,A.style.marginTop=`${b}px`,A.style.marginBottom=`${b}px`;});}static get childrenAliasesOrder(){return t.gameLayer.children.filter(e=>e.label).sort((e,i)=>t.gameLayer.getChildIndex(e)-t.gameLayer.getChildIndex(i)).map(e=>e.label)}};var Pn=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Vi=new Set,ai=typeof process=="object"&&process?process:{},$i=(t,e,i,n)=>{typeof ai.emitWarning=="function"?ai.emitWarning(t,e,i,n):console.error(`[${i}] ${e}: ${t}`);},Vt=globalThis.AbortController,Hi=globalThis.AbortSignal;if(typeof Vt>"u"){Hi=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,n){this._onabort.push(n);}},Vt=class{constructor(){e();}signal=new Hi;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let n of this.signal._onabort)n(i);this.signal.onabort?.(i);}}};let t=ai.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=false,$i("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e));};}var vn=t=>!Vi.has(t);var et=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Xi=t=>et(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Ht:null:null,Ht=class extends Array{constructor(t){super(t),this.fill(0);}},je,Tt,In=(je=class{heap;length;static create(e){let i=Xi(e);if(!i)return [];z(je,Tt,true);let n=new je(e,i);return z(je,Tt,false),n}constructor(e,i){if(!s(je,Tt))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new i(e),this.length=0;}push(e){this.heap[this.length++]=e;}pop(){return this.heap[--this.length]}},Tt=new WeakMap,te(je,Tt,false),je),Gi,Ni,ke,Ee,ze,at,Ye,Ct,bt,Ue,ge,We,he,le,q,be,Oe,Te,ye,He,xe,Ge,Ne,_e,Me,Ve,rt,we,wt,R,li,lt,Je,Rt,Re,Ki,ct,St,Dt,tt,it,ci,Gt,Nt,ae,di,Mt,nt,ui,At,ji=(At=class{constructor(e){te(this,R);te(this,ke);te(this,Ee);te(this,ze);te(this,at);te(this,Ye);te(this,Ct);te(this,bt);te(this,Ue);ve(this,"ttl");ve(this,"ttlResolution");ve(this,"ttlAutopurge");ve(this,"updateAgeOnGet");ve(this,"updateAgeOnHas");ve(this,"allowStale");ve(this,"noDisposeOnSet");ve(this,"noUpdateTTL");ve(this,"maxEntrySize");ve(this,"sizeCalculation");ve(this,"noDeleteOnFetchRejection");ve(this,"noDeleteOnStaleGet");ve(this,"allowStaleOnFetchAbort");ve(this,"allowStaleOnFetchRejection");ve(this,"ignoreFetchAbort");te(this,ge);te(this,We);te(this,he);te(this,le);te(this,q);te(this,be);te(this,Oe);te(this,Te);te(this,ye);te(this,He);te(this,xe);te(this,Ge);te(this,Ne);te(this,_e);te(this,Me);te(this,Ve);te(this,rt);te(this,we);te(this,wt);te(this,lt,()=>{});te(this,Je,()=>{});te(this,Rt,()=>{});te(this,Re,()=>false);te(this,ct,e=>{});te(this,St,(e,i,n)=>{});te(this,Dt,(e,i,n,o)=>{if(n||o)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});ve(this,Gi,"LRUCache");let{max:i=0,ttl:n,ttlResolution:o=1,ttlAutopurge:l,updateAgeOnGet:c,updateAgeOnHas:y,allowStale:x,dispose:u,onInsert:P,disposeAfter:b,noDisposeOnSet:A,noUpdateTTL:L,maxSize:H=0,maxEntrySize:Y=0,sizeCalculation:re,fetchMethod:w,memoMethod:N,noDeleteOnFetchRejection:G,noDeleteOnStaleGet:M,allowStaleOnFetchRejection:D,allowStaleOnFetchAbort:V,ignoreFetchAbort:j,perf:J}=e;if(J!==void 0&&typeof J?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(z(this,Ue,J??Pn),i!==0&&!et(i))throw new TypeError("max option must be a nonnegative integer");let U=i?Xi(i):Array;if(!U)throw new Error("invalid max value: "+i);if(z(this,ke,i),z(this,Ee,H),this.maxEntrySize=Y||s(this,Ee),this.sizeCalculation=re,this.sizeCalculation){if(!s(this,Ee)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(N!==void 0&&typeof N!="function")throw new TypeError("memoMethod must be a function if defined");if(z(this,bt,N),w!==void 0&&typeof w!="function")throw new TypeError("fetchMethod must be a function if specified");if(z(this,Ct,w),z(this,rt,!!w),z(this,he,new Map),z(this,le,new Array(i).fill(void 0)),z(this,q,new Array(i).fill(void 0)),z(this,be,new U(i)),z(this,Oe,new U(i)),z(this,Te,0),z(this,ye,0),z(this,He,In.create(i)),z(this,ge,0),z(this,We,0),typeof u=="function"&&z(this,ze,u),typeof P=="function"&&z(this,at,P),typeof b=="function"?(z(this,Ye,b),z(this,xe,[])):(z(this,Ye,void 0),z(this,xe,void 0)),z(this,Ve,!!s(this,ze)),z(this,wt,!!s(this,at)),z(this,we,!!s(this,Ye)),this.noDisposeOnSet=!!A,this.noUpdateTTL=!!L,this.noDeleteOnFetchRejection=!!G,this.allowStaleOnFetchRejection=!!D,this.allowStaleOnFetchAbort=!!V,this.ignoreFetchAbort=!!j,this.maxEntrySize!==0){if(s(this,Ee)!==0&&!et(s(this,Ee)))throw new TypeError("maxSize must be a positive integer if specified");if(!et(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");F(this,R,Ki).call(this);}if(this.allowStale=!!x,this.noDeleteOnStaleGet=!!M,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!y,this.ttlResolution=et(o)||o===0?o:1,this.ttlAutopurge=!!l,this.ttl=n||0,this.ttl){if(!et(this.ttl))throw new TypeError("ttl must be a positive integer if specified");F(this,R,li).call(this);}if(s(this,ke)===0&&this.ttl===0&&s(this,Ee)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!s(this,ke)&&!s(this,Ee)){let W="LRU_CACHE_UNBOUNDED";vn(W)&&(Vi.add(W),$i("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",W,At));}}get perf(){return s(this,Ue)}static unsafeExposeInternals(e){return {starts:s(e,Ne),ttls:s(e,_e),autopurgeTimers:s(e,Me),sizes:s(e,Ge),keyMap:s(e,he),keyList:s(e,le),valList:s(e,q),next:s(e,be),prev:s(e,Oe),get head(){return s(e,Te)},get tail(){return s(e,ye)},free:s(e,He),isBackgroundFetch:i=>{var n;return F(n=e,R,ae).call(n,i)},backgroundFetch:(i,n,o,l)=>{var c;return F(c=e,R,Nt).call(c,i,n,o,l)},moveToTail:i=>{var n;return F(n=e,R,Mt).call(n,i)},indexes:i=>{var n;return F(n=e,R,tt).call(n,i)},rindexes:i=>{var n;return F(n=e,R,it).call(n,i)},isStale:i=>{var n;return s(n=e,Re).call(n,i)}}}get max(){return s(this,ke)}get maxSize(){return s(this,Ee)}get calculatedSize(){return s(this,We)}get size(){return s(this,ge)}get fetchMethod(){return s(this,Ct)}get memoMethod(){return s(this,bt)}get dispose(){return s(this,ze)}get onInsert(){return s(this,at)}get disposeAfter(){return s(this,Ye)}getRemainingTTL(e){return s(this,he).has(e)?1/0:0}*entries(){for(let e of F(this,R,tt).call(this))s(this,q)[e]!==void 0&&s(this,le)[e]!==void 0&&!F(this,R,ae).call(this,s(this,q)[e])&&(yield [s(this,le)[e],s(this,q)[e]]);}*rentries(){for(let e of F(this,R,it).call(this))s(this,q)[e]!==void 0&&s(this,le)[e]!==void 0&&!F(this,R,ae).call(this,s(this,q)[e])&&(yield [s(this,le)[e],s(this,q)[e]]);}*keys(){for(let e of F(this,R,tt).call(this)){let i=s(this,le)[e];i!==void 0&&!F(this,R,ae).call(this,s(this,q)[e])&&(yield i);}}*rkeys(){for(let e of F(this,R,it).call(this)){let i=s(this,le)[e];i!==void 0&&!F(this,R,ae).call(this,s(this,q)[e])&&(yield i);}}*values(){for(let e of F(this,R,tt).call(this))s(this,q)[e]!==void 0&&!F(this,R,ae).call(this,s(this,q)[e])&&(yield s(this,q)[e]);}*rvalues(){for(let e of F(this,R,it).call(this))s(this,q)[e]!==void 0&&!F(this,R,ae).call(this,s(this,q)[e])&&(yield s(this,q)[e]);}[(Ni=Symbol.iterator,Gi=Symbol.toStringTag,Ni)](){return this.entries()}find(e,i={}){for(let n of F(this,R,tt).call(this)){let o=s(this,q)[n],l=F(this,R,ae).call(this,o)?o.__staleWhileFetching:o;if(l!==void 0&&e(l,s(this,le)[n],this))return this.get(s(this,le)[n],i)}}forEach(e,i=this){for(let n of F(this,R,tt).call(this)){let o=s(this,q)[n],l=F(this,R,ae).call(this,o)?o.__staleWhileFetching:o;l!==void 0&&e.call(i,l,s(this,le)[n],this);}}rforEach(e,i=this){for(let n of F(this,R,it).call(this)){let o=s(this,q)[n],l=F(this,R,ae).call(this,o)?o.__staleWhileFetching:o;l!==void 0&&e.call(i,l,s(this,le)[n],this);}}purgeStale(){let e=false;for(let i of F(this,R,it).call(this,{allowStale:true}))s(this,Re).call(this,i)&&(F(this,R,nt).call(this,s(this,le)[i],"expire"),e=true);return e}info(e){let i=s(this,he).get(e);if(i===void 0)return;let n=s(this,q)[i],o=F(this,R,ae).call(this,n)?n.__staleWhileFetching:n;if(o===void 0)return;let l={value:o};if(s(this,_e)&&s(this,Ne)){let c=s(this,_e)[i],y=s(this,Ne)[i];if(c&&y){let x=c-(s(this,Ue).now()-y);l.ttl=x,l.start=Date.now();}}return s(this,Ge)&&(l.size=s(this,Ge)[i]),l}dump(){let e=[];for(let i of F(this,R,tt).call(this,{allowStale:true})){let n=s(this,le)[i],o=s(this,q)[i],l=F(this,R,ae).call(this,o)?o.__staleWhileFetching:o;if(l===void 0||n===void 0)continue;let c={value:l};if(s(this,_e)&&s(this,Ne)){c.ttl=s(this,_e)[i];let y=s(this,Ue).now()-s(this,Ne)[i];c.start=Math.floor(Date.now()-y);}s(this,Ge)&&(c.size=s(this,Ge)[i]),e.unshift([n,c]);}return e}load(e){this.clear();for(let[i,n]of e){if(n.start){let o=Date.now()-n.start;n.start=s(this,Ue).now()-o;}this.set(i,n.value,n);}}set(e,i,n={}){var A,L,H,Y;if(i===void 0)return this.delete(e),this;let{ttl:o=this.ttl,start:l,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:y=this.sizeCalculation,status:x}=n,{noUpdateTTL:u=this.noUpdateTTL}=n,P=s(this,Dt).call(this,e,i,n.size||0,y);if(this.maxEntrySize&&P>this.maxEntrySize)return x&&(x.set="miss",x.maxEntrySizeExceeded=true),F(this,R,nt).call(this,e,"set"),this;let b=s(this,ge)===0?void 0:s(this,he).get(e);if(b===void 0)b=s(this,ge)===0?s(this,ye):s(this,He).length!==0?s(this,He).pop():s(this,ge)===s(this,ke)?F(this,R,Gt).call(this,false):s(this,ge),s(this,le)[b]=e,s(this,q)[b]=i,s(this,he).set(e,b),s(this,be)[s(this,ye)]=b,s(this,Oe)[b]=s(this,ye),z(this,ye,b),Ut(this,ge)._++,s(this,St).call(this,b,P,x),x&&(x.set="add"),u=false,s(this,wt)&&((A=s(this,at))==null||A.call(this,i,e,"add"));else {F(this,R,Mt).call(this,b);let re=s(this,q)[b];if(i!==re){if(s(this,rt)&&F(this,R,ae).call(this,re)){re.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:w}=re;w!==void 0&&!c&&(s(this,Ve)&&((L=s(this,ze))==null||L.call(this,w,e,"set")),s(this,we)&&s(this,xe)?.push([w,e,"set"]));}else c||(s(this,Ve)&&((H=s(this,ze))==null||H.call(this,re,e,"set")),s(this,we)&&s(this,xe)?.push([re,e,"set"]));if(s(this,ct).call(this,b),s(this,St).call(this,b,P,x),s(this,q)[b]=i,x){x.set="replace";let w=re&&F(this,R,ae).call(this,re)?re.__staleWhileFetching:re;w!==void 0&&(x.oldValue=w);}}else x&&(x.set="update");s(this,wt)&&this.onInsert?.(i,e,i===re?"update":"replace");}if(o!==0&&!s(this,_e)&&F(this,R,li).call(this),s(this,_e)&&(u||s(this,Rt).call(this,b,o,l),x&&s(this,Je).call(this,x,b)),!c&&s(this,we)&&s(this,xe)){let re=s(this,xe),w;for(;w=re?.shift();)(Y=s(this,Ye))==null||Y.call(this,...w);}return this}pop(){var e;try{for(;s(this,ge);){let i=s(this,q)[s(this,Te)];if(F(this,R,Gt).call(this,!0),F(this,R,ae).call(this,i)){if(i.__staleWhileFetching)return i.__staleWhileFetching}else if(i!==void 0)return i}}finally{if(s(this,we)&&s(this,xe)){let i=s(this,xe),n;for(;n=i?.shift();)(e=s(this,Ye))==null||e.call(this,...n);}}}has(e,i={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:o}=i,l=s(this,he).get(e);if(l!==void 0){let c=s(this,q)[l];if(F(this,R,ae).call(this,c)&&c.__staleWhileFetching===void 0)return false;if(s(this,Re).call(this,l))o&&(o.has="stale",s(this,Je).call(this,o,l));else return n&&s(this,lt).call(this,l),o&&(o.has="hit",s(this,Je).call(this,o,l)),true}else o&&(o.has="miss");return false}peek(e,i={}){let{allowStale:n=this.allowStale}=i,o=s(this,he).get(e);if(o===void 0||!n&&s(this,Re).call(this,o))return;let l=s(this,q)[o];return F(this,R,ae).call(this,l)?l.__staleWhileFetching:l}async fetch(e,i={}){let{allowStale:n=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:y=this.noDisposeOnSet,size:x=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:P=this.noUpdateTTL,noDeleteOnFetchRejection:b=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:A=this.allowStaleOnFetchRejection,ignoreFetchAbort:L=this.ignoreFetchAbort,allowStaleOnFetchAbort:H=this.allowStaleOnFetchAbort,context:Y,forceRefresh:re=false,status:w,signal:N}=i;if(!s(this,rt))return w&&(w.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:o,noDeleteOnStaleGet:l,status:w});let G={allowStale:n,updateAgeOnGet:o,noDeleteOnStaleGet:l,ttl:c,noDisposeOnSet:y,size:x,sizeCalculation:u,noUpdateTTL:P,noDeleteOnFetchRejection:b,allowStaleOnFetchRejection:A,allowStaleOnFetchAbort:H,ignoreFetchAbort:L,status:w,signal:N},M=s(this,he).get(e);if(M===void 0){w&&(w.fetch="miss");let D=F(this,R,Nt).call(this,e,M,G,Y);return D.__returned=D}else {let D=s(this,q)[M];if(F(this,R,ae).call(this,D)){let U=n&&D.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",U&&(w.returnedStale=true)),U?D.__staleWhileFetching:D.__returned=D}let V=s(this,Re).call(this,M);if(!re&&!V)return w&&(w.fetch="hit"),F(this,R,Mt).call(this,M),o&&s(this,lt).call(this,M),w&&s(this,Je).call(this,w,M),D;let j=F(this,R,Nt).call(this,e,M,G,Y),J=j.__staleWhileFetching!==void 0&&n;return w&&(w.fetch=V?"stale":"refresh",J&&V&&(w.returnedStale=true)),J?j.__staleWhileFetching:j.__returned=j}}async forceFetch(e,i={}){let n=await this.fetch(e,i);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,i={}){let n=s(this,bt);if(!n)throw new Error("no memoMethod provided to constructor");let{context:o,forceRefresh:l,...c}=i,y=this.get(e,c);if(!l&&y!==void 0)return y;let x=n(e,y,{options:c,context:o});return this.set(e,x,c),x}get(e,i={}){let{allowStale:n=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,status:c}=i,y=s(this,he).get(e);if(y!==void 0){let x=s(this,q)[y],u=F(this,R,ae).call(this,x);return c&&s(this,Je).call(this,c,y),s(this,Re).call(this,y)?(c&&(c.get="stale"),u?(c&&n&&x.__staleWhileFetching!==void 0&&(c.returnedStale=true),n?x.__staleWhileFetching:void 0):(l||F(this,R,nt).call(this,e,"expire"),c&&n&&(c.returnedStale=true),n?x:void 0)):(c&&(c.get="hit"),u?x.__staleWhileFetching:(F(this,R,Mt).call(this,y),o&&s(this,lt).call(this,y),x))}else c&&(c.get="miss");}delete(e){return F(this,R,nt).call(this,e,"delete")}clear(){return F(this,R,ui).call(this,"delete")}},ke=new WeakMap,Ee=new WeakMap,ze=new WeakMap,at=new WeakMap,Ye=new WeakMap,Ct=new WeakMap,bt=new WeakMap,Ue=new WeakMap,ge=new WeakMap,We=new WeakMap,he=new WeakMap,le=new WeakMap,q=new WeakMap,be=new WeakMap,Oe=new WeakMap,Te=new WeakMap,ye=new WeakMap,He=new WeakMap,xe=new WeakMap,Ge=new WeakMap,Ne=new WeakMap,_e=new WeakMap,Me=new WeakMap,Ve=new WeakMap,rt=new WeakMap,we=new WeakMap,wt=new WeakMap,R=new WeakSet,li=function(){let e=new Ht(s(this,ke)),i=new Ht(s(this,ke));z(this,_e,e),z(this,Ne,i);let n=this.ttlAutopurge?new Array(s(this,ke)):void 0;z(this,Me,n),z(this,Rt,(y,x,u=s(this,Ue).now())=>{i[y]=x!==0?u:0,e[y]=x,o(y,x);}),z(this,lt,y=>{i[y]=e[y]!==0?s(this,Ue).now():0,o(y,e[y]);});let o=this.ttlAutopurge?(y,x)=>{if(n?.[y]&&(clearTimeout(n[y]),n[y]=void 0),x&&x!==0&&n){let u=setTimeout(()=>{s(this,Re).call(this,y)&&F(this,R,nt).call(this,s(this,le)[y],"expire");},x+1);u.unref&&u.unref(),n[y]=u;}}:()=>{};z(this,Je,(y,x)=>{if(e[x]){let u=e[x],P=i[x];if(!u||!P)return;y.ttl=u,y.start=P,y.now=l||c();let b=y.now-P;y.remainingTTL=u-b;}});let l=0,c=()=>{let y=s(this,Ue).now();if(this.ttlResolution>0){l=y;let x=setTimeout(()=>l=0,this.ttlResolution);x.unref&&x.unref();}return y};this.getRemainingTTL=y=>{let x=s(this,he).get(y);if(x===void 0)return 0;let u=e[x],P=i[x];if(!u||!P)return 1/0;let b=(l||c())-P;return u-b},z(this,Re,y=>{let x=i[y],u=e[y];return !!u&&!!x&&(l||c())-x>u});},lt=new WeakMap,Je=new WeakMap,Rt=new WeakMap,Re=new WeakMap,Ki=function(){let e=new Ht(s(this,ke));z(this,We,0),z(this,Ge,e),z(this,ct,i=>{z(this,We,s(this,We)-e[i]),e[i]=0;}),z(this,Dt,(i,n,o,l)=>{if(F(this,R,ae).call(this,n))return 0;if(!et(o))if(l){if(typeof l!="function")throw new TypeError("sizeCalculation must be a function");if(o=l(n,i),!et(o))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return o}),z(this,St,(i,n,o)=>{if(e[i]=n,s(this,Ee)){let l=s(this,Ee)-e[i];for(;s(this,We)>l;)F(this,R,Gt).call(this,true);}z(this,We,s(this,We)+e[i]),o&&(o.entrySize=n,o.totalCalculatedSize=s(this,We));});},ct=new WeakMap,St=new WeakMap,Dt=new WeakMap,tt=function*({allowStale:e=this.allowStale}={}){if(s(this,ge))for(let i=s(this,ye);!(!F(this,R,ci).call(this,i)||((e||!s(this,Re).call(this,i))&&(yield i),i===s(this,Te)));)i=s(this,Oe)[i];},it=function*({allowStale:e=this.allowStale}={}){if(s(this,ge))for(let i=s(this,Te);!(!F(this,R,ci).call(this,i)||((e||!s(this,Re).call(this,i))&&(yield i),i===s(this,ye)));)i=s(this,be)[i];},ci=function(e){return e!==void 0&&s(this,he).get(s(this,le)[e])===e},Gt=function(e){var l;let i=s(this,Te),n=s(this,le)[i],o=s(this,q)[i];return s(this,rt)&&F(this,R,ae).call(this,o)?o.__abortController.abort(new Error("evicted")):(s(this,Ve)||s(this,we))&&(s(this,Ve)&&((l=s(this,ze))==null||l.call(this,o,n,"evict")),s(this,we)&&s(this,xe)?.push([o,n,"evict"])),s(this,ct).call(this,i),s(this,Me)?.[i]&&(clearTimeout(s(this,Me)[i]),s(this,Me)[i]=void 0),e&&(s(this,le)[i]=void 0,s(this,q)[i]=void 0,s(this,He).push(i)),s(this,ge)===1?(z(this,Te,z(this,ye,0)),s(this,He).length=0):z(this,Te,s(this,be)[i]),s(this,he).delete(n),Ut(this,ge)._--,i},Nt=function(e,i,n,o){let l=i===void 0?void 0:s(this,q)[i];if(F(this,R,ae).call(this,l))return l;let c=new Vt,{signal:y}=n;y?.addEventListener("abort",()=>c.abort(y.reason),{signal:c.signal});let x={signal:c.signal,options:n,context:o},u=(Y,re=false)=>{let{aborted:w}=c.signal,N=n.ignoreFetchAbort&&Y!==void 0,G=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&Y!==void 0);if(n.status&&(w&&!re?(n.status.fetchAborted=true,n.status.fetchError=c.signal.reason,N&&(n.status.fetchAbortIgnored=true)):n.status.fetchResolved=true),w&&!N&&!re)return b(c.signal.reason,G);let M=L,D=s(this,q)[i];return (D===L||N&&re&&D===void 0)&&(Y===void 0?M.__staleWhileFetching!==void 0?s(this,q)[i]=M.__staleWhileFetching:F(this,R,nt).call(this,e,"fetch"):(n.status&&(n.status.fetchUpdated=true),this.set(e,Y,x.options))),Y},P=Y=>(n.status&&(n.status.fetchRejected=true,n.status.fetchError=Y),b(Y,false)),b=(Y,re)=>{let{aborted:w}=c.signal,N=w&&n.allowStaleOnFetchAbort,G=N||n.allowStaleOnFetchRejection,M=G||n.noDeleteOnFetchRejection,D=L;if(s(this,q)[i]===L&&(!M||!re&&D.__staleWhileFetching===void 0?F(this,R,nt).call(this,e,"fetch"):N||(s(this,q)[i]=D.__staleWhileFetching)),G)return n.status&&D.__staleWhileFetching!==void 0&&(n.status.returnedStale=true),D.__staleWhileFetching;if(D.__returned===D)throw Y},A=(Y,re)=>{var N;let w=(N=s(this,Ct))==null?void 0:N.call(this,e,l,x);w&&w instanceof Promise&&w.then(G=>Y(G===void 0?void 0:G),re),c.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(Y(void 0),n.allowStaleOnFetchAbort&&(Y=G=>u(G,true)));});};n.status&&(n.status.fetchDispatched=true);let L=new Promise(A).then(u,P),H=Object.assign(L,{__abortController:c,__staleWhileFetching:l,__returned:void 0});return i===void 0?(this.set(e,H,{...x.options,status:void 0}),i=s(this,he).get(e)):s(this,q)[i]=H,H},ae=function(e){if(!s(this,rt))return false;let i=e;return !!i&&i instanceof Promise&&i.hasOwnProperty("__staleWhileFetching")&&i.__abortController instanceof Vt},di=function(e,i){s(this,Oe)[i]=e,s(this,be)[e]=i;},Mt=function(e){e!==s(this,ye)&&(e===s(this,Te)?z(this,Te,s(this,be)[e]):F(this,R,di).call(this,s(this,Oe)[e],s(this,be)[e]),F(this,R,di).call(this,s(this,ye),e),z(this,ye,e));},nt=function(e,i){var o,l;let n=false;if(s(this,ge)!==0){let c=s(this,he).get(e);if(c!==void 0)if(s(this,Me)?.[c]&&(clearTimeout(s(this,Me)?.[c]),s(this,Me)[c]=void 0),n=true,s(this,ge)===1)F(this,R,ui).call(this,i);else {s(this,ct).call(this,c);let y=s(this,q)[c];if(F(this,R,ae).call(this,y)?y.__abortController.abort(new Error("deleted")):(s(this,Ve)||s(this,we))&&(s(this,Ve)&&((o=s(this,ze))==null||o.call(this,y,e,i)),s(this,we)&&s(this,xe)?.push([y,e,i])),s(this,he).delete(e),s(this,le)[c]=void 0,s(this,q)[c]=void 0,c===s(this,ye))z(this,ye,s(this,Oe)[c]);else if(c===s(this,Te))z(this,Te,s(this,be)[c]);else {let x=s(this,Oe)[c];s(this,be)[x]=s(this,be)[c];let u=s(this,be)[c];s(this,Oe)[u]=s(this,Oe)[c];}Ut(this,ge)._--,s(this,He).push(c);}}if(s(this,we)&&s(this,xe)?.length){let c=s(this,xe),y;for(;y=c?.shift();)(l=s(this,Ye))==null||l.call(this,...y);}return n},ui=function(e){var i,n;for(let o of F(this,R,it).call(this,{allowStale:true})){let l=s(this,q)[o];if(F(this,R,ae).call(this,l))l.__abortController.abort(new Error("deleted"));else {let c=s(this,le)[o];s(this,Ve)&&((i=s(this,ze))==null||i.call(this,l,c,e)),s(this,we)&&s(this,xe)?.push([l,c,e]);}}if(s(this,he).clear(),s(this,q).fill(void 0),s(this,le).fill(void 0),s(this,_e)&&s(this,Ne)){s(this,_e).fill(0),s(this,Ne).fill(0);for(let o of s(this,Me)??[])o!==void 0&&clearTimeout(o);s(this,Me)?.fill(void 0);}if(s(this,Ge)&&s(this,Ge).fill(0),z(this,Te,0),z(this,ye,0),s(this,He).length=0,z(this,We,0),z(this,ge,0),s(this,we)&&s(this,xe)){let o=s(this,xe),l;for(;l=o?.shift();)(n=s(this,Ye))==null||n.call(this,...l);}},At);var Ke=class{cache;map=new Map;constructor(e){this.cache=new ji({max:e.cacheSize}),this.map=new Map;}get[Symbol.iterator](){return this.map[Symbol.iterator]}get[Symbol.toStringTag](){return this.map[Symbol.toStringTag]}clear(){this.cache.clear(),this.map.clear();}delete(e){let i=this.map.delete(e);return i&&this.cache.delete(e),i}get forEach(){return this.map.forEach}get(e){let i=this.cache.get(e);return i||this.map.get(e)}has(e){return this.map.has(e)}set(e,i){return this.map.set(e,i),this.cache.set(e,i),this}get size(){return this.map.size}entries(){return this.map.entries()}keys(){return this.map.keys()}values(){return this.map.values()}};var fi=Symbol("SerializableEvent"),Et=new Ke({cacheSize:5});function Tn(t){return (e,i,n)=>{let o=n.value;hi.add(o,t||`${i}`);}}var hi;(l=>{function t(c,y){c[fi]=y,Et.get(y)&&k.info(`Event "${y}" already exists, it will be overwritten`),Et.set(y,c);}l.add=t;function e(c){try{let y=Et.get(c);if(!y){k.error(`Event "${c}" not found, did you forget to register it with the eventDecorator?`);return}return y}catch(y){k.error(`Error while getting Event "${c}"`,y);return}}l.get=e;function i(){return Array.from(Et.values())}l.values=i;function n(c){return Et.has(c)}l.has=n;function o(){return Array.from(Et.keys())}l.keys=o;})(hi||={});var pi=hi;async function qi(t,e){if("onEvents"in e)for(let i in e.onEvents){let n=e.onEvents[i],o=pi.get(n);o&&t.on(i,o);}}function Zi(t){let{onEventsHandlers:e={}}=t;return e}function dt(t,e,i){let n=i[fi];return n&&typeof n=="string"?(e.onEventsHandlers[t]=n,true):(k.warn(`The event handler for event "${t}" is not registered with the eventDecorator, it will not be saved in the memory and it will not work after loading the game. Please register the event handler with the eventDecorator to avoid this warning. Read more about it here: https://pixi-vn.com/start/canvas-functions#add-a-listener-to-an-event`),false)}var Ot=new Ke({cacheSize:5}),Ji=new Ke({cacheSize:2}),Qi=new Ke({cacheSize:2});function bn(t={}){return e=>{gi.add(e,t);}}async function Be(t,e,i){let n=i?.ignoreScale||false,o=i?.end;if("isRenderGroup"in e&&e.isRenderGroup!==void 0&&(t.isRenderGroup=e.isRenderGroup),"blendMode"in e&&e.blendMode!==void 0&&(t.blendMode=e.blendMode),"tint"in e&&e.tint!==void 0&&(t.tint=e.tint),"alpha"in e&&e.alpha!==void 0&&(t.alpha=e.alpha),"angle"in e&&e.angle!==void 0&&(t.angle=e.angle),"renderable"in e&&e.renderable!==void 0&&(t.renderable=e.renderable),"rotation"in e&&e.rotation!==void 0&&(t.rotation=e.rotation),!n&&"scale"in e&&e.scale!==void 0&&(typeof e.scale=="number"?t.scale.set(e.scale,e.scale):t.scale.set(e.scale.x,e.scale.y)),"pivot"in e&&e.pivot!==void 0&&(typeof e.pivot=="number"?t.pivot.set(e.pivot,e.pivot):t.pivot.set(e.pivot.x,e.pivot.y)),"position"in e&&e.position!==void 0&&t.position.set(e.position.x,e.position.y),"skew"in e&&e.skew!==void 0&&t.skew.set(e.skew.x,e.skew.y),"visible"in e&&e.visible!==void 0&&(t.visible=e.visible),"x"in e&&e.x!==void 0&&(t.x=e.x),"y"in e&&e.y!==void 0&&(t.y=e.y),"boundsArea"in e&&e.boundsArea!==void 0&&(t.boundsArea=e.boundsArea),"cursor"in e&&e.cursor!==void 0&&(t.cursor=e.cursor),"eventMode"in e&&e.eventMode!==void 0&&(t.eventMode=e.eventMode),"interactive"in e&&e.interactive!==void 0&&(t.interactive=e.interactive),"interactiveChildren"in e&&e.interactiveChildren!==void 0&&(t.interactiveChildren=e.interactiveChildren),"hitArea"in e&&e.hitArea!==void 0&&(t.hitArea=e.hitArea),qi(t,e),"pixivnFilters"in e&&e.pixivnFilters!==void 0){let l=e.pixivnFilters.map(c=>filters.RegisteredFilters.getInstance(c.filterId,c.args)).filter(c=>!!c);t.filters=l.length>0?l:null;}"align"in e&&e.align!==void 0&&"align"in t&&(t.align=e.align),"percentagePosition"in e&&e.percentagePosition!==void 0&&"percentagePosition"in t&&(t.percentagePosition=e.percentagePosition),o&&await o(),n||("width"in e&&e.width!==void 0&&(t.width=e.width),"height"in e&&e.height!==void 0&&(t.height=e.height));}var gi;(y=>{function t(x,u={}){let{name:P=x.name,getInstance:b=async(L,H)=>{let Y=new L;return await Y.setMemory(H),Y},copyProperty:A=async(L,H)=>{await L.setMemory(H);}}=u;Ot.get(P)&&k.warn(`CanvasElement "${P}" already registered`),x.prototype.pixivnId=P,Ot.set(P,x),Ji.set(P,b),Qi.set(P,A);}y.add=t;function e(x){let u=Ot.get(x);if(!u){k.error(`CanvasElement "${x}" not found, did you forget to register it with the canvasComponentDecorator?`);return}return u}y.get=e;async function i(x,u){let P=e(x),b=Ji.get(x);if(!P||!b){k.error(`CanvasElement "${x}" not found, did you forget to register it with the canvasComponentDecorator?`);return}try{return await b(P,u)}catch(A){k.error(`Error while getting CanvasElement instance "${x}"`,A);}}y.getInstance=i;async function n(x,u,P){let b=Qi.get(x);if(!b){k.error(`CanvasElement "${x}" not found, did you forget to register it with the canvasComponentDecorator?`);return}try{await b(u,P);}catch(A){k.error(`Error while copying properties of CanvasElement "${x}"`,A);}}y.copyProperty=n;function o(){return Array.from(Ot.values())}y.values=o;function l(x){return Ot.has(x)}y.has=l;function c(){return Array.from(Ot.keys())}y.keys=c;})(gi||={});var Ie=gi;async function $t(t){let e=await Ie.getInstance(t.pixivnId,t);if(!e)throw new core.PixiError("unregistered_element",`The element ${t.pixivnId} could not be created`,"canvas",t);return e}function yi(t){return "memory"in t?t.memory:t instanceof ut__default.default.Text?Pi(t):t instanceof ut__default.default.Sprite?xi(t):ft(t)}function An(t){let e=t.parent;return {width:t.width,height:t.height,isRenderGroup:t.isRenderGroup,blendMode:t.blendMode,tint:t.tint,alpha:t.alpha,angle:t.angle,renderable:t.renderable,rotation:t.rotation,scale:{x:t.scale.x,y:t.scale.y},pivot:{x:t.pivot.x,y:t.pivot.y},position:{x:t.position.x,y:t.position.y},skew:{x:t.skew.x,y:t.skew.y},visible:t.visible,x:t.x,y:t.y,boundsArea:t.boundsArea,cursor:t.cursor,eventMode:t.eventMode,interactive:t.interactive,interactiveChildren:t.interactiveChildren,hitArea:t.hitArea,index:e?.getChildIndex(t),parentLabel:e?.label,label:t.label,pixivnFilters:En(t.filters)}}function En(t){if(!t)return;let e=Array.isArray(t)?t:[t],i=[];for(let n of e){let o=n.pixivnFilterId;if(!o){k.warn("A Filter instance without a registered pixivnFilterId can't be saved and will be skipped. Register it with filterDecorator/RegisteredFilters to make it save-compatible.",n);continue}let l=filters.RegisteredFilters.toMemory(o,n);l&&i.push(l);}return i}function mi(t,e){return {url:t.source.label,alias:e===t.source.label?void 0:e}}function ft(t,e){let i=On(t,yt),o=e?.childrenExport||false?t.children.sort((l,c)=>t.getChildIndex(l)-t.getChildIndex(c)).map(l=>yi(l)):[];return {pixivnId:i,elements:o,onEvents:Zi(t),...An(t)}}function xi(t){let e=ft(t),i=e.pixivnId??Pt,n="assetsAliases"in t&&Array.isArray(t.assetsAliases)?mi(t.texture,t.assetsAliases[0]):"textureAlias"in t?mi(t.texture,t.textureAlias):mi(t.texture);return {...e,pixivnId:i,textureData:n,anchor:{x:t.anchor.x,y:t.anchor.y},roundPixels:t.roundPixels}}function Pi(t){let e=ft(t),i=e.pixivnId??vt;return {...e,pixivnId:i,anchor:{x:t.anchor.x,y:t.anchor.y},text:t.text,resolution:t.resolution,style:Dn(t.style),roundPixels:t.roundPixels}}function On(t,e){return Object.hasOwn(t,"pixivnId")?t.pixivnId:e}function Xt(t){switch(t.type){case "linear":return {type:"linear",colorStops:t.colorStops,end:{x:t.end.x,y:t.end.y},start:{x:t.start.x,y:t.start.y},textureSpace:t.textureSpace,wrapMode:t.texture.source.wrapMode,textureSize:t.texture.source.width/t.texture.source.height};case "radial":return {type:"radial",colorStops:t.colorStops,textureSpace:t.textureSpace,center:{x:t.center.x,y:t.center.y},innerRadius:t.innerRadius,outerCenter:{x:t.outerCenter.x,y:t.outerCenter.y},outerRadius:t.outerRadius,rotation:t.rotation,scale:t.scale,wrapMode:t.texture.source.wrapMode,textureSize:t.texture.source.width/t.texture.source.height}}}function _n(t){if(t!=null){{if(typeof t=="number")return t;if(typeof t=="string"||Array.isArray(t))return t;if(t instanceof ut__default.default.FillGradient)return Xt(t);if(typeof t=="object"&&"fill"in t&&typeof t.fill!="function"&&t.fill){if(!(t.fill instanceof ut__default.default.FillPattern))return Xt(t.fill)}}k.warn("Unsupported property type for Text.style.fill.",t);}}function Mn(t){if(typeof t=="number")return t;if(typeof t=="string")return t;if(Array.isArray(t))return t;if(t instanceof ut__default.default.Color)return t.toNumber();k.warn("Unsupported color type.",t);}function Rn(t){if(t!=null){{if(typeof t=="number")return t;if(typeof t=="string"||Array.isArray(t))return t;if(t instanceof ut__default.default.FillGradient)return Xt(t);if(typeof t=="object"&&"alignment"in t)return {alignment:t.alignment,alpha:t.alpha,color:Mn(t.color),join:t.join,miterLimit:t.miterLimit,width:t.width,cap:t.cap,pixelLine:t.pixelLine,textureSpace:t.textureSpace};if(typeof t=="object"&&"fill"in t&&typeof t.fill!="function"&&t.fill){if(!(t.fill instanceof ut__default.default.FillPattern))return Xt(t.fill)}}k.warn("Unsupported property type for Text.style.stroke.",t);}}function Dn(t){return {align:t.align,breakWords:t.breakWords,dropShadow:t.dropShadow,fill:_n(t.fill),fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontVariant:t.fontVariant,fontWeight:t.fontWeight,leading:t.leading,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,padding:t.padding,stroke:Rn(t.stroke),textBaseline:t.textBaseline,trim:t.trim,whiteSpace:t.whiteSpace,wordWrap:t.wordWrap,wordWrapWidth:t.wordWrapWidth}}function ht(t){try{if(typeof t>"u")return t;let e=JSON.stringify(t);return JSON.parse(e)}catch(e){throw k.error("Error creating exportable element",t,e),new core.PixiError("not_json_serializable","Error creating exportable element")}}var kt=class{tickersPausedByGameLayerRender=[];get app(){return fe.app}get gameLayer(){return fe.gameLayer}get isInitialized(){return fe._isInitialized}get width(){return fe.canvasWidth}get height(){return fe.canvasHeight}get screen(){return this.app.screen}async init(e,i,n){return await fe.init(e,i,n)}get children(){return fe.gameLayer.children}async copyCanvasElementProperty(e,i,n={}){let o=["isRenderGroup","scale","visible","boundsArea","text","resolution","style","height","width"],{ignoreProperties:l=x=>x}=n;if(typeof i=="string"){let x=this.find(i);if(x)i=x;else {k.error(`Canvas element ${i} not found`);return}}if(typeof e=="string"){let x=this.find(e);if(x)e=x;else {k.error(`Canvas element ${e} not found`);return}}e instanceof ut__default.default.Container&&(e=e.memory);let c=l(o),y={...e};c.forEach(x=>{x in y&&delete y[x];}),await Ie.copyProperty(i.pixivnId,i,y);}add(e,i,n={}){if(e===Le){k.error(`The alias ${Le} is reserved`);return}let o=this.find(e),l=n?.ignoreOldStyle;o&&!l&&this.copyCanvasElementProperty(o,i);let{zIndex:c=o?.parent?.getChildIndex(o)}=n;o&&!this.canvasElementIsOnCanvas(o)?k.error(`The canvas element ${e} exist in the memory but it is not on the canvas, so the zIndex is not set`):o&&this.remove(e,{ignoreTickers:true}),c!==void 0?(i.label=e,this.gameLayer.addChildAt(i,c)):(i.label=e,this.gameLayer.addChild(i));}remove(e,i={}){if(e===Le){k.error(`The alias ${Le} is reserved`);return}let n=i.ignoreTickers;typeof e=="string"&&(e=[e]),e.forEach(o=>{this.gameLayer.getChildrenByLabel(o).forEach(l=>{this.gameLayer.removeChild(l),!n&&tickers.tickers.unlinkComponent(o);});});}find(e){if(e===Le)return this.gameLayer;let i=this.gameLayer.getChildByLabel(e);if(i)return i}canvasElementIsOnCanvas(e){return this.gameLayer.children.includes(e)}removeAll(){this.gameLayer.removeChildren();}editAlias(e,i,n={}){let o=this.find(e);o&&(o.label=i),!n.ignoreTickers&&tickers.tickers.transfer(e,i,"move");}get currentTickers(){return this.tickers.currentTickers}get currentTickersSteps(){return this.tickers.currentTickersSteps}findTicker(e){return tickers.tickers.find(e)}addTicker(e,i){return tickers.tickers.add(e,i)}addTickersSequence(e,i,n=0){return tickers.tickers.addSequence(e,i,n)}onTickerComplete(e,i){return tickers.tickers.onComplete(e,i)}unlinkComponentFromTicker(e,i){return tickers.tickers.unlinkComponent(e,i)}removeAllTickers(){return tickers.tickers.removeAll()}removeTicker(e,i={stopTicker:true}){return tickers.removeTicker(e,i)}pauseTicker(e){return tickers.tickers.pause(e)}resumeTicker(e){return tickers.tickers.resume(e)}isTickerPaused(e,i){return tickers.tickers.isPaused(e,i)}pause(){this.gameLayer.renderable!==false&&(this.gameLayer.renderable=false,this.tickersPausedByGameLayerRender=tickers.tickers.pause({id:Array.from(tickers.TickersManagerStatic._currentTickers.keys())}));}resume(){if(this.gameLayer.renderable===true)return;this.gameLayer.renderable=true;let e=this.tickersPausedByGameLayerRender.filter(i=>tickers.TickersManagerStatic._currentTickers.has(i));e.length>0&&tickers.tickers.resume({id:e}),this.tickersPausedByGameLayerRender=[];}transferTickers(e,i,n="move"){return tickers.tickers.transfer(e,i,n)}completeTickerOnStepEnd(e){return tickers.tickers.completeOnStepEnd(e)}async forceCompletionOfTicker(e,i){return tickers.tickers.forceCompletion(e,i)}tickers=tickers.tickers;animate(e,i,n,o){return core.GameUnifier.animate(e,i,n,o)}addLayerInternal(e,i){if(e===Le){k.error(`The alias ${Le} is reserved`);return}return i.label=e,fe.app.stage.addChild(i)}getLayerInternal(e){return fe.app.stage.getChildByLabel(e)}removeLayerInternal(e){let i=fe.app.stage.getChildByLabel(e);i&&fe.app.stage.removeChild(i);}addHtmlLayerInternal(e,i,n){return fe.addHtmlLayer(e,i,n)}removeHtmlLayerInternal(e){return fe.removeHtmlLayer(e)}getHtmlLayerInternal(e){return fe.getHtmlLayer(e)}addLayer(e,i){return this.addLayerInternal(e,i)}getLayer(e){return this.getLayerInternal(e)}removeLayer(e){return this.removeLayerInternal(e)}addHtmlLayer(e,i,n){return this.addHtmlLayerInternal(e,i,n)}removeHtmlLayer(e){return this.removeHtmlLayerInternal(e)}getHtmlLayer(e){return this.getHtmlLayerInternal(e)}layers={get gameLayer(){return fe.gameLayer},add:(e,i)=>this.addLayerInternal(e,i),get:e=>this.getLayerInternal(e),remove:e=>this.removeLayerInternal(e)};htmlLayers={add:(e,i,n)=>this.addHtmlLayerInternal(e,i,n),get:e=>this.getHtmlLayerInternal(e),remove:e=>this.removeHtmlLayerInternal(e)};async extractImage(){let e=this.gameLayer.renderable===false;e&&this.resume();let i;try{i=this.app.renderer.extract.image(this.app.stage);}finally{e&&this.pause();}return (await i).src}clear(){this.tickersPausedByGameLayerRender=[],tickers.tickers.removeAll(),this.removeAll();}export(){let e=this.gameLayer.renderable===false;e&&this.resume();try{let i={};return this.children.forEach(n=>{n.label&&(i[n.label]=yi(n));}),{tickers:ht(tickers.TickersManagerStatic.currentTickersWithoutCreatedBySteps()),tickersSteps:ht(tickers.TickersManagerStatic.currentTickersSequence()),elements:ht(i),stage:ht(ft(this.gameLayer)),elementAliasesOrder:ht(fe.childrenAliasesOrder),tickersToCompleteOnStepEnd:ht(tickers.TickersManagerStatic._tickersToCompleteOnStepEnd)}}finally{e&&this.pause();}}async restore(e){this.clear();try{if(Object.hasOwn(e,"elements")&&Object.hasOwn(e,"elementAliasesOrder")){let i=e.elementAliasesOrder,n={},o=Object.entries(e.elements).map(async([l,c])=>{n[l]=await $t(c);});await Promise.all(o),i.forEach(l=>{let c=n[l];c&&this.add(l,c);});}else {k.error("The data does not have the properties elementAliasesOrder and elements");return}if(Object.hasOwn(e,"stage")&&Object.hasOwn(e,"stage")?Be(this.gameLayer,e.stage,{ignoreScale:!0}):k.error("The data does not have the properties stage"),Object.hasOwn(e,"tickers")){let i=e.tickers;Object.entries(i).forEach(([n,o])=>{let l=o.canvasElementAliases;if(l.length!==0){let c=tickers.RegisteredTickers.getInstance(o.id,o.args,{duration:o.duration,priority:o.priority,id:n,canvasElementAliases:l});c?(c.canvasElementAliases=l,tickers.tickers.add(l,c),o.paused&&c.pause()):k.error(`Ticker ${o.id} not found`);}});}if(Object.hasOwn(e,"tickersSteps")){let i=e.tickersSteps;Object.entries(i).forEach(([n,o])=>{tickers.TickersManagerStatic._currentTickersSequence.set(n,new Map(Object.entries(o))),Object.keys(o).forEach(l=>{tickers.runTickersSequence(n,l);});});}if(Object.hasOwn(e,"tickersToCompleteOnStepEnd")){let i=e.tickersToCompleteOnStepEnd,n=i.tikersIds,o=i.stepAlias.map(l=>({id:l.id,alias:l.alias}));tickers.TickersManagerStatic._tickersToCompleteOnStepEnd.tikersIds.length=0,tickers.TickersManagerStatic._tickersToCompleteOnStepEnd.tikersIds.push(...n),tickers.TickersManagerStatic._tickersToCompleteOnStepEnd.stepAlias.length=0,tickers.TickersManagerStatic._tickersToCompleteOnStepEnd.stepAlias.push(...o);}}catch(i){k.error("Error importing data",i);}}};var Pe=class t{static init(e){t._getScreen=e.getScreen;}static _getScreen;static get screen(){return t._getScreen()}};exports.CanvasPropertyUtility=void 0;(x=>{function t(u,P,b,A,L,H=0){return L?u==="width"?P*(Pe.screen.width-b)+b-A-H*b:P*(Pe.screen.height-b)+b-A-H*b:u==="width"?P*(Pe.screen.width-b)+A+H*b:P*(Pe.screen.height-b)+A+H*b}x.calculatePositionByAlign=t;function e(u,P,b,A,L,H=0){return L?u==="width"?(P-b+A+H*b)/(Pe.screen.width-b):(P-b+A+H*b)/(Pe.screen.height-b):u==="width"?(P-A-H*b)/(Pe.screen.width-b):(P-A-H*b)/(Pe.screen.height-b)}x.calculateAlignByPosition=e;function i(u,P){return u==="width"?P*Pe.screen.width:P*Pe.screen.height}x.calculatePositionByPercentagePosition=i;function n(u,P){return u==="width"?P/Pe.screen.width:P/Pe.screen.height}x.calculatePercentagePositionByPosition=n;function o(u,P){if(P=P%360,P<0&&(P+=360),P===0)return {x:u.x,y:u.y};if(P===90)return {x:-u.y,y:u.x};if(P===180)return {x:-u.x,y:-u.y};if(P===270)return {x:u.y,y:-u.x};if(P>0&&P<90){let b=P*Math.PI/180,A=Math.cos(b),L=Math.sin(b),H=u.x*A-u.y*L,Y=u.x*L+u.y*A;return u.x!==0&&Math.sign(H)!==Math.sign(u.x)&&(H=-H),u.y!==0&&Math.sign(Y)!==Math.sign(u.y)&&(Y=-Y),{x:H,y:Y}}else if(P>90&&P<180){let b=(P-90)*Math.PI/180,A=Math.cos(b),L=Math.sin(b),H=-u.y*L-u.x*A,Y=u.y*A-u.x*L;return u.x!==0&&Math.sign(H)!==Math.sign(u.x)&&(H=-H),u.y!==0&&Math.sign(Y)!==Math.sign(u.y)&&(Y=-Y),{x:H,y:Y}}else if(P>180&&P<270){let b=(P-180)*Math.PI/180,A=Math.cos(b),L=Math.sin(b),H=-u.x*A+u.y*L,Y=-u.x*L-u.y*A;return u.x!==0&&Math.sign(H)!==Math.sign(u.x)&&(H=-H),u.y!==0&&Math.sign(Y)!==Math.sign(u.y)&&(Y=-Y),{x:H,y:Y}}else if(P>270&&P<360){let b=(P-270)*Math.PI/180,A=Math.cos(b),L=Math.sin(b),H=u.y*L-u.x*A,Y=-u.y*A-u.x*L;return u.x!==0&&Math.sign(H)!==Math.sign(u.x)&&(H=-H),u.y!==0&&Math.sign(Y)!==Math.sign(u.y)&&(Y=-Y),{x:H,y:Y}}return {x:0,y:0}}x.getSuperPoint=o;function l(u,P){if(P=P%360,P<0&&(P+=360),P===0)return {x:u.x,y:u.y};if(P===90)return {x:u.y,y:-u.x};if(P===180)return {x:-u.x,y:-u.y};if(P===270)return {x:-u.y,y:u.x};if(P>0&&P<90){let b=P*Math.PI/180,A=Math.cos(b),L=Math.sin(b);return {x:u.x*A+u.y*L,y:-u.x*L+u.y*A}}else if(P>90&&P<180){let b=(P-90)*Math.PI/180,A=Math.cos(b),L=Math.sin(b);return {x:u.y*A-u.x*L,y:-u.y*L-u.x*A}}else if(P>180&&P<270){let b=(P-180)*Math.PI/180,A=Math.cos(b),L=Math.sin(b);return {x:-u.x*A-u.y*L,y:u.x*L-u.y*A}}else if(P>270&&P<360){let b=(P-270)*Math.PI/180,A=Math.cos(b),L=Math.sin(b);return {x:-u.y*A+u.x*L,y:u.y*L+u.x*A}}return {x:0,y:0}}x.getPointBySuperPoint=l;function c(u){let P=u.width,b=u.height,A=u.angle%360;return A<0&&(A+=360),A===0||A===180?P:A===90||A===270?b:Math.abs(P*Math.cos(A*Math.PI/180))+Math.abs(b*Math.sin(A*Math.PI/180))}x.getSuperWidth=c;function y(u){let P=u.width,b=u.height,A=u.angle%360;return A<0&&(A+=360),A===0||A===180?b:A===90||A===270?P:Math.abs(b*Math.cos(A*Math.PI/180))+Math.abs(P*Math.sin(A*Math.PI/180))}x.getSuperHeight=y;})(exports.CanvasPropertyUtility||={});async function Bt(t){if(t!=="EMPTY"){if(!t)throw k.error("Texture not found",t),new core.PixiError("unregistered_asset","Texture not found");if(ut__default.default.Assets.cache.has(t)){let e=ut__default.default.Assets.get(t);if(e)return e}return ut__default.default.Assets.load(t).then(e=>{if(!e)throw k.error("Texture not found",t),new core.PixiError("unregistered_asset","Texture not found");if(!(e instanceof ut__default.default.Texture))throw k.error("File is not a Texture",t),new core.PixiError("unregistered_asset","File is not a Texture");return e}).catch(e=>{throw k.error("Error loading file",e),new core.PixiError("unknown_element","Error loading file")})}}function $e(t){return t&&(typeof t.align!="number"&&(t.xAlign!==void 0&&(t.align===void 0?(t.align={x:t.xAlign},delete t.xAlign):(t.align.x=t.xAlign,delete t.xAlign)),t.yAlign!==void 0&&(t.align===void 0?(t.align={y:t.yAlign},delete t.yAlign):(t.align.y=t.yAlign,delete t.yAlign))),typeof t.percentagePosition!="number"&&(t.percentageX!==void 0&&(t.percentagePosition===void 0?(t.percentagePosition={x:t.percentageX},delete t.percentageX):(t.percentagePosition.x=t.percentageX,delete t.percentageX)),t.percentageY!==void 0&&(t.percentagePosition===void 0?(t.percentagePosition={y:t.percentageY},delete t.percentageY):(t.percentagePosition.y=t.percentageY,delete t.percentageY))),t)}var pt=class t extends ut__default.default.Sprite{constructor(e){if(e instanceof ut__default.default.Texture)super(e);else {let{align:i,percentagePosition:n,...o}=$e(e)||{};super(o),i&&(this.align=i),n&&(this.percentagePosition=n);}this.pixivnId=this.constructor.prototype.pixivnId||Pt;}pixivnId=Pt;get memory(){return {...xi(this),pixivnId:this.pixivnId,align:this._align,percentagePosition:this._percentagePosition}}async setMemory(e){return await Zt(this,e)}static from(e,i){let n=ut__default.default.Sprite.from(e,i),o=new t;return o.texture=n.texture,o}onEventsHandlers={};on(e,i,n){return dt(e,this,i),super.on(e,(...o)=>i(...o,this),n)}_align=void 0;set align(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),typeof e=="number"?(this._align.x=e,this._align.y=e):(e.x!==void 0&&(this._align.x=e.x),e.y!==void 0&&(this._align.y=e.y)),this.reloadPosition();}get align(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),i=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return {x:exports.CanvasPropertyUtility.calculateAlignByPosition("width",this.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,i.x<0,this.anchor.x),y:exports.CanvasPropertyUtility.calculateAlignByPosition("height",this.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,i.y<0,this.anchor.y)}}set xAlign(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),this._align.x=e,this.reloadPosition();}get xAlign(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),i=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return exports.CanvasPropertyUtility.calculateAlignByPosition("width",this.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,i.x<0,this.anchor.x)}set yAlign(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),this._align.y=e,this.reloadPosition();}get yAlign(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),i=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return exports.CanvasPropertyUtility.calculateAlignByPosition("height",this.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,i.y<0,this.anchor.y)}_percentagePosition=void 0;set percentagePosition(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),typeof e=="number"?(this._percentagePosition.x=e,this._percentagePosition.y=e):(e.x!==void 0&&(this._percentagePosition.x=e.x),e.y!==void 0&&(this._percentagePosition.y=e.y)),this.reloadPosition();}get percentagePosition(){return {x:exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("width",this.x),y:exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("height",this.y)}}get percentageX(){return exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("width",this.x)}set percentageX(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.x=e,this.reloadPosition();}get percentageY(){return exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("height",this.y)}set percentageY(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.y=e,this.reloadPosition();}get positionType(){return this._align?"align":this._percentagePosition?"percentage":"pixel"}get positionInfo(){switch(this.positionType){case "align":return {x:this.xAlign,y:this.yAlign,type:"align"};case "percentage":return {x:this.percentageX,y:this.percentageY,type:"percentage"};default:return {x:this.x,y:this.y,type:"pixel"}}}set positionInfo(e){e.type==="align"?this.align={x:e.x,y:e.y}:e.type==="percentage"?this.percentagePosition={x:e.x,y:e.y}:this.position.set(e.x,e.y);}reloadPosition(){if(this._align){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),i=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);this._align.x!==void 0&&(super.x=exports.CanvasPropertyUtility.calculatePositionByAlign("width",this._align.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,i.x<0,this.anchor.x)),this._align.y!==void 0&&(super.y=exports.CanvasPropertyUtility.calculatePositionByAlign("height",this._align.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,i.y<0,this.anchor.y));}else this._percentagePosition&&(this._percentagePosition.x!==void 0&&(super.x=exports.CanvasPropertyUtility.calculatePositionByPercentagePosition("width",this._percentagePosition.x)),this._percentagePosition.y!==void 0&&(super.y=exports.CanvasPropertyUtility.calculatePositionByPercentagePosition("height",this._percentagePosition.y)));}get position(){return super.position}set position(e){this._align=void 0,this._percentagePosition=void 0,super.position=e;}get x(){return super.x}set x(e){this._align=void 0,this._percentagePosition=void 0,super.x=e;}get y(){return super.y}set y(e){this._align=void 0,this._percentagePosition=void 0,super.y=e;}};Ie.add(pt,{name:Pt,copyProperty:async(t,e)=>{await Zt(t,e,{ignoreTexture:true});}});async function Zt(t,e,i){e=$e(e);let n=i?.ignoreTexture||false;if(await Be(t,e),!n){let l;if("textureData"in e&&e.textureData&&(l=e.textureData),l&&l.url!=="EMPTY"){let c=l.url;l.alias&&ut__default.default.Assets.resolver.hasKey(l.alias)&&(c=l.alias);try{let y=await Bt(c);y&&(t.texture=y);}catch(y){k.error("Error in Sprite.setMemorySprite() while loading texture"),y=new core.PixiError("unregistered_asset",`Error loading image ${c}`,"canvas",e),core.GameUnifier.runOnError(y,{});}}}let o=i?.half;o&&await o(),"anchor"in e&&e.anchor!==void 0&&(typeof e.anchor=="number"?t.anchor.set(e.anchor,e.anchor):t.anchor.set(e.anchor.x,e.anchor.y)),"align"in e&&e.align!==void 0&&(t.align=e.align),"percentagePosition"in e&&e.percentagePosition!==void 0&&(t.percentagePosition=e.percentagePosition),"roundPixels"in e&&e.roundPixels!==void 0&&(t.roundPixels=e.roundPixels);}var ne=class t extends pt{_textureAlias;get textureAlias(){return this._textureAlias?this._textureAlias:this.texture.source.label}pixivnId=xt;constructor(e,i){super(e),i&&(this._textureAlias=i);}get memory(){return {...super.memory,pixivnId:this.pixivnId,loadIsStarted:this._loadIsStarted}}async setMemory(e){let i;"textureData"in e&&e.textureData&&(i=e.textureData),"assetsData"in e&&Array.isArray(e.assetsData)&&e.assetsData.length>0&&(i=e.assetsData[0]),i&&i.alias&&(this._textureAlias=i.alias),await Jt(this,e),this.reloadPosition();}static from(e,i){let n=ut__default.default.Sprite.from(e,i),o=new t;return o.texture=n.texture,o}_loadIsStarted=false;get loadIsStarted(){return this._loadIsStarted}async load(){return this._loadIsStarted=true,Bt(this.textureAlias).then(e=>{this._loadIsStarted=false,e&&(this.texture=e);}).catch(e=>{this._loadIsStarted=false,k.error("Error into ImageSprite.load()"),e=new core.PixiError("unregistered_asset",`Error loading image ${this.textureAlias}`,"canvas",{...this.memory,label:this.textureAlias},this),core.GameUnifier.runOnError(e,{});})}set texture(e){super.texture=e,this.reloadPosition();}get texture(){return super.texture}get haveEmptyTexture(){return this.texture._source.label==="EMPTY"}};Ie.add(ne,{name:xt,copyProperty:async(t,e)=>{await Jt(t,e,{ignoreTexture:true});}});async function Jt(t,e,i){return await Zt(t,e,{half:async()=>{"loadIsStarted"in e&&e.loadIsStarted&&await t.load();},ignoreTexture:i?.ignoreTexture})}var Ze=class t extends ne{constructor(e,i){if(e instanceof ut__default.default.Texture){super(e,i);return}let{loop:n,paused:o,currentTime:l,...c}=e||{};super(c,i),n&&(this.loop=n),o&&(this.paused=o),l&&(this.currentTime=l);}pixivnId=It;get memory(){return {...super.memory,pixivnId:this.pixivnId,loop:this.loop,paused:this._paused,currentTime:this.currentTime}}async setMemory(e){await tn(this,e),this.reloadPosition();}static from(e,i){let n=ut__default.default.Sprite.from(e,i),o=new t;return o.texture=n.texture,o}async load(){await super.load(),this.loop=this._looop,this.currentTime=this._currentTime,this.paused=this._paused;}_looop=false;get loop(){return this.texture?.source?.resource?.loop||false}set loop(e){this._looop=e,this.texture?.source?.resource&&(this.texture.source.resource.loop=e);}_paused=false;get paused(){return this.texture?.source?.resource?.paused||false}set paused(e){e?this.pause():this.play();}pause(){this._paused=true,this.texture?.source?.resource&&this.texture.source.resource.pause();}play(){this._paused=false,this.texture?.source?.resource?.play&&typeof this.texture.source.resource.play=="function"&&this.texture.source.resource.play();}_currentTime=0;get currentTime(){return this.texture?.source?.resource?.currentTime||0}set currentTime(e){let i=this.duration;i&&e>=i&&(e=0),this._currentTime=e,this.texture?.source?.resource&&(this.texture.source.resource.currentTime=e);}restart(){this.currentTime=0;}get duration(){if(this.texture?.source?.resource)return this.texture.source.resource.duration||0}};Ie.add(Ze,{name:It,getInstance:async(t,e)=>{let i;"textureData"in e&&e.textureData&&(i=e.textureData);let n=new t(void 0,i?.alias);return await n.setMemory(e),n},copyProperty:async(t,e)=>{await tn(t,e,{ignoreTexture:true});}});async function tn(t,e,i){await Jt(t,e,{ignoreTexture:i?.ignoreTexture}),"loop"in e&&e.loop!==void 0&&(t.loop=e.loop),"currentTime"in e&&e.currentTime!==void 0&&(t.currentTime=e.currentTime),"paused"in e&&e.paused!==void 0&&(t.paused=e.paused);}var Xe=class extends ut.Container{constructor(e){let{anchor:i,align:n,percentagePosition:o,...l}=$e(e)||{};super(l),this.pixivnId=this.constructor.prototype.pixivnId||yt,i&&(this.anchor=i),n&&(this.align=n),o&&(this.percentagePosition=o);}pixivnId=yt;get memory(){return {...ft(this,{childrenExport:true}),anchor:this._anchor?this.anchor:void 0,align:this._align,percentagePosition:this._percentagePosition}}async setMemory(e){await this.importChildren(e),await Be(this,e),this.reloadAnchor(),this.reloadPosition();}async importChildren(e){for(let i=0;i<e.elements.length;i++){let n=e.elements[i],o=await $t(n);this.addChild(o);}}onEventsHandlers={};on(e,i,n){return dt(e,this,i),super.on(e,(...o)=>i(...o,this),n)}_anchor;get anchor(){let e=super.pivot.x/this.width,i=super.pivot.y/this.height;return {x:e,y:i}}set anchor(e){typeof e=="number"?this._anchor={x:e,y:e}:this._anchor=e,this.reloadAnchor();}reloadAnchor(){this._anchor&&super.pivot.set(this._anchor.x*this.width,this._anchor.y*this.height);}get pivot(){return super.pivot}set pivot(e){this._anchor=void 0,super.pivot=e;}_align=void 0;set align(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),typeof e=="number"?(this._align.x=e,this._align.y=e):(e.x!==void 0&&(this._align.x=e.x),e.y!==void 0&&(this._align.y=e.y)),this.reloadPosition();}get align(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),i=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return {x:exports.CanvasPropertyUtility.calculateAlignByPosition("width",this.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,i.x<0),y:exports.CanvasPropertyUtility.calculateAlignByPosition("height",this.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,i.y<0)}}set xAlign(e){this._percentagePosition&&(this._percentagePosition=void 0),this._align===void 0&&(this._align={}),this._align.x=e,this.reloadPosition();}get xAlign(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),i=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return exports.CanvasPropertyUtility.calculateAlignByPosition("width",this.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,i.x<0)}set yAlign(e){this._percentagePosition&&(this._percentagePosition=void 0),this._align===void 0&&(this._align={}),this._align.y=e,this.reloadPosition();}get yAlign(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),i=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return exports.CanvasPropertyUtility.calculateAlignByPosition("height",this.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,i.y<0)}_percentagePosition=void 0;set percentagePosition(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),typeof e=="number"?(this._percentagePosition.x=e,this._percentagePosition.y=e):(e.x!==void 0&&(this._percentagePosition.x=e.x),e.y!==void 0&&(this._percentagePosition.y=e.y)),this.reloadPosition();}get percentagePosition(){return {x:exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("width",this.x),y:exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("height",this.y)}}set percentageX(e){this._align&&(this._align=void 0),this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.x=e,this.reloadPosition();}get percentageX(){return exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("width",this.x)}set percentageY(e){this._align&&(this._align=void 0),this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.y=e,this.reloadPosition();}get percentageY(){return exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("height",this.y)}get positionType(){return this._align?"align":this._percentagePosition?"percentage":"pixel"}get positionInfo(){switch(this.positionType){case "align":return {x:this.xAlign,y:this.yAlign,type:"align"};case "percentage":return {x:this.percentageX,y:this.percentageY,type:"percentage"};default:return {x:this.x,y:this.y,type:"pixel"}}}set positionInfo(e){e.type==="align"?this.align={x:e.x,y:e.y}:e.type==="percentage"?this.percentagePosition={x:e.x,y:e.y}:this.position.set(e.x,e.y);}reloadPosition(){if(this._align){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),i=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);this._align.x!==void 0&&(super.x=exports.CanvasPropertyUtility.calculatePositionByAlign("width",this._align.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,i.x<0)),this._align.y!==void 0&&(super.y=exports.CanvasPropertyUtility.calculatePositionByAlign("height",this._align.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,i.y<0));}else this._percentagePosition&&(this._percentagePosition.x!==void 0&&(super.x=exports.CanvasPropertyUtility.calculatePositionByPercentagePosition("width",this._percentagePosition.x)),this._percentagePosition.y!==void 0&&(super.y=exports.CanvasPropertyUtility.calculatePositionByPercentagePosition("height",this._percentagePosition.y)));}get position(){return super.position}set position(e){this._align=void 0,this._percentagePosition=void 0,super.position=e;}get x(){return super.x}set x(e){this._align=void 0,this._percentagePosition=void 0,super.x=e;}get y(){return super.y}set y(e){this._align=void 0,this._percentagePosition=void 0,super.y=e;}};Ie.add(Xe,{name:yt,copyProperty:async(t,e)=>await Be(t,e)});var $n=new Set(["mp4","webm","ogg","ogv","avi","mov","wmv","flv","mkv","m4v","3gp","3g2","ts","mts"]);function Ft(t){let e=ut__default.default.Assets.cache.has(t)?ut__default.default.Assets.get(t):null;return e instanceof ut__default.default.Texture&&(t=e.source?.label||t),Xn(t)}function Xn(t){let e=t.split(".").pop()?.toLowerCase();return e!==void 0&&$n.has(e)}var se=class extends Xe{constructor(e,i){let{anchor:n,align:o,percentagePosition:l,...c}=$e(e)||{};super(c),i&&i.forEach(y=>{Ft(y)?this.addChild(new Ze(void 0,y)):this.addChild(new ne(void 0,y));}),n&&(this.anchor=n),o&&(this.align=o),l&&(this.percentagePosition=l);}get memory(){return {...super.memory,pixivnId:Wt,loadIsStarted:this._loadIsStarted}}async setMemory(e){await this.importChildren(e),await nn(this,e),this.reloadAnchor(),this.reloadPosition();}pixivnId=Wt;_loadIsStarted=false;get loadIsStarted(){return this._loadIsStarted}async load(){this._loadIsStarted=true;let e=this.children.map(i=>i.load());return Promise.all(e).then(()=>{this._loadIsStarted=false,this.reloadAnchor(),this.reloadPosition();}).catch(i=>{this._loadIsStarted=false,k.error("Error into ImageContainer.load()",i);})}get texture(){return this.children.length>0?this.children[0].texture:new ut__default.default.Texture}get haveEmptyTexture(){return this.children.some(e=>e.texture._source.label==="EMPTY")}};Ie.add(se,{name:Wt,copyProperty:async(t,e)=>await nn(t,e)});async function nn(t,e){e=$e(e)||{},Be(t,e,{end:async()=>{"loadIsStarted"in e&&e.loadIsStarted&&await t.load();}});}var Qt=class{constructor(...e){}get memory(){throw new core.PixiError("not_implemented","The method CanvasBaseItem.memory must be overridden")}setMemory(e){throw new core.PixiError("not_implemented","The method CanvasBaseItem.setMemory must be overridden")}pixivnId="canvas_element_id_not_set"};var gt=class extends ut__default.default.Text{constructor(e){let{align:i,percentagePosition:n,...o}=$e(e)||{};super(o),this.pixivnId=this.constructor.prototype.pixivnId||vt,i&&(this.align=i),n&&(this.percentagePosition=n);}pixivnId=vt;get memory(){return {...Pi(this),pixivnId:this.pixivnId,align:this._align,percentagePosition:this._percentagePosition}}async setMemory(e){await qn(this,e),this.reloadPosition();}onEventsHandlers={};on(e,i,n){return dt(e,this,i),super.on(e,(...o)=>i(...o,this),n)}_align=void 0;set align(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),typeof e=="number"?(this._align.x=e,this._align.y=e):(e.x!==void 0&&(this._align.x=e.x),e.y!==void 0&&(this._align.y=e.y)),this.reloadPosition();}get align(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),i=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return {x:exports.CanvasPropertyUtility.calculateAlignByPosition("width",this.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,i.x<0,this.anchor.x),y:exports.CanvasPropertyUtility.calculateAlignByPosition("height",this.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,i.y<0,this.anchor.y)}}set xAlign(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),this._align.x=e,this.reloadPosition();}get xAlign(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),i=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return exports.CanvasPropertyUtility.calculateAlignByPosition("width",this.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,i.x<0,this.anchor.x)}set yAlign(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),this._align.y=e,this.reloadPosition();}get yAlign(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),i=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return exports.CanvasPropertyUtility.calculateAlignByPosition("height",this.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,i.y<0,this.anchor.y)}_percentagePosition=void 0;set percentagePosition(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),typeof e=="number"?(this._percentagePosition.x=e,this._percentagePosition.y=e):(e.x!==void 0&&(this._percentagePosition.x=e.x),e.y!==void 0&&(this._percentagePosition.y=e.y)),this.reloadPosition();}get percentagePosition(){return {x:exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("width",this.x),y:exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("height",this.y)}}get percentageX(){return exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("width",this.x)}set percentageX(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.x=e,this.reloadPosition();}get percentageY(){return exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("height",this.y)}set percentageY(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.y=e,this.reloadPosition();}get positionType(){return this._align?"align":this._percentagePosition?"percentage":"pixel"}get positionInfo(){switch(this.positionType){case "align":return {x:this.xAlign,y:this.yAlign,type:"align"};case "percentage":return {x:this.percentageX,y:this.percentageY,type:"percentage"};default:return {x:this.x,y:this.y,type:"pixel"}}}set positionInfo(e){e.type==="align"?this.align={x:e.x,y:e.y}:e.type==="percentage"?this.percentagePosition={x:e.x,y:e.y}:this.position.set(e.x,e.y);}reloadPosition(){if(this._align){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),i=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);this._align.x!==void 0&&(super.x=exports.CanvasPropertyUtility.calculatePositionByAlign("width",this._align.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,i.x<0,this.anchor.x)),this._align.y!==void 0&&(super.y=exports.CanvasPropertyUtility.calculatePositionByAlign("height",this._align.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,i.y<0,this.anchor.y));}else this._percentagePosition&&(this._percentagePosition.x!==void 0&&(super.x=exports.CanvasPropertyUtility.calculatePositionByPercentagePosition("width",this._percentagePosition.x)),this._percentagePosition.y!==void 0&&(super.y=exports.CanvasPropertyUtility.calculatePositionByPercentagePosition("height",this._percentagePosition.y)));}get position(){return super.position}set position(e){this._align=void 0,this._percentagePosition=void 0,super.position=e;}get x(){return super.x}set x(e){this._align=void 0,this._percentagePosition=void 0,super.x=e;}get y(){return super.y}set y(e){this._align=void 0,this._percentagePosition=void 0,super.y=e;}};Ie.add(gt,{name:vt});async function qn(t,e){"text"in e&&e.text!==void 0&&(t.text=e.text),await Be(t,e,{end:()=>{"style"in e&&e.style!==void 0&&(t.style=e.style);}}),"anchor"in e&&e.anchor!==void 0&&(typeof e.anchor=="number"?t.anchor.set(e.anchor,e.anchor):t.anchor.set(e.anchor.x,e.anchor.y)),"resolution"in e&&e.resolution!==void 0&&(t.resolution=e.resolution),"anchor"in e&&e.anchor!==void 0&&(typeof e.anchor=="number"?t.anchor.set(e.anchor,e.anchor):t.anchor.set(e.anchor.x,e.anchor.y)),"align"in e&&e.align!==void 0&&(t.align=e.align),"percentagePosition"in e&&e.percentagePosition!==void 0&&(t.percentagePosition=e.percentagePosition),"roundPixels"in e&&e.roundPixels!==void 0&&(t.roundPixels=e.roundPixels);}function Lt(t,e,i){let n=[0],o=t;for(let l=0;l<i;l++)n.push(o,-o*.6,o*.3,0),o*=e;return n}function sn(t,e,i,n){let o=i.reduce((P,b)=>b.enabled?P+b.padding:P,0),l=t.x,c=t.y,y=t.x+t.width,x=t.y+t.height;n&&(l=Math.max(l,0),c=Math.max(c,0),y=Math.min(y,n.width),x=Math.min(x,n.height));let u={x:l-o,y:c-o,width:y-l+o*2,height:x-c+o*2};return {x:t.x+e.x*t.width-u.x,y:t.y+e.y*t.height-u.y,area:u}}function Ii(t,e,i,n){return Math.max(0,Math.ceil(e-Math.min(t.x,t.y,i-t.x,n-t.y)))}function ei(t,e,i,n){let o=Math.min(Math.max(e,0),.5),l=Math.hypot(Math.max(t.x,i-t.x),Math.max(t.y,n-t.y));return Math.ceil(l*o/(1-o))}function ti(t,e,i,n){return n>0?n:Math.hypot(Math.max(t.x,e.width-t.x),Math.max(t.y,e.height-t.y))+i/2}function Ti(t){let e=t.filters;return e?Array.isArray(e)?[...e]:[e]:[]}function Qn(t,e){t.filters=[...Ti(t),...e];}function er(t,e){let i=Ti(t).filter(n=>!e.includes(n));t.filters=i.length>0?i:null;}function ce(t,e,i,n,o,l){Qn(e,[i]);let c=filters.filters.animate(t,i,n,{duration:o.duration??1,delay:o.delay,ease:o.ease,times:o.times,aliasToRemoveAfter:o.aliasToRemoveAfter,autoplay:o.autoplay},l,void 0,()=>{er(e,[i]),i.destroy();});return c&&(o.completeOnContinue??true)&&tickers.tickers.completeOnStepEnd({id:c}),c}function st(t,e){let i;try{i=p.screen;}catch{i=void 0;}return sn(t.getBounds(),e,Ti(t),i)}async function tr(t,e={},i){return exports.effects.shakeEffect(t,e,i)}function on(t){switch(t){case "up":return {axis:"y",sign:-1};case "down":return {axis:"y",sign:1};case "left":return {axis:"x",sign:-1};default:return {axis:"x",sign:1}}}function ii(t,e,i){let n=[0],o=t;for(let l=0;l<i;l++)n.push(l%2===0?o:-o,0),o*=e;return n}function _t(t,e,i,n){let o=[t],l=e;for(let c=0;c<n;c++)o.push(t+l,t),l*=i;return o}exports.effects=void 0;(re=>{async function t(w,N={},G){let M=p.find(w);if(!M){k.error(`The element with the alias ${w} does not exist. So the shake effect can't be applied.`);return}let D={x:M.position.x,y:M.position.y},{shakeType:V="horizontal",maxShockSize:j=10,shocksNumber:J=10,...U}=N,W=J-1;if(W<2){k.error("The number of shocks must be at least 3.");return}let Q=Math.floor(W/2),K=Math.ceil(W/2),X=[];for(let ie=0;ie<Q;ie++){let de=j*(ie+1)/Q;V==="horizontal"?ie%2!==0?X.push(D.x+de):X.push(D.x-de):ie%2!==0?X.push(D.y+de):X.push(D.y-de);}let ee=Q%2===0;for(let ie=K;ie>0;ie--){let de=j*(ie+1)/(K-1);V==="horizontal"?ie%2===0&&!ee||ie%2!==0&&ee?X.push(D.x-de):X.push(D.x+de):ie%2===0&&!ee||ie%2!==0&&ee?X.push(D.y-de):X.push(D.y+de);}let oe;if(V==="horizontal"?(X.push(D.x),oe=p.animate(w,{x:X},U,G)):(X.push(D.y),oe=p.animate(w,{y:X},U,G)),oe)return [oe]}re.shakeEffect=t;async function e(w,N={},G){let M=p.find(w);if(!M){k.error(`The element with the alias ${w} does not exist. So the bounce effect can't be applied.`);return}let{direction:D="up",distance:V=30,bounces:j=4,decay:J=.5,...U}=N,{axis:W,sign:Q}=on(D),K=W==="x"?M.position.x:M.position.y,X=[K],ee=V;for(let ie=0;ie<j;ie++)X.push(K+Q*ee,K),ee*=J;let oe=p.animate(w,{[W]:X},U,G);if(oe)return [oe]}re.bounceEffect=e;async function i(w,N={},G){let M=p.find(w);if(!M){k.error(`The element with the alias ${w} does not exist. So the pulse effect can't be applied.`);return}let{scale:D=1.2,pulses:V=3,decay:j=.6,...J}=N,U=M.scale.x,W=M.scale.y,Q=[U],K=[W],X=D-1;for(let oe=0;oe<V;oe++)Q.push(U*(1+X),U),K.push(W*(1+X),W),X*=j;let ee=p.animate(w,{scaleX:Q,scaleY:K},J,G);if(ee)return [ee]}re.pulseEffect=i;async function n(w,N={},G){let M=p.find(w);if(!M){k.error(`The element with the alias ${w} does not exist. So the hop effect can't be applied.`);return}let{direction:D="up",distance:V=40,secondaryHops:j=0,decay:J=.5,...U}=N,{axis:W,sign:Q}=on(D),K=W==="x"?M.position.x:M.position.y,X=[K],ee=V;for(let ie=0;ie<1+j;ie++)X.push(K+Q*ee,K),ee*=J;let oe=p.animate(w,{[W]:X},U,G);if(oe)return [oe]}re.hopEffect=n;async function o(w,N={},G){let M=p.find(w);if(!M){k.error(`The element with the alias ${w} does not exist. So the wiggle effect can't be applied.`);return}let{angle:D=15,repetitions:V=3,decay:j=.5,...J}=N,U=M.rotation,W=D*Math.PI/180,Q=ii(W,j,V).map(X=>U+X),K=p.animate(w,{rotation:Q},J,G);if(K)return [K]}re.wiggleEffect=o;async function l(w,N={},G){let M=p.find(w);if(!M){k.error(`The element with the alias ${w} does not exist. So the nod effect can't be applied.`);return}let{axis:D="horizontal",distance:V=15,repetitions:j=3,decay:J=.5,...U}=N,W=D==="horizontal"?"x":"y",Q=D==="horizontal"?M.position.x:M.position.y,K=ii(V,J,j).map(ee=>Q+ee),X=p.animate(w,{[W]:K},U,G);if(X)return [X]}re.nodEffect=l;async function c(w,N={},G){let M=p.find(w);if(!M){k.error(`The element with the alias ${w} does not exist. So the sway effect can't be applied.`);return}let{axis:D="horizontal",distance:V=10,angle:j=5,repetitions:J=3,decay:U=0,ease:W="easeInOut",...Q}=N,K=D==="horizontal"?"x":"y",X=D==="horizontal"?M.position.x:M.position.y,ee=M.rotation,oe=j*Math.PI/180,ie=ii(V,U||1,J).map(Ce=>X+Ce),de=ii(oe,U||1,J).map(Ce=>ee+Ce),Ae=p.animate(w,{[K]:ie,rotation:de},{ease:W,...Q},G);if(Ae)return [Ae]}re.swayEffect=c;async function y(w,N={},G){let M=p.find(w);if(!M){k.error(`The element with the alias ${w} does not exist. So the punch effect can't be applied.`);return}let{mode:D="scale",strength:V=.3,overshoot:j=.3,...J}=N,U;if(D==="scale"){let W=Q=>[Q,Q*(1+V),Q*(1-V*j),Q];U=p.animate(w,{scaleX:W(M.scale.x),scaleY:W(M.scale.y)},J,G);}else {let W=D==="rotation"?M.rotation:D==="x"?M.position.x:M.position.y,Q=D==="rotation"?V*Math.PI/180:V,K=[W,W+Q,W-Q*j,W];U=p.animate(w,{[D]:K},J,G);}if(U)return [U]}re.punchEffect=y;async function x(w,N={},G){let M=p.find(w);if(!M){k.error(`The element with the alias ${w} does not exist. So the glitch effect can't be applied.`);return}let{strength:D=40,bursts:V=3,slices:j=8,direction:J=0,rgbSplit:U=6,decay:W=.5,ease:Q="linear",...K}=N,X=new filters.filters.GlitchFilter({slices:j,direction:J,offset:0});X.refresh(),X.padding=Math.ceil(Math.abs(D));let ee=[],oe=ce(w,M,X,{offset:Lt(D,W,V)},{ease:Q,...K},G);if(oe&&ee.push(oe),U!==0){let ie=Lt(U,W,V),de=new filters.filters.RGBSplitFilter({red:{x:0,y:0},green:{x:0,y:0},blue:{x:0,y:0}});de.padding=Math.ceil(Math.abs(U));let Ae=ce(w,M,de,{redX:ie,blueX:ie.map(Ce=>-Ce)},{ease:Q,...K},G);Ae&&ee.push(Ae);}if(ee.length>0)return ee}re.glitchEffect=x;async function u(w,N={},G){let M=p.find(w);if(!M){k.error(`The element with the alias ${w} does not exist. So the chromatic aberration effect can't be applied.`);return}let{strength:D=8,axis:V="horizontal",bursts:j=1,decay:J=.5,...U}=N,W=new filters.filters.RGBSplitFilter({red:{x:0,y:0},green:{x:0,y:0},blue:{x:0,y:0}});W.padding=Math.ceil(Math.abs(D));let Q=V==="horizontal"?"redX":"redY",K=V==="horizontal"?"blueX":"blueY",X={[Q]:_t(0,D,J,j),[K]:_t(0,-D,J,j)},ee=ce(w,M,W,X,U,G);if(ee)return [ee]}re.chromaticAberrationEffect=u;async function P(w,N={},G){let M=p.find(w);if(!M){k.error(`The element with the alias ${w} does not exist. So the shockwave effect can't be applied.`);return}let{origin:D={x:.5,y:.5},amplitude:V=30,wavelength:j=160,brightness:J=1,radius:U=-1,speed:W=500,strength:Q,...K}=N,{width:X,height:ee}=M.getBounds(),oe=Q??ti({x:D.x*X,y:D.y*ee},{width:X,height:ee},j,U)/W,ie=new filters.filters.ShockwaveFilter({center:{x:0,y:0},amplitude:V,wavelength:j,brightness:J,radius:U,speed:W,time:0});ie.padding=Math.ceil(Math.abs(V)*1.25);let de=ce(w,M,ie,{time:[0,oe]},K,G),{x:Ae,y:Ce}=st(M,D);if(ie.center={x:Ae,y:Ce},de)return [de]}re.shockwaveEffect=P;async function b(w,N={},G){let M=p.find(w);if(!M){k.error(`The element with the alias ${w} does not exist. So the radial blur effect can't be applied.`);return}let{strength:D=.5,bursts:V=1,origin:j={x:.5,y:.5},innerRadius:J=0,radius:U=-1,decay:W=.5,...Q}=N,K=new filters.filters.ZoomBlurFilter({center:{x:0,y:0},innerRadius:J,radius:U,strength:0}),{width:X,height:ee}=M.getBounds();K.padding=ei({x:j.x*X,y:j.y*ee},D,X,ee);let oe=_t(0,D,W,V),ie=ce(w,M,K,{strength:oe},Q,G),{x:de,y:Ae}=st(M,j);if(K.center={x:de,y:Ae},ie)return [ie]}re.radialBlurEffect=b;async function A(w,N={},G){let M=p.find(w);if(!M){k.error(`The element with the alias ${w} does not exist. So the blur pulse effect can't be applied.`);return}let{strength:D=8,pulses:V=3,quality:j,decay:J=.5,...U}=N,W=new filters.filters.BlurFilter({strength:0,quality:j}),Q=_t(0,D,J,V),K=ce(w,M,W,{strength:Q},U,G);if(K)return [K]}re.blurPulseEffect=A;async function L(w,N={},G){let M=p.find(w);if(!M){k.error(`The element with the alias ${w} does not exist. So the vignette pulse effect can't be applied.`);return}let{strength:D=1,pulses:V=1,radius:j=.5,blur:J=.5,decay:U=.5,...W}=N,Q=new filters.filters.CRTFilter({curvature:0,lineWidth:0,lineContrast:0,noise:0,vignetting:j,vignettingBlur:J,vignettingAlpha:0}),K=_t(0,D,U,V),X=ce(w,M,Q,{vignettingAlpha:K},W,G);if(X)return [X]}re.vignettePulseEffect=L;async function H(w,N={},G){let M=p.find(w);if(!M){k.error(`The element with the alias ${w} does not exist. So the desaturate effect can't be applied.`);return}let{amount:D=0,duration:V=1,holdDuration:j=0,...J}=N,U=V*2+j,W=[0,V/U,(V+j)/U,1],Q=new filters.filters.AdjustmentFilter({saturation:1}),K=ce(w,M,Q,{saturation:[1,D,D,1]},{...J,duration:U,times:W},G);if(K)return [K]}re.desaturateEffect=H;async function Y(w,N={},G){let M=p.find(w);if(!M){k.error(`The element with the alias ${w} does not exist. So the glow pulse effect can't be applied.`);return}let{strength:D=4,pulses:V=3,color:j=16777215,distance:J=10,innerStrength:U=0,decay:W=.5,...Q}=N,K=new filters.filters.GlowFilter({outerStrength:0,innerStrength:U,distance:J,color:j}),X=_t(0,D,W,V),ee=ce(w,M,K,{outerStrength:X},Q,G);if(ee)return [ee]}re.glowPulseEffect=Y;})(exports.effects||={});function mt(t){let e=t.getLocalBounds();return {x:e.x,y:e.y,width:e.width,height:e.height}}function bi(t,e){return e.graphics||(e.graphics=new ut.Graphics,t.parent?.addChild(e.graphics),t.mask=e.graphics),nr(t,e.graphics),e.graphics}function nr(t,e){e.position.copyFrom(t.position),e.scale.copyFrom(t.scale),e.pivot.copyFrom(t.pivot),e.skew.copyFrom(t.skew),e.rotation=t.rotation;}function rr(t,e){e.graphics&&(t.mask=null,e.graphics.parent?.removeChild(e.graphics),e.graphics.destroy({children:true}),e.graphics=void 0);}function wi(t,e,i,n){let o=e.invert?1-i:i,{bounds:l}=e,c=bi(t,n),y=l.x+l.width/2,x=l.y+l.height/2,u=Math.sqrt(l.width**2+l.height**2)||1,P=Math.max(o,0)*u*2,b=e.angle*Math.PI/180;if(c.clear(),P>0){let A=Math.cos(-b),L=Math.sin(-b),H=[[-u,-u],[-u+P,-u],[-u+P,u],[-u,u]].flatMap(([Y,re])=>[y+Y*A-re*L,x+Y*L+re*A]);c.poly(H).fill(16777215);}}function Si(t,e,i,n){let o=e.invert?1-i:i,{bounds:l}=e,c=bi(t,n),y=l.x+l.width*e.originX,x=l.y+l.height*e.originY,u=Math.max(y-l.x,l.x+l.width-y),P=Math.max(x-l.y,l.y+l.height-x),b=Math.sqrt(u**2+P**2)||1,A=Math.max(o,0)*b,L=e.aspect>0?e.aspect:1;c.clear(),A>0&&c.ellipse(y,x,A*L,A).fill(16777215);}function Ai(t,e,i,n){let l=1-(e.invert?1-i:i),{bounds:c}=e,y=bi(t,n);if(y.clear(),e.orientation==="horizontal"){let x=c.x+c.width*e.origin,u=x-c.x,P=c.x+c.width-x,b=c.x-l*u,A=x+l*P;u>0&&y.rect(b,c.y,u,c.height).fill(16777215),P>0&&y.rect(A,c.y,P,c.height).fill(16777215);}else {let x=c.y+c.height*e.origin,u=x-c.y,P=c.y+c.height-x,b=c.y-l*u,A=x+l*P;u>0&&y.rect(c.x,b,c.width,u).fill(16777215),P>0&&y.rect(c.x,A,c.width,P).fill(16777215);}}function an(t,e,i){switch(e.kind){case "wipe":case "iris":case "split":rr(t,i);break}}function ni(t,e,i){let n={...p.find(t)?.memory,...i},o=new se(i,e);return n&&p.copyCanvasElementProperty(n,o),p.add(t,o,{ignoreOldStyle:true,zIndex:i?.zIndex}),o}async function sr(t,e,i){let n={...p.find(t)?.memory,...i},o=new se(i,e);return o.label=t,await o.load(),n&&p.copyCanvasElementProperty(n,o),p.add(t,o,{ignoreOldStyle:true,zIndex:i?.zIndex}),o}function ri(t,e,i){if(!e)if(ut__default.default.Assets.resolver.hasKey(t))e=t;else throw new core.PixiError("unregistered_asset",`The image ${t} does not exist in the cache.`,"canvas",{pixivnId:xt,...i,label:t});let n={...p.find(t)?.memory,...i},o=new ne(i,e);return n&&p.copyCanvasElementProperty(n,o),p.add(t,o,{ignoreOldStyle:true,zIndex:i?.zIndex}),o}async function or(t,e,i){if(!e)if(ut__default.default.Assets.resolver.hasKey(t))e=t;else throw new core.PixiError("unregistered_asset",`The image ${t} does not exist in the cache.`,"canvas",{pixivnId:xt,...i,label:t});let n={...p.find(t)?.memory,...i},o=new ne(i,e);return o.label=t,await o.load(),n&&p.copyCanvasElementProperty(n,o),p.add(t,o,{ignoreOldStyle:true,zIndex:i?.zIndex}),o}function si(t,e,i){if(!e)if(ut__default.default.Assets.resolver.hasKey(t))e=t;else throw new core.PixiError("unregistered_asset",`The video ${t} does not exist in the cache.`,"canvas",{pixivnId:It,...i,label:t});let n={...p.find(t)?.memory,...i},o=new Ze(i,e);return n&&p.copyCanvasElementProperty(n,o),p.add(t,o,{ignoreOldStyle:true,zIndex:i?.zIndex}),o}async function ar(t,e,i){if(!e)if(ut__default.default.Assets.resolver.hasKey(t))e=t;else throw new core.PixiError("unregistered_asset",`The video ${t} does not exist in the cache.`,"canvas",{pixivnId:It,...i,label:t});let n={...p.find(t)?.memory,...i},o=new Ze(i,e);return o.label=t,await o.load(),n&&p.copyCanvasElementProperty(n,o),p.add(t,o,{ignoreOldStyle:true,zIndex:i?.zIndex}),o}async function cr(t,e,i={},n){return exports.transitions.showWithDissolve(t,e,i,n)}function dr(t,e={},i){return exports.transitions.removeWithDissolve(t,e,i)}async function ur(t,e,i={},n){return exports.transitions.showWithFade(t,e,i,n)}function fr(t,e={},i){return exports.transitions.removeWithFade(t,e,i)}async function hr(t,e,i={},n){return exports.transitions.moveIn(t,e,i,n)}function pr(t,e={},i){return exports.transitions.moveOut(t,e,i)}async function gr(t,e,i={},n){return exports.transitions.zoomIn(t,e,i,n)}function mr(t,e={},i){return exports.transitions.zoomOut(t,e,i)}async function yr(t,e,i={},n){return exports.transitions.pushIn(t,e,i,n)}function xr(t,e={direction:"right"},i){return exports.transitions.pushOut(t,e,i)}exports.transitions=void 0;(zr=>{function t(a){switch(a.type){case "align":return {xAlign:a.x,yAlign:a.y};case "percentage":return {percentageX:a.x,percentageY:a.y};default:return {x:a.x,y:a.y}}}function e(a,r,d){if(typeof r=="string")return Ft(r)?si(a,r,{...d.properties,zIndex:d.zIndex}):ri(a,r,{...d.properties,zIndex:d.zIndex});if(Array.isArray(r))return ni(a,r,{...d.properties,zIndex:d.zIndex});if(typeof r=="object"&&"value"in r&&"options"in r){if(typeof r.value=="string")return Ft(r.value)?si(a,r.value,{...r.options,...d.properties,zIndex:d.zIndex}):ri(a,r.value,{...r.options,...d.properties,zIndex:d.zIndex});if(Array.isArray(r.value))return ni(a,r.value,{...r.options,...d.properties,zIndex:d.zIndex})}return p.add(a,r,d),r}function i(a){let r=a;return {x:r.x,y:r.y,anchor:r.anchor,scale:r.scale,pivot:r.pivot,skew:r.skew,rotation:r.rotation,angle:r.angle}}function n(a,r,d){let f,h=p.find(a);h&&(f=`${a}_temp_${d}`,p.editAlias(a,f));let g=e(a,r,{zIndex:h?h.parent?.getChildIndex(h):void 0,properties:h?i(h):void 0});return h?.parent?.setChildIndex(h,h.parent.getChildIndex(h)-.1),f&&p.copyCanvasElementProperty(f,a),f&&tickers.tickers.transfer(f,a,"duplicate"),{component:g,oldComponentAlias:f}}function o(a){switch(a){case "up":return 90;case "down":return 270;case "left":return 180;default:return 0}}function l(a,r,d){let f={},h=S=>{let E=p.find(a);E&&r.apply(E,S,f);},g=filters.filters.animate(a,void 0,{value:[r.from,r.to]},{duration:r.duration??1,delay:r.delay,ease:r.ease,aliasToRemoveAfter:r.aliasToRemoveAfter,tickerIdToResume:r.tickerIdToResume},d,h,()=>{let S=p.find(a);S&&an(S,r.config,f);});return g&&h(r.from),g&&(r.completeOnContinue??true)&&tickers.tickers.completeOnStepEnd({id:g}),g}function c(a,r,d,f,h){let g=Math.max(f,0)/4;d==="in"?(r&&(r.alpha=0),p.animate(a,{alpha:[0,1]},{duration:g,completeOnContinue:false},h)):p.animate(a,{alpha:[1,0]},{duration:g,delay:Math.max(f-g,0),completeOnContinue:false},h);}function y(a,r,d,f,h=false){let g=Math.max(f,1),S=r*2+d,E=h?r+d:S,C=Math.max(S*(g-1)+E,.001),T=[0],I=[0],m=0;for(let v=0;v<g;v++){let O=v===g-1;m+=r,T.push(a),I.push(m/C),m+=d,T.push(a),I.push(m/C),(!O||!h)&&(m+=r,T.push(0),I.push(Math.min(m/C,1)));}return {values:T,times:I,total:C}}async function x(a,r,d={},f){let{completeOnContinue:h=true,tickerIdToResume:g=[],...S}=d,E=[];r||(r=a),typeof g=="string"&&(g=[g]);let C,T=p.find(a);if(T&&(C=`${a}_temp_disolve`,p.editAlias(a,C)),r=e(a,r,{zIndex:T?T.parent?.getChildIndex(T):void 0,properties:T?i(T):void 0}),T?.parent?.setChildIndex(T,T.parent.getChildIndex(T)-.1),C&&p.copyCanvasElementProperty(C,a),C&&tickers.tickers.transfer(C,a,"duplicate"),r.alpha=0,C){let m=u(C,{...d,autoplay:false,completeOnContinue:h},f);m&&(E.push(...m),g.push(...m));}let I=p.animate(a,{alpha:1},{...S,tickerIdToResume:g,completeOnContinue:h},f);if(I&&E.push(I),(r instanceof ne||r instanceof se)&&r.haveEmptyTexture&&await r.load(),E.length>0)return E}zr.showWithDissolve=x;function u(a,r={},d){let{completeOnContinue:f=true,aliasToRemoveAfter:h=[],...g}=r;typeof h=="string"&&(h=[h]),h.push(a);let S=p.animate(a,{alpha:0},{...g,aliasToRemoveAfter:h,completeOnContinue:f},d);if(S)return [S]}zr.removeWithDissolve=u;async function P(a,r,d={},f){let{completeOnContinue:h=true,aliasToRemoveAfter:g=[],...S}=d,E=[];r||(r=a),typeof g=="string"&&(g=[g]);let C=p.find(a);if(!C)return x(a,r,d,f);let T=`${a}_temp_fade`;p.editAlias(a,T),g.push(T),r=e(a,r,{zIndex:C?C.parent?.getChildIndex(C):void 0,properties:i(C)}),C?.parent?.setChildIndex(C,C.parent.getChildIndex(C)-.1),T&&p.copyCanvasElementProperty(T,a),T&&tickers.tickers.transfer(T,a,"duplicate"),r.alpha=0;let I=p.animate(a,{alpha:1},{...S,aliasToRemoveAfter:g,completeOnContinue:h},f);if(I){let m=u(T,{...d,tickerIdToResume:I,completeOnContinue:h},f);m&&E.push(...m),E.push(I),tickers.tickers.pause({id:I});}if((r instanceof ne||r instanceof se)&&r.haveEmptyTexture&&await r.load(),E.length>0)return E}zr.showWithFade=P;function b(a,r={},d){return u(a,r,d)}zr.removeWithFade=b;async function A(a,r,d={},f){let{direction:h="right",completeOnContinue:g=true,tickerIdToResume:S=[],aliasToRemoveAfter:E=[],removeOldComponentWithMoveOut:C,motionBlur:T,...I}=d,m=[],v;r||(r=a),typeof S=="string"&&(S=[S]),typeof E=="string"&&(E=[E]);let O,B=p.find(a);if(B&&(O=`${a}_temp_movein`,p.editAlias(a,O),B instanceof ne||B instanceof se?v=B.positionInfo:v={x:B.x,y:B.y,type:"pixel"}),r=e(a,r,{zIndex:B?B.parent?.getChildIndex(B):void 0}),B?.parent?.setChildIndex(B,B.parent.getChildIndex(B)-.1),O&&p.copyCanvasElementProperty(O,a),O&&tickers.tickers.transfer(O,a,"move"),(r instanceof ne||r instanceof se)&&r.haveEmptyTexture&&await r.load(),v||(r instanceof ne||r instanceof se?v=r.positionInfo:v={x:r.x,y:r.y,type:"pixel"}),O)if(C){let pe=L(O,{...d,autoplay:false,completeOnContinue:g},f);pe&&(m.push(...pe),S.push(...pe));}else E.push(O);switch(h){case "up":r.y=p.height+r.height;break;case "down":r.y=-r.height;break;case "left":r.x=p.width+r.width;break;case "right":r.x=-r.width;break}let $=tickers.tickers.pause({canvasAlias:a});S.push(...$);let Z=p.animate(a,t(v),{...I,tickerIdToResume:S,aliasToRemoveAfter:E,completeOnContinue:g},f);Z&&m.push(Z);let ue=de(a,r,h,T,{...I,completeOnContinue:g},f);if(ue&&m.push(ue),m.length>0)return m}zr.moveIn=A;function L(a,r={},d){let{direction:f="right",completeOnContinue:h=true,aliasToRemoveAfter:g=[],motionBlur:S,...E}=r;typeof g=="string"&&(g=[g]),g.push(a);let C=p.find(a);if(!C){k.warn(`The canvas component "${a}" is not found.`);return}let T={x:C.x,y:C.y};switch(f){case "up":T.y=-C.height;break;case "down":T.y=p.height+C.height;break;case "left":T.x=-C.width;break;case "right":T.x=p.width+C.width;break}tickers.tickers.pause({canvasAlias:a});let I=p.animate(a,T,{...E,aliasToRemoveAfter:g,completeOnContinue:h},d),m=de(a,C,f,S,{...E,completeOnContinue:h},d);return Ae([I,m])}zr.moveOut=L;async function H(a,r,d={},f){let{direction:h="right",completeOnContinue:g=true,tickerIdToResume:S=[],aliasToRemoveAfter:E=[],...C}=d,T=[],I;r||(r=a),typeof S=="string"&&(S=[S]),typeof E=="string"&&(E=[E]);let m,v=p.find(a);v&&(m=`${a}_temp_zoom`,p.editAlias(a,m),v instanceof ne||v instanceof se?I=v.positionInfo:I={x:v.x,y:v.y,type:"pixel"}),r=e(a,r,{zIndex:v?v.parent?.getChildIndex(v):void 0}),v?.parent?.setChildIndex(v,v.parent.getChildIndex(v)-.1),m&&p.copyCanvasElementProperty(m,a),m&&tickers.tickers.transfer(m,a,"move"),I||(r instanceof ne||r instanceof se?I=r.positionInfo:I={x:r.x,y:r.y,type:"pixel"});let O={x:r.pivot.x,y:r.pivot.y},B={x:r.scale.x,y:r.scale.y};if(m)if(d.removeOldComponentWithZoomOut){let ue=Y(m,{...d,autoplay:false,completeOnContinue:g},f);ue&&(T.push(...ue),S.push(...ue));}else E.push(m);(r instanceof ne||r instanceof se)&&r.haveEmptyTexture&&await r.load(),h==="up"?(r.pivot.y=p.height-r.y,r.pivot.x=p.width/2-r.x,r.y=p.height,r.x=p.width/2):h==="down"?(r.pivot.y=0-r.y,r.pivot.x=p.width/2-r.x,r.y=0,r.x=p.width/2):h==="left"?(r.pivot.x=p.width-r.x,r.pivot.y=p.height/2-r.y,r.x=p.width,r.y=p.height/2):h==="right"&&(r.pivot.x=0-r.x,r.pivot.y=p.height/2-r.y,r.x=0,r.y=p.height/2),r.pivot=exports.CanvasPropertyUtility.getPointBySuperPoint(r.pivot,r.angle),r.scale.set(0);let $=tickers.tickers.pause({canvasAlias:a});S.push(...$);let Z=p.animate(a,{pivotX:O.x,pivotY:O.y,scaleX:B.x,scaleY:B.y,...t(I)},{...C,tickerIdToResume:S,aliasToRemoveAfter:E,completeOnContinue:g},f);if(Z&&T.push(Z),T.length>0)return T}zr.zoomIn=H;function Y(a,r={},d){let{direction:f="right",completeOnContinue:h=true,aliasToRemoveAfter:g=[],...S}=r;typeof g=="string"&&(g=[g]),g.push(a);let E=p.find(a);if(!E){k.warn(`The canvas component "${a}" is not found.`);return}let C={x:E.x,y:E.y},T={x:E.pivot.x,y:E.pivot.y};f==="down"?(C.y=p.height,C.x=p.width/2,T.y=p.height-C.y,T.x=p.width/2-C.x):f==="up"?(C.y=0,C.x=p.width/2,T.y=0-C.y,T.x=p.width/2-C.x):f==="right"?(C.x=p.width,C.y=p.height/2,T.x=p.width-C.x,T.y=p.height/2-C.y):f==="left"&&(C.x=0,C.y=p.height/2,T.x=0-C.x,T.y=p.height/2-C.y),T=exports.CanvasPropertyUtility.getPointBySuperPoint(T,E.angle),tickers.tickers.pause({canvasAlias:a});let I=p.animate(a,{...C,pivotX:T.x,pivotY:T.y,scaleX:0,scaleY:0},{...S,aliasToRemoveAfter:g,completeOnContinue:h},d);if(I)return [I]}zr.zoomOut=Y;async function re(a,r,d={},f){let{direction:h="right",completeOnContinue:g=true,tickerIdToResume:S=[],motionBlur:E,...C}=d,T=[],I;r||(r=a),typeof S=="string"&&(S=[S]);let m,v=p.find(a);switch(v&&(m=`${a}_temp_push`,p.editAlias(a,m),v instanceof ne||v instanceof se?I=v.positionInfo:I={x:v.x,y:v.y,type:"pixel"}),r=e(a,r,{zIndex:v?v.parent?.getChildIndex(v):void 0}),v?.parent?.setChildIndex(v,v.parent.getChildIndex(v)-.1),m&&p.copyCanvasElementProperty(m,a),m&&tickers.tickers.transfer(m,a,"move"),I||((r instanceof ne||r instanceof se)&&r.haveEmptyTexture?I=r.positionInfo:I={x:r.x,y:r.y,type:"pixel"}),(r instanceof ne||r instanceof se)&&r.haveEmptyTexture&&await r.load(),h){case "up":r.y=p.height+r.height;break;case "down":r.y=-r.height;break;case "left":r.x=p.width+r.width;break;case "right":r.x=-r.width;break}let O=tickers.tickers.pause({canvasAlias:a});if(S.push(...O),m){let Z=w(m,{...d,direction:h,completeOnContinue:g});Z&&T.push(...Z);}let B=p.animate(a,t(I),{...C,tickerIdToResume:S,completeOnContinue:g},f);B&&T.push(B);let $=de(a,r,h,E,{...C,completeOnContinue:g},f);if($&&T.push($),T.length>0)return T}zr.pushIn=re;function w(a,r={direction:"right"},d){return L(a,r,d)}zr.pushOut=w;async function N(a,r,d={},f){let{angle:h,direction:g="right",invert:S=false,duration:E,delay:C,ease:T,completeOnContinue:I=true}=d,{aliasToRemoveAfter:m=[]}=d;r||(r=a),typeof m=="string"&&(m=[m]);let{component:v,oldComponentAlias:O}=n(a,r,"wipe");O&&m.push(O),(v instanceof ne||v instanceof se)&&v.haveEmptyTexture&&await v.load();let B={kind:"wipe",angle:h??o(g),invert:S,bounds:mt(v)},$=l(a,{config:B,apply:(Z,ue,pe)=>wi(Z,B,ue,pe),from:0,to:1,duration:E,delay:C,ease:T,completeOnContinue:I,aliasToRemoveAfter:m},f);if($)return [$]}zr.wipeIn=N;function G(a,r={},d){let{angle:f,direction:h="right",invert:g=false,duration:S,delay:E,ease:C,completeOnContinue:T=true}=r,{aliasToRemoveAfter:I=[]}=r;typeof I=="string"&&(I=[I]),I.push(a);let m=p.find(a);if(!m){k.warn(`The canvas component "${a}" is not found.`);return}let v={kind:"wipe",angle:f??o(h),invert:g,bounds:mt(m)},O=l(a,{config:v,apply:(B,$,Z)=>wi(B,v,$,Z),from:1,to:0,duration:S,delay:E,ease:C,completeOnContinue:T,aliasToRemoveAfter:I},d);if(O)return [O]}zr.wipeOut=G;async function M(a,r,d={},f){let{origin:h={},aspect:g=1,invert:S=false,duration:E,delay:C,ease:T,completeOnContinue:I=true}=d,{aliasToRemoveAfter:m=[]}=d;r||(r=a),typeof m=="string"&&(m=[m]);let{component:v,oldComponentAlias:O}=n(a,r,"iris");O&&m.push(O),(v instanceof ne||v instanceof se)&&v.haveEmptyTexture&&await v.load();let B={kind:"iris",originX:h.x??.5,originY:h.y??.5,aspect:g,invert:S,bounds:mt(v)},$=l(a,{config:B,apply:(Z,ue,pe)=>Si(Z,B,ue,pe),from:0,to:1,duration:E,delay:C,ease:T,completeOnContinue:I,aliasToRemoveAfter:m},f);if($)return [$]}zr.irisIn=M;function D(a,r={},d){let{origin:f={},aspect:h=1,invert:g=false,duration:S,delay:E,ease:C,completeOnContinue:T=true}=r,{aliasToRemoveAfter:I=[]}=r;typeof I=="string"&&(I=[I]),I.push(a);let m=p.find(a);if(!m){k.warn(`The canvas component "${a}" is not found.`);return}let v={kind:"iris",originX:f.x??.5,originY:f.y??.5,aspect:h,invert:g,bounds:mt(m)},O=l(a,{config:v,apply:(B,$,Z)=>Si(B,v,$,Z),from:1,to:0,duration:S,delay:E,ease:C,completeOnContinue:T,aliasToRemoveAfter:I},d);if(O)return [O]}zr.irisOut=D;async function V(a,r,d={},f){let{orientation:h="vertical",origin:g=.5,invert:S=false,duration:E,delay:C,ease:T,completeOnContinue:I=true}=d,{aliasToRemoveAfter:m=[]}=d;r||(r=a),typeof m=="string"&&(m=[m]);let{component:v,oldComponentAlias:O}=n(a,r,"split");O&&m.push(O),(v instanceof ne||v instanceof se)&&v.haveEmptyTexture&&await v.load();let B={kind:"split",orientation:h,origin:g,invert:S,bounds:mt(v)},$=l(a,{config:B,apply:(Z,ue,pe)=>Ai(Z,B,ue,pe),from:0,to:1,duration:E,delay:C,ease:T,completeOnContinue:I,aliasToRemoveAfter:m},f);if($)return [$]}zr.splitIn=V;function j(a,r={},d){let{orientation:f="vertical",origin:h=.5,invert:g=false,duration:S,delay:E,ease:C,completeOnContinue:T=true}=r,{aliasToRemoveAfter:I=[]}=r;typeof I=="string"&&(I=[I]),I.push(a);let m=p.find(a);if(!m){k.warn(`The canvas component "${a}" is not found.`);return}let v={kind:"split",orientation:f,origin:h,invert:g,bounds:mt(m)},O=l(a,{config:v,apply:(B,$,Z)=>Ai(B,v,$,Z),from:1,to:0,duration:S,delay:E,ease:C,completeOnContinue:T,aliasToRemoveAfter:I},d);if(O)return [O]}zr.splitOut=j;async function J(a,r,d={},f){let{strength:h=32,quality:g=4,duration:S,delay:E,ease:C,completeOnContinue:T=true,fadeComponent:I=true}=d,{aliasToRemoveAfter:m=[]}=d;r||(r=a),typeof m=="string"&&(m=[m]);let{component:v,oldComponentAlias:O}=n(a,r,"blur");O&&m.push(O),(v instanceof ne||v instanceof se)&&v.haveEmptyTexture&&await v.load();let B=S??1;I&&c(a,v,"in",B,f);let $=new filters.filters.BlurFilter({strength:h,quality:g}),Z=ce(a,v,$,{strength:[h,0]},{duration:B,delay:E,ease:C,completeOnContinue:T,aliasToRemoveAfter:m},f);if(Z)return [Z]}zr.blurIn=J;function U(a,r={},d){let{strength:f=32,quality:h=4,duration:g,delay:S,ease:E,completeOnContinue:C=true,fadeComponent:T=true}=r,{aliasToRemoveAfter:I=[]}=r;typeof I=="string"&&(I=[I]),I.push(a);let m=p.find(a);if(!m){k.warn(`The canvas component "${a}" is not found.`);return}let v=g??1;T&&c(a,m,"out",v,d);let O=new filters.filters.BlurFilter({strength:0,quality:h}),B=ce(a,m,O,{strength:[0,f]},{duration:v,delay:S,ease:E,completeOnContinue:C,aliasToRemoveAfter:I},d);if(B)return [B]}zr.blurOut=U;async function W(a,r,d={},f){let{pixelSize:h=32,duration:g,delay:S,ease:E,completeOnContinue:C=true,fadeComponent:T=false}=d,{aliasToRemoveAfter:I=[]}=d;r||(r=a),typeof I=="string"&&(I=[I]);let{component:m,oldComponentAlias:v}=n(a,r,"pixelate");v&&I.push(v),(m instanceof ne||m instanceof se)&&m.haveEmptyTexture&&await m.load();let O=g??1;T&&c(a,m,"in",O,f);let B=new filters.filters.PixelateFilter(h),$=ce(a,m,B,{sizeX:[h,1],sizeY:[h,1]},{duration:O,delay:S,ease:E,completeOnContinue:C,aliasToRemoveAfter:I},f);if($)return [$]}zr.pixelateIn=W;function Q(a,r={},d){let{pixelSize:f=32,duration:h,delay:g,ease:S,completeOnContinue:E=true,fadeComponent:C=false}=r,{aliasToRemoveAfter:T=[]}=r;typeof T=="string"&&(T=[T]),T.push(a);let I=p.find(a);if(!I){k.warn(`The canvas component "${a}" is not found.`);return}let m=h??1;C&&c(a,I,"out",m,d);let v=new filters.filters.PixelateFilter(1),O=ce(a,I,v,{sizeX:[1,f],sizeY:[1,f]},{duration:m,delay:g,ease:S,completeOnContinue:E,aliasToRemoveAfter:T},d);if(O)return [O]}zr.pixelateOut=Q;async function K(a,r,d={},f){let{color:h=16777215,maxAlpha:g=1,duration:S=.3,holdDuration:E=0,pulses:C=1,completeOnContinue:T=true,fadeComponent:I=true,...m}=d;r||(r=a);let v=p.find(a);if(v){let Z=ie(a,v,r,{color:h,maxAlpha:g,fadeDuration:S,holdDuration:E,pulses:C,completeOnContinue:T,rest:m,priority:f});return Z||void 0}let{component:O}=n(a,r,"flash");(O instanceof ne||O instanceof se)&&O.haveEmptyTexture&&await O.load(),I&&c(a,O,"in",S,f);let B=[],$=oe(O,{color:h,maxAlpha:g,fadeDuration:S,holdDuration:E,pulses:C,completeOnContinue:T,aliasToRemoveAfter:[],rest:m,priority:f});if($&&B.push($),B.length>0)return B}zr.flashIn=K;function X(a,r={},d){let{color:f=16777215,maxAlpha:h=1,duration:g=.3,holdDuration:S=0,pulses:E=1,completeOnContinue:C=true,fadeComponent:T=true,...I}=r,m=p.find(a);if(!m){k.warn(`The canvas component "${a}" is not found.`);return}if(T){let{total:O}=y(h,g,S,E);c(a,m,"out",O,d);}let v=oe(m,{color:f,maxAlpha:h,fadeDuration:g,holdDuration:S,pulses:E,completeOnContinue:C,aliasToRemoveAfter:[a],rest:I,priority:d});if(v)return [v]}zr.flashOut=X;function ee(a,r,d=0){let f=a.getBounds(),h=new Xe,g=new ut__default.default.Graphics;g.rect(0,0,f.width,f.height).fill(r),h.addChild(g),h.position.set(f.x,f.y),h.alpha=d;let S=`${a.label}_flash_${Math.random().toString(36).slice(2)}`;return p.add(S,h,{zIndex:(a.zIndex??0)+1}),S}function oe(a,r){let d=ee(a,r.color),{values:f,times:h,total:g}=y(r.maxAlpha,r.fadeDuration,r.holdDuration,r.pulses,r.endAtPeak??false),S=[...r.aliasToRemoveAfter,d];return p.animate(d,{alpha:f},{...r.rest,duration:g,times:h,aliasToRemoveAfter:S,completeOnContinue:r.completeOnContinue},r.priority)}function ie(a,r,d,f){let h=ee(r,f.color),{values:g,times:S,total:E}=y(f.maxAlpha,f.fadeDuration,f.holdDuration,f.pulses,true),C=p.animate(h,{alpha:g},{...f.rest,duration:E,times:S,completeOnContinue:false},f.priority);if(setTimeout(()=>{(async()=>{let{component:T,oldComponentAlias:I}=n(a,d,"flash");p.remove(I?[h,I]:[h]),(T instanceof ne||T instanceof se)&&T.haveEmptyTexture&&await T.load();let m=ee(T,f.color,f.maxAlpha);p.animate(m,{alpha:[f.maxAlpha,0]},{...f.rest,duration:f.fadeDuration,aliasToRemoveAfter:[m],completeOnContinue:f.completeOnContinue},f.priority);})();},E*1e3),C)return [C]}function de(a,r,d,f,h,g){if(!f)return;let S=f===true?40:f,E=d==="up"||d==="down"?"velocityY":"velocityX",C=d==="up"||d==="left"?-1:1,T=new filters.filters.MotionBlurFilter({velocity:{x:0,y:0},kernelSize:15});return ce(a,r,T,{[E]:[0,C*S,0]},{duration:h.duration??.3,delay:h.delay,ease:h.ease,completeOnContinue:h.completeOnContinue,autoplay:h.autoplay},g)}function Ae(a){let r=a.filter(d=>!!d);return r.length>0?r:void 0}async function Ce(a,r,d,f,h,g,S){let{duration:E,delay:C,ease:T,completeOnContinue:I=true,fadeComponent:m=h}=f,{aliasToRemoveAfter:v=[]}=f;typeof v=="string"&&(v=[v]);let{component:O,oldComponentAlias:B}=n(a,r??a,d);B&&v.push(B),(O instanceof ne||O instanceof se)&&O.haveEmptyTexture&&await O.load();let $=E??1;return m&&c(a,O,"in",$,g),Ae(S(O,{duration:$,delay:C,ease:T,completeOnContinue:I},v))}function ot(a,r,d,f,h){let{duration:g,delay:S,ease:E,completeOnContinue:C=true,fadeComponent:T=d}=r,{aliasToRemoveAfter:I=[]}=r;typeof I=="string"&&(I=[I]),I.push(a);let m=p.find(a);if(!m){k.warn(`The canvas component "${a}" is not found.`);return}let v=g??1;return T&&c(a,m,"out",v,f),Ae(h(m,{duration:v,delay:S,ease:E,completeOnContinue:C},I))}function Ei(a){let{width:r,height:d}=a.getBounds();return Math.hypot(r,d)/2}function Yt(a){return {x:a?.x??.5,y:a?.y??.5}}function Oi(a,r,d,f,h,g,S){let{strength:E=40,bursts:C=3,slices:T=8,rgbSplit:I=6}=f,m=$=>{let Z=Lt($,.5,C);return d==="in"?Z:Z.reverse()},v={...h,ease:h.ease??"linear"},O=new filters.filters.GlitchFilter({slices:T,offset:0});O.refresh(),O.padding=Math.ceil(Math.abs(E));let B=[ce(a,r,O,{offset:m(E)},{...v,aliasToRemoveAfter:g},S)];if(I!==0){let $=m(I),Z=new filters.filters.RGBSplitFilter({red:{x:0,y:0},green:{x:0,y:0},blue:{x:0,y:0}});Z.padding=Math.ceil(Math.abs(I)),B.push(ce(a,r,Z,{redX:$,blueX:$.map(ue=>-ue)},v,S));}return B}async function br(a,r,d={},f){return Ce(a,r,"glitch",d,true,f,(h,g,S)=>Oi(a,h,"in",d,g,S,f))}zr.glitchIn=br;function wr(a,r={},d){return ot(a,r,true,d,(f,h,g)=>Oi(a,f,"out",r,h,g,d))}zr.glitchOut=wr;function _i(a,r,d,f,h,g,S){let{angle:E=540,radius:C=Ei(r),origin:T}=f,I=Yt(T),m=E*Math.PI/180,v=d==="in"?[m,0]:[0,m],O=new filters.filters.TwistFilter({radius:C,angle:v[0]}),{width:B,height:$}=r.getBounds();O.padding=Math.max(O.padding,Ii({x:I.x*B,y:I.y*$},C,B,$));let Z=ce(a,r,O,{angle:v},{...h,aliasToRemoveAfter:g},S),{x:ue,y:pe}=st(r,I);return O.offsetX=ue,O.offsetY=pe,[Z]}async function Sr(a,r,d={},f){return Ce(a,r,"twist",d,true,f,(h,g,S)=>_i(a,h,"in",d,g,S,f))}zr.twistIn=Sr;function Ar(a,r={},d){return ot(a,r,true,d,(f,h,g)=>_i(a,f,"out",r,h,g,d))}zr.twistOut=Ar;function Mi(a,r,d,f,h,g,S){let{strength:E=.6,origin:C}=f,T=Yt(C),I=d==="in"?[E,0]:[0,E],m=new filters.filters.ZoomBlurFilter({center:{x:0,y:0},strength:I[0]}),{width:v,height:O}=r.getBounds();m.padding=ei({x:T.x*v,y:T.y*O},E,v,O);let B=ce(a,r,m,{strength:I},{...h,aliasToRemoveAfter:g},S),{x:$,y:Z}=st(r,T);return m.center={x:$,y:Z},[B]}async function Er(a,r,d={},f){return Ce(a,r,"warp",d,true,f,(h,g,S)=>Mi(a,h,"in",d,g,S,f))}zr.warpIn=Er;function Or(a,r={},d){return ot(a,r,true,d,(f,h,g)=>Mi(a,f,"out",r,h,g,d))}zr.warpOut=Or;function Ri(a,r,d,f,h,g){let{origin:S,amplitude:E=30,wavelength:C=160,speed:T=500}=d,I=Yt(S),{width:m,height:v}=r.getBounds(),O=new filters.filters.ShockwaveFilter({center:{x:0,y:0},amplitude:E,wavelength:C,speed:T,time:0});O.padding=Math.ceil(Math.abs(E)*1.25);let B=ti({x:I.x*m,y:I.y*v},{width:m,height:v},C,-1)/T,$=ce(a,r,O,{time:[0,B]},{...f,aliasToRemoveAfter:h},g),{x:Z,y:ue}=st(r,I);return O.center={x:Z,y:ue},[$]}async function _r(a,r,d={},f){return Ce(a,r,"ripple",d,true,f,(h,g,S)=>Ri(a,h,d,g,S,f))}zr.rippleIn=_r;function Mr(a,r={},d){return ot(a,r,true,d,(f,h,g)=>Ri(a,f,r,h,g,d))}zr.rippleOut=Mr;function Di(a,r,d,f,h,g,S){let{edge:E="hard",noiseScale:C=8,seed:T=Math.random()*1e3}=f,[I,m]=E==="hard"?[.25,.75]:[0,1],v=d==="in"?[I,m]:[m,I],O=new filters.filters.SimplexNoiseFilter({strength:v[0],noiseScale:C,offsetZ:T,step:E==="hard"?.5:0});return [ce(a,r,O,{strength:v},{...h,aliasToRemoveAfter:g},S)]}async function Rr(a,r,d={},f){return Ce(a,r,"noise",d,false,f,(h,g,S)=>Di(a,h,"in",d,g,S,f))}zr.noiseDissolveIn=Rr;function Dr(a,r={},d){return ot(a,r,false,d,(f,h,g)=>Di(a,f,"out",r,h,g,d))}zr.noiseDissolveOut=Dr;function ki(a,r,d,f,h,g,S){let{lineThickness:E=.02,brightness:C=3,scanlines:T=true}=f,I=r.scale.x,m=r.scale.y,v=m*E,O=d==="in"?[0,.45,1]:[0,.55,1],B=d==="in"?[0,I,I]:[I,I,0],$=d==="in"?[v,v,m]:[m,v,v],Z=d==="in"?[C,C,1]:[1,C,C];d==="in"&&r.scale.set(0,v);let ue=[p.animate(a,{scaleX:B,scaleY:$},{duration:h.duration,delay:h.delay,ease:h.ease,times:O,completeOnContinue:h.completeOnContinue,aliasToRemoveAfter:g},S),ce(a,r,new filters.filters.AdjustmentFilter({brightness:Z[0]}),{brightness:Z},{...h,times:O},S)];if(T){let pe=d==="in"?[.5,.5,0]:[0,.5,.5];ue.push(ce(a,r,new filters.filters.CRTFilter({curvature:0,vignettingAlpha:0,lineWidth:3,lineContrast:pe[0],noise:pe[0]}),{lineContrast:pe,noise:pe},{...h,times:O},S));}return ue}async function kr(a,r,d={},f){return Ce(a,r,"tv",d,false,f,(h,g,S)=>ki(a,h,"in",d,g,S,f))}zr.tvIn=kr;function Br(a,r={},d){return ot(a,r,false,d,(f,h,g)=>ki(a,f,"out",r,h,g,d))}zr.tvOut=Br;function Bi(a,r,d,f,h,g,S){let{strength:E=1,mode:C="pinch",radius:T=Ei(r),origin:I}=f,m=(C==="bulge"?1:-1)*E,v=Yt(I),O=d==="in"?[m,0]:[0,m],B=new filters.filters.BulgePinchFilter({center:v,radius:T,strength:O[0]});if(C==="bulge"){let{width:Fi,height:Li}=r.getBounds();B.padding=Ii({x:v.x*Fi,y:v.y*Li},T,Fi,Li);}let $=ce(a,r,B,{strength:O},{...h,aliasToRemoveAfter:g},S),{x:Z,y:ue,area:pe}=st(r,v);return B.center={x:Z/pe.width,y:ue/pe.height},[$]}async function Fr(a,r,d={},f){return Ce(a,r,"pinch",d,true,f,(h,g,S)=>Bi(a,h,"in",d,g,S,f))}zr.pinchIn=Fr;function Lr(a,r={},d){return ot(a,r,true,d,(f,h,g)=>Bi(a,f,"out",r,h,g,d))}zr.pinchOut=Lr;})(exports.transitions||={});var zt=class extends Xe{constructor(i){super(i);this._memory=i;this.pixivnId=i.pixivnId;}_memory;pixivnId;get memory(){return {...this._memory,...super.memory,elements:[],pixivnId:this.pixivnId}}};function Pr(){return async(e,i)=>{try{let n=e.canvasElementInfo;if(n){let o=new zt(n),l=n.zIndex;o.groupColor=16711680;let c=new ut__default.default.Graphics;c.rect(0,0,300,100).fill({color:16711680,alpha:.5}),o.addChild(c);let y=new ut__default.default.Text({text:`Error: ${n.label}`,x:10,y:10});o.addChild(y);let x=e.parent;if(x&&"addChild"in x)l!==void 0?x.addChildAt(o,l):x.addChild(o);else {let u=n.parentLabel?p.find(n.parentLabel):void 0;if(u)l!==void 0?u.addChildAt(o,l):u.addChild(o);else {let P=n.label??n.pixivnId;p.add(P,o,{zIndex:l});}}}}catch{}}}function vr(t,e,i){let n={...p.find(t)?.memory,...i},o=new gt({text:e,...i});return n&&p.copyCanvasElementProperty(n,o),p.add(t,o,{ignoreOldStyle:true,zIndex:i?.zIndex}),o}var {Assets:il,Color:nl,Rectangle:rl,TextStyle:sl,Texture:ol,UPDATE_PRIORITY:al}=ut__default.default,p=new kt;Pe.init({getScreen:()=>p.screen});core.GameUnifier.addOnPreContinue(async()=>{try{let{tikersIds:t,stepAlias:e}=tickers.drainCompleteOnStepEndQueue(),i=(async()=>{for(;t.length;){let{id:o}=t.pop()||{};o&&await tickers.tickers.forceCompletion(o);}})(),n=(async()=>{for(;e.length;){let{alias:o,id:l}=e.pop()||{};o&&l&&await tickers.tickers.forceCompletion(l,o);}})();await Promise.all([i,n]);}catch{}});
2
- exports.Assets=il;exports.CanvasBaseItem=Qt;exports.CanvasManagerStatic=fe;exports.Color=nl;exports.Container=Xe;exports.ImageContainer=se;exports.ImageSprite=ne;exports.Rectangle=rl;exports.RegisteredCanvasComponents=Ie;exports.RegisteredEvents=pi;exports.Sprite=pt;exports.Text=gt;exports.TextStyle=sl;exports.Texture=ol;exports.UPDATE_PRIORITY=al;exports.VideoSprite=Ze;exports.addImage=ri;exports.addImageCointainer=ni;exports.addListenerHandler=dt;exports.addVideo=si;exports.analizePositionsExtensionProps=$e;exports.canvas=p;exports.canvasComponentDecorator=bn;exports.drawCanvasErrorHandler=Pr;exports.eventDecorator=Tn;exports.getTexture=Bt;exports.moveIn=hr;exports.moveOut=pr;exports.pushIn=yr;exports.pushOut=xr;exports.removeWithDissolve=dr;exports.removeWithFade=fr;exports.setMemoryContainer=Be;exports.shakeEffect=tr;exports.showImage=or;exports.showImageContainer=sr;exports.showText=vr;exports.showVideo=ar;exports.showWithDissolve=cr;exports.showWithFade=ur;exports.zoomIn=gr;exports.zoomOut=mr;Object.keys(tickers).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return tickers[k]}})});
1
+ 'use strict';var core=require('@drincs/pixi-vn/core'),dt=require('@drincs/pixi-vn/pixi.js'),tickers=require('@drincs/pixi-vn/tickers'),devtools=require('@pixi/devtools'),filters=require('@drincs/pixi-vn/filters');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var dt__default=/*#__PURE__*/_interopDefault(dt);var Ci=Object.defineProperty;var Gn=t=>{throw TypeError(t)};var bi=(t,e,n)=>e in t?Ci(t,e,{enumerable:true,configurable:true,writable:true,value:n}):t[e]=n;var Ie=(t,e,n)=>bi(t,typeof e!="symbol"?e+"":e,n),fn=(t,e,n)=>e.has(t)||Gn("Cannot "+n);var a=(t,e,n)=>(fn(t,e,"read from private field"),n?n.call(t):e.get(t)),ie=(t,e,n)=>e.has(t)?Gn("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),H=(t,e,n,i)=>(fn(t,e,"write to private field"),e.set(t,n),n),F=(t,e,n)=>(fn(t,e,"access private method"),n);var Gt=(t,e,n,i)=>({set _(s){H(t,e,s);},get _(){return a(t,e,i)}});var wi={extension:{type:"sceneProperties",name:"additional-positions"},testNode(t){return "xAlign"in t||"yAlign"in t||"percentageX"in t||"percentageY"in t||"positionType"in t},testProp(t){switch(t){case "xAlign":case "yAlign":case "percentageX":case "percentageY":case "positionType":return true;default:return false}},setProperty(t,e,n){switch(e){case "xAlign":"xAlign"in t&&(t.xAlign=n/100);break;case "yAlign":"yAlign"in t&&(t.yAlign=n/100);break;case "percentageX":"percentageX"in t&&(t.percentageX=n/100);break;case "percentageY":"percentageY"in t&&(t.percentageY=n/100);break}},getProperties(t){return [{value:t.positionType,prop:"positionType",entry:{section:"Transform",type:"text",label:"Position Type"}},{value:t.xAlign*100,prop:"xAlign",entry:{section:"Transform",type:"range",label:"X Align",tooltip:"0% is left, 100% is right",options:{min:0,max:100}}},{value:t.yAlign*100,prop:"yAlign",entry:{section:"Transform",type:"range",label:"Y Align",tooltip:"0% is top, 100% is bottom",options:{min:0,max:100}}},{value:t.percentageX*100,prop:"percentageX",entry:{section:"Transform",type:"range",label:"X Percentage Position",tooltip:"0% is left, 100% is right",options:{min:0,max:100}}},{value:t.percentageY*100,prop:"percentageY",entry:{section:"Transform",type:"range",label:"Y Percentage Position",tooltip:"0% is top, 100% is bottom",options:{min:0,max:100}}}]}},Nn=wi;var Be="__game_layer__",mt="Container",Nt="ImageContainer",yt="Image",xt="Sprite",Pt="Text",vt="Video";var k;(s=>(s.log=(c,...l)=>console.log(`[Pixi\u2019VN] ${c}`,...l),s.warn=(c,...l)=>console.warn(`[Pixi\u2019VN] ${c}`,...l),s.error=(c,...l)=>console.error(`[Pixi\u2019VN] ${c}`,...l),s.info=(c,...l)=>console.info(`[Pixi\u2019VN] ${c}`,...l)))(k||={});function Vn(t,e){let n=0;return async(...i)=>{let s=Date.now();if(s-n>=e)return n=s,await t(...i)}}var fe=class t{constructor(){}static _app=void 0;static get app(){if(!t._app)throw k.error("The canvas is not initialized"),new core.PixiError("invalid_usage","CanvasManagerStatic.app is undefined");return t._app}static get gameLayer(){let e=t.app.stage.getChildByLabel(Be);return e||(e=new dt__default.default.Container,e.label=Be,t.app.stage.addChild(e)),e}static htmlLayers=[];static canvasWidth=300;static canvasHeight=300;static _isInitialized=false;static async init(e,n,i){let{id:s="pixi-vn-canvas",width:c=800,height:l=600,resolution:v=1,autoDensity:m=true,resizeMode:h="contain",...y}=n||{};return t.canvasWidth=c,t.canvasHeight=l,t._app=new dt__default.default.Application,t.app.init({width:c,height:l,resolution:v,autoDensity:m,...y}).then(()=>{let{app:I=t.app,extensions:S=[],...Y}=i||{};if(devtools.initDevtools({app:I,extensions:[Nn,...S],...Y}),t._isInitialized=true,t.addCanvasIntoHTMLElement(e,s),h==="contain"){let U=Vn(async()=>{requestAnimationFrame(()=>t.resize());},10);new ResizeObserver(U).observe(e),t.resize(),setTimeout(()=>t.resize(),750);}t.gameLayer;})}static addCanvasIntoHTMLElement(e,n){t._isInitialized?(e.appendChild(t.app.canvas),t.app.canvas.id=n):k.error("GameWindowManager is not initialized");}static addHtmlLayer(e,n,i={}){let{position:s="absolute",pointerEvents:c="none",userSelect:l="none"}=i,v=document.createElement("div");v.setAttribute("id",e),v.style.position=s,v.style.pointerEvents=c,v.style.userSelect=l;let m=n.appendChild(v);return t.htmlLayers.push(v),t.resize(),m}static removeHtmlLayer(e){let n=t.htmlLayers.find(i=>i.id===e);n&&(n.remove(),t.htmlLayers=t.htmlLayers.filter(i=>i.id!==e));}static getHtmlLayer(e){return t.htmlLayers.find(n=>n.id===e)}static async resize(){let e=t.canvasWidth,n=t.canvasHeight,i=t.app.resizeTo,s=t.app.canvas.style;i instanceof HTMLElement||(i=document.documentElement);let c,l;if(i===document.body||i===document.documentElement)c=document.documentElement.clientWidth||window.innerWidth,l=document.documentElement.clientHeight||window.innerHeight;else {let S=i.getBoundingClientRect();c=S.width||i.clientWidth,l=S.height||i.clientHeight;}let v=Math.min(c/e,l/n),m=Math.floor(v*e),h=Math.floor(v*n);s.width=`${m}px`,s.height=`${h}px`;let y=(c-m)/2,I=(l-h)/2;s.marginLeft=`${y}px`,s.marginRight=`${y}px`,s.marginTop=`${I}px`,s.marginBottom=`${I}px`,t.htmlLayers.forEach(S=>{S.style.width=`${m}px`,S.style.height=`${h}px`,S.style.marginLeft=`${y}px`,S.style.marginRight=`${y}px`,S.style.marginTop=`${I}px`,S.style.marginBottom=`${I}px`;});}static get childrenAliasesOrder(){return t.gameLayer.children.filter(e=>e.label).sort((e,n)=>t.gameLayer.getChildIndex(e)-t.gameLayer.getChildIndex(n)).map(e=>e.label)}};var Tt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,qn=new Set,hn=typeof process=="object"&&process?process:{},Zn=(t,e,n,i)=>{typeof hn.emitWarning=="function"?hn.emitWarning(t,e,n,i):console.error(`[${n}] ${e}: ${t}`);},$t=globalThis.AbortController,$n=globalThis.AbortSignal;if(typeof $t>"u"){$n=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,s){this._onabort.push(s);}},$t=class{constructor(){e();}signal=new $n;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=true;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i);}}};let t=hn.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{t&&(t=false,Zn("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e));};}var Ei=t=>!qn.has(t);var Je=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Jn=t=>Je(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?It:null:null,It=class extends Array{constructor(e){super(e),this.fill(0);}},Ct,ot=class ot{heap;length;static create(e){let n=Jn(e);if(!n)return [];H(ot,Ct,true);let i=new ot(e,n);return H(ot,Ct,false),i}constructor(e,n){if(!a(ot,Ct))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(e),this.length=0;}push(e){this.heap[this.length++]=e;}pop(){return this.heap[--this.length]}};Ct=new WeakMap,ie(ot,Ct,false);var pn=ot,jn,Kn,Fe,Ee,Le,ze,bt,wt,me,Ye,pe,ue,Z,Se,Oe,be,xe,Ue,Pe,We,He,_e,Ge,nt,Ae,D,gn,at,Ke,Rt,Me,Qn,ct,St,Dt,Qe,et,mn,Vt,Xt,de,yn,Mt,tt,xn,Pn=class Pn{constructor(e){ie(this,D);ie(this,Fe);ie(this,Ee);ie(this,Le);ie(this,ze);ie(this,bt);ie(this,wt);Ie(this,"ttl");Ie(this,"ttlResolution");Ie(this,"ttlAutopurge");Ie(this,"updateAgeOnGet");Ie(this,"updateAgeOnHas");Ie(this,"allowStale");Ie(this,"noDisposeOnSet");Ie(this,"noUpdateTTL");Ie(this,"maxEntrySize");Ie(this,"sizeCalculation");Ie(this,"noDeleteOnFetchRejection");Ie(this,"noDeleteOnStaleGet");Ie(this,"allowStaleOnFetchAbort");Ie(this,"allowStaleOnFetchRejection");Ie(this,"ignoreFetchAbort");ie(this,me);ie(this,Ye);ie(this,pe);ie(this,ue);ie(this,Z);ie(this,Se);ie(this,Oe);ie(this,be);ie(this,xe);ie(this,Ue);ie(this,Pe);ie(this,We);ie(this,He);ie(this,_e);ie(this,Ge);ie(this,nt);ie(this,Ae);ie(this,at,()=>{});ie(this,Ke,()=>{});ie(this,Rt,()=>{});ie(this,Me,()=>false);ie(this,ct,e=>{});ie(this,St,(e,n,i)=>{});ie(this,Dt,(e,n,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Ie(this,jn,"LRUCache");let{max:n=0,ttl:i,ttlResolution:s=1,ttlAutopurge:c,updateAgeOnGet:l,updateAgeOnHas:v,allowStale:m,dispose:h,disposeAfter:y,noDisposeOnSet:I,noUpdateTTL:S,maxSize:Y=0,maxEntrySize:U=0,sizeCalculation:L,fetchMethod:oe,memoMethod:E,noDeleteOnFetchRejection:K,noDeleteOnStaleGet:G,allowStaleOnFetchRejection:R,allowStaleOnFetchAbort:B,ignoreFetchAbort:V}=e;if(n!==0&&!Je(n))throw new TypeError("max option must be a nonnegative integer");let X=n?Jn(n):Array;if(!X)throw new Error("invalid max value: "+n);if(H(this,Fe,n),H(this,Ee,Y),this.maxEntrySize=U||a(this,Ee),this.sizeCalculation=L,this.sizeCalculation){if(!a(this,Ee)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(E!==void 0&&typeof E!="function")throw new TypeError("memoMethod must be a function if defined");if(H(this,wt,E),oe!==void 0&&typeof oe!="function")throw new TypeError("fetchMethod must be a function if specified");if(H(this,bt,oe),H(this,nt,!!oe),H(this,pe,new Map),H(this,ue,new Array(n).fill(void 0)),H(this,Z,new Array(n).fill(void 0)),H(this,Se,new X(n)),H(this,Oe,new X(n)),H(this,be,0),H(this,xe,0),H(this,Ue,pn.create(n)),H(this,me,0),H(this,Ye,0),typeof h=="function"&&H(this,Le,h),typeof y=="function"?(H(this,ze,y),H(this,Pe,[])):(H(this,ze,void 0),H(this,Pe,void 0)),H(this,Ge,!!a(this,Le)),H(this,Ae,!!a(this,ze)),this.noDisposeOnSet=!!I,this.noUpdateTTL=!!S,this.noDeleteOnFetchRejection=!!K,this.allowStaleOnFetchRejection=!!R,this.allowStaleOnFetchAbort=!!B,this.ignoreFetchAbort=!!V,this.maxEntrySize!==0){if(a(this,Ee)!==0&&!Je(a(this,Ee)))throw new TypeError("maxSize must be a positive integer if specified");if(!Je(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");F(this,D,Qn).call(this);}if(this.allowStale=!!m,this.noDeleteOnStaleGet=!!G,this.updateAgeOnGet=!!l,this.updateAgeOnHas=!!v,this.ttlResolution=Je(s)||s===0?s:1,this.ttlAutopurge=!!c,this.ttl=i||0,this.ttl){if(!Je(this.ttl))throw new TypeError("ttl must be a positive integer if specified");F(this,D,gn).call(this);}if(a(this,Fe)===0&&this.ttl===0&&a(this,Ee)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!a(this,Fe)&&!a(this,Ee)){let Q="LRU_CACHE_UNBOUNDED";Ei(Q)&&(qn.add(Q),Zn("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",Q,Pn));}}static unsafeExposeInternals(e){return {starts:a(e,He),ttls:a(e,_e),sizes:a(e,We),keyMap:a(e,pe),keyList:a(e,ue),valList:a(e,Z),next:a(e,Se),prev:a(e,Oe),get head(){return a(e,be)},get tail(){return a(e,xe)},free:a(e,Ue),isBackgroundFetch:n=>{var i;return F(i=e,D,de).call(i,n)},backgroundFetch:(n,i,s,c)=>{var l;return F(l=e,D,Xt).call(l,n,i,s,c)},moveToTail:n=>{var i;return F(i=e,D,Mt).call(i,n)},indexes:n=>{var i;return F(i=e,D,Qe).call(i,n)},rindexes:n=>{var i;return F(i=e,D,et).call(i,n)},isStale:n=>{var i;return a(i=e,Me).call(i,n)}}}get max(){return a(this,Fe)}get maxSize(){return a(this,Ee)}get calculatedSize(){return a(this,Ye)}get size(){return a(this,me)}get fetchMethod(){return a(this,bt)}get memoMethod(){return a(this,wt)}get dispose(){return a(this,Le)}get disposeAfter(){return a(this,ze)}getRemainingTTL(e){return a(this,pe).has(e)?1/0:0}*entries(){for(let e of F(this,D,Qe).call(this))a(this,Z)[e]!==void 0&&a(this,ue)[e]!==void 0&&!F(this,D,de).call(this,a(this,Z)[e])&&(yield [a(this,ue)[e],a(this,Z)[e]]);}*rentries(){for(let e of F(this,D,et).call(this))a(this,Z)[e]!==void 0&&a(this,ue)[e]!==void 0&&!F(this,D,de).call(this,a(this,Z)[e])&&(yield [a(this,ue)[e],a(this,Z)[e]]);}*keys(){for(let e of F(this,D,Qe).call(this)){let n=a(this,ue)[e];n!==void 0&&!F(this,D,de).call(this,a(this,Z)[e])&&(yield n);}}*rkeys(){for(let e of F(this,D,et).call(this)){let n=a(this,ue)[e];n!==void 0&&!F(this,D,de).call(this,a(this,Z)[e])&&(yield n);}}*values(){for(let e of F(this,D,Qe).call(this))a(this,Z)[e]!==void 0&&!F(this,D,de).call(this,a(this,Z)[e])&&(yield a(this,Z)[e]);}*rvalues(){for(let e of F(this,D,et).call(this))a(this,Z)[e]!==void 0&&!F(this,D,de).call(this,a(this,Z)[e])&&(yield a(this,Z)[e]);}[(Kn=Symbol.iterator,jn=Symbol.toStringTag,Kn)](){return this.entries()}find(e,n={}){for(let i of F(this,D,Qe).call(this)){let s=a(this,Z)[i],c=F(this,D,de).call(this,s)?s.__staleWhileFetching:s;if(c!==void 0&&e(c,a(this,ue)[i],this))return this.get(a(this,ue)[i],n)}}forEach(e,n=this){for(let i of F(this,D,Qe).call(this)){let s=a(this,Z)[i],c=F(this,D,de).call(this,s)?s.__staleWhileFetching:s;c!==void 0&&e.call(n,c,a(this,ue)[i],this);}}rforEach(e,n=this){for(let i of F(this,D,et).call(this)){let s=a(this,Z)[i],c=F(this,D,de).call(this,s)?s.__staleWhileFetching:s;c!==void 0&&e.call(n,c,a(this,ue)[i],this);}}purgeStale(){let e=false;for(let n of F(this,D,et).call(this,{allowStale:true}))a(this,Me).call(this,n)&&(F(this,D,tt).call(this,a(this,ue)[n],"expire"),e=true);return e}info(e){let n=a(this,pe).get(e);if(n===void 0)return;let i=a(this,Z)[n],s=F(this,D,de).call(this,i)?i.__staleWhileFetching:i;if(s===void 0)return;let c={value:s};if(a(this,_e)&&a(this,He)){let l=a(this,_e)[n],v=a(this,He)[n];if(l&&v){let m=l-(Tt.now()-v);c.ttl=m,c.start=Date.now();}}return a(this,We)&&(c.size=a(this,We)[n]),c}dump(){let e=[];for(let n of F(this,D,Qe).call(this,{allowStale:true})){let i=a(this,ue)[n],s=a(this,Z)[n],c=F(this,D,de).call(this,s)?s.__staleWhileFetching:s;if(c===void 0||i===void 0)continue;let l={value:c};if(a(this,_e)&&a(this,He)){l.ttl=a(this,_e)[n];let v=Tt.now()-a(this,He)[n];l.start=Math.floor(Date.now()-v);}a(this,We)&&(l.size=a(this,We)[n]),e.unshift([i,l]);}return e}load(e){this.clear();for(let[n,i]of e){if(i.start){let s=Date.now()-i.start;i.start=Tt.now()-s;}this.set(n,i.value,i);}}set(e,n,i={}){var S,Y,U;if(n===void 0)return this.delete(e),this;let{ttl:s=this.ttl,start:c,noDisposeOnSet:l=this.noDisposeOnSet,sizeCalculation:v=this.sizeCalculation,status:m}=i,{noUpdateTTL:h=this.noUpdateTTL}=i,y=a(this,Dt).call(this,e,n,i.size||0,v);if(this.maxEntrySize&&y>this.maxEntrySize)return m&&(m.set="miss",m.maxEntrySizeExceeded=true),F(this,D,tt).call(this,e,"set"),this;let I=a(this,me)===0?void 0:a(this,pe).get(e);if(I===void 0)I=a(this,me)===0?a(this,xe):a(this,Ue).length!==0?a(this,Ue).pop():a(this,me)===a(this,Fe)?F(this,D,Vt).call(this,false):a(this,me),a(this,ue)[I]=e,a(this,Z)[I]=n,a(this,pe).set(e,I),a(this,Se)[a(this,xe)]=I,a(this,Oe)[I]=a(this,xe),H(this,xe,I),Gt(this,me)._++,a(this,St).call(this,I,y,m),m&&(m.set="add"),h=false;else {F(this,D,Mt).call(this,I);let L=a(this,Z)[I];if(n!==L){if(a(this,nt)&&F(this,D,de).call(this,L)){L.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:oe}=L;oe!==void 0&&!l&&(a(this,Ge)&&((S=a(this,Le))==null||S.call(this,oe,e,"set")),a(this,Ae)&&a(this,Pe)?.push([oe,e,"set"]));}else l||(a(this,Ge)&&((Y=a(this,Le))==null||Y.call(this,L,e,"set")),a(this,Ae)&&a(this,Pe)?.push([L,e,"set"]));if(a(this,ct).call(this,I),a(this,St).call(this,I,y,m),a(this,Z)[I]=n,m){m.set="replace";let oe=L&&F(this,D,de).call(this,L)?L.__staleWhileFetching:L;oe!==void 0&&(m.oldValue=oe);}}else m&&(m.set="update");}if(s!==0&&!a(this,_e)&&F(this,D,gn).call(this),a(this,_e)&&(h||a(this,Rt).call(this,I,s,c),m&&a(this,Ke).call(this,m,I)),!l&&a(this,Ae)&&a(this,Pe)){let L=a(this,Pe),oe;for(;oe=L?.shift();)(U=a(this,ze))==null||U.call(this,...oe);}return this}pop(){var e;try{for(;a(this,me);){let n=a(this,Z)[a(this,be)];if(F(this,D,Vt).call(this,!0),F(this,D,de).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(a(this,Ae)&&a(this,Pe)){let n=a(this,Pe),i;for(;i=n?.shift();)(e=a(this,ze))==null||e.call(this,...i);}}}has(e,n={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=n,c=a(this,pe).get(e);if(c!==void 0){let l=a(this,Z)[c];if(F(this,D,de).call(this,l)&&l.__staleWhileFetching===void 0)return false;if(a(this,Me).call(this,c))s&&(s.has="stale",a(this,Ke).call(this,s,c));else return i&&a(this,at).call(this,c),s&&(s.has="hit",a(this,Ke).call(this,s,c)),true}else s&&(s.has="miss");return false}peek(e,n={}){let{allowStale:i=this.allowStale}=n,s=a(this,pe).get(e);if(s===void 0||!i&&a(this,Me).call(this,s))return;let c=a(this,Z)[s];return F(this,D,de).call(this,c)?c.__staleWhileFetching:c}async fetch(e,n={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:c=this.noDeleteOnStaleGet,ttl:l=this.ttl,noDisposeOnSet:v=this.noDisposeOnSet,size:m=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:y=this.noUpdateTTL,noDeleteOnFetchRejection:I=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:S=this.allowStaleOnFetchRejection,ignoreFetchAbort:Y=this.ignoreFetchAbort,allowStaleOnFetchAbort:U=this.allowStaleOnFetchAbort,context:L,forceRefresh:oe=false,status:E,signal:K}=n;if(!a(this,nt))return E&&(E.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:c,status:E});let G={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:c,ttl:l,noDisposeOnSet:v,size:m,sizeCalculation:h,noUpdateTTL:y,noDeleteOnFetchRejection:I,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:U,ignoreFetchAbort:Y,status:E,signal:K},R=a(this,pe).get(e);if(R===void 0){E&&(E.fetch="miss");let B=F(this,D,Xt).call(this,e,R,G,L);return B.__returned=B}else {let B=a(this,Z)[R];if(F(this,D,de).call(this,B)){let W=i&&B.__staleWhileFetching!==void 0;return E&&(E.fetch="inflight",W&&(E.returnedStale=true)),W?B.__staleWhileFetching:B.__returned=B}let V=a(this,Me).call(this,R);if(!oe&&!V)return E&&(E.fetch="hit"),F(this,D,Mt).call(this,R),s&&a(this,at).call(this,R),E&&a(this,Ke).call(this,E,R),B;let X=F(this,D,Xt).call(this,e,R,G,L),$=X.__staleWhileFetching!==void 0&&i;return E&&(E.fetch=V?"stale":"refresh",$&&V&&(E.returnedStale=true)),$?X.__staleWhileFetching:X.__returned=X}}async forceFetch(e,n={}){let i=await this.fetch(e,n);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,n={}){let i=a(this,wt);if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:c,...l}=n,v=this.get(e,l);if(!c&&v!==void 0)return v;let m=i(e,v,{options:l,context:s});return this.set(e,m,l),m}get(e,n={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:c=this.noDeleteOnStaleGet,status:l}=n,v=a(this,pe).get(e);if(v!==void 0){let m=a(this,Z)[v],h=F(this,D,de).call(this,m);return l&&a(this,Ke).call(this,l,v),a(this,Me).call(this,v)?(l&&(l.get="stale"),h?(l&&i&&m.__staleWhileFetching!==void 0&&(l.returnedStale=true),i?m.__staleWhileFetching:void 0):(c||F(this,D,tt).call(this,e,"expire"),l&&i&&(l.returnedStale=true),i?m:void 0)):(l&&(l.get="hit"),h?m.__staleWhileFetching:(F(this,D,Mt).call(this,v),s&&a(this,at).call(this,v),m))}else l&&(l.get="miss");}delete(e){return F(this,D,tt).call(this,e,"delete")}clear(){return F(this,D,xn).call(this,"delete")}};Fe=new WeakMap,Ee=new WeakMap,Le=new WeakMap,ze=new WeakMap,bt=new WeakMap,wt=new WeakMap,me=new WeakMap,Ye=new WeakMap,pe=new WeakMap,ue=new WeakMap,Z=new WeakMap,Se=new WeakMap,Oe=new WeakMap,be=new WeakMap,xe=new WeakMap,Ue=new WeakMap,Pe=new WeakMap,We=new WeakMap,He=new WeakMap,_e=new WeakMap,Ge=new WeakMap,nt=new WeakMap,Ae=new WeakMap,D=new WeakSet,gn=function(){let e=new It(a(this,Fe)),n=new It(a(this,Fe));H(this,_e,e),H(this,He,n),H(this,Rt,(c,l,v=Tt.now())=>{if(n[c]=l!==0?v:0,e[c]=l,l!==0&&this.ttlAutopurge){let m=setTimeout(()=>{a(this,Me).call(this,c)&&F(this,D,tt).call(this,a(this,ue)[c],"expire");},l+1);m.unref&&m.unref();}}),H(this,at,c=>{n[c]=e[c]!==0?Tt.now():0;}),H(this,Ke,(c,l)=>{if(e[l]){let v=e[l],m=n[l];if(!v||!m)return;c.ttl=v,c.start=m,c.now=i||s();let h=c.now-m;c.remainingTTL=v-h;}});let i=0,s=()=>{let c=Tt.now();if(this.ttlResolution>0){i=c;let l=setTimeout(()=>i=0,this.ttlResolution);l.unref&&l.unref();}return c};this.getRemainingTTL=c=>{let l=a(this,pe).get(c);if(l===void 0)return 0;let v=e[l],m=n[l];if(!v||!m)return 1/0;let h=(i||s())-m;return v-h},H(this,Me,c=>{let l=n[c],v=e[c];return !!v&&!!l&&(i||s())-l>v});},at=new WeakMap,Ke=new WeakMap,Rt=new WeakMap,Me=new WeakMap,Qn=function(){let e=new It(a(this,Fe));H(this,Ye,0),H(this,We,e),H(this,ct,n=>{H(this,Ye,a(this,Ye)-e[n]),e[n]=0;}),H(this,Dt,(n,i,s,c)=>{if(F(this,D,de).call(this,i))return 0;if(!Je(s))if(c){if(typeof c!="function")throw new TypeError("sizeCalculation must be a function");if(s=c(i,n),!Je(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s}),H(this,St,(n,i,s)=>{if(e[n]=i,a(this,Ee)){let c=a(this,Ee)-e[n];for(;a(this,Ye)>c;)F(this,D,Vt).call(this,true);}H(this,Ye,a(this,Ye)+e[n]),s&&(s.entrySize=i,s.totalCalculatedSize=a(this,Ye));});},ct=new WeakMap,St=new WeakMap,Dt=new WeakMap,Qe=function*({allowStale:e=this.allowStale}={}){if(a(this,me))for(let n=a(this,xe);!(!F(this,D,mn).call(this,n)||((e||!a(this,Me).call(this,n))&&(yield n),n===a(this,be)));)n=a(this,Oe)[n];},et=function*({allowStale:e=this.allowStale}={}){if(a(this,me))for(let n=a(this,be);!(!F(this,D,mn).call(this,n)||((e||!a(this,Me).call(this,n))&&(yield n),n===a(this,xe)));)n=a(this,Se)[n];},mn=function(e){return e!==void 0&&a(this,pe).get(a(this,ue)[e])===e},Vt=function(e){var c;let n=a(this,be),i=a(this,ue)[n],s=a(this,Z)[n];return a(this,nt)&&F(this,D,de).call(this,s)?s.__abortController.abort(new Error("evicted")):(a(this,Ge)||a(this,Ae))&&(a(this,Ge)&&((c=a(this,Le))==null||c.call(this,s,i,"evict")),a(this,Ae)&&a(this,Pe)?.push([s,i,"evict"])),a(this,ct).call(this,n),e&&(a(this,ue)[n]=void 0,a(this,Z)[n]=void 0,a(this,Ue).push(n)),a(this,me)===1?(H(this,be,H(this,xe,0)),a(this,Ue).length=0):H(this,be,a(this,Se)[n]),a(this,pe).delete(i),Gt(this,me)._--,n},Xt=function(e,n,i,s){let c=n===void 0?void 0:a(this,Z)[n];if(F(this,D,de).call(this,c))return c;let l=new $t,{signal:v}=i;v?.addEventListener("abort",()=>l.abort(v.reason),{signal:l.signal});let m={signal:l.signal,options:i,context:s},h=(L,oe=false)=>{let{aborted:E}=l.signal,K=i.ignoreFetchAbort&&L!==void 0;if(i.status&&(E&&!oe?(i.status.fetchAborted=true,i.status.fetchError=l.signal.reason,K&&(i.status.fetchAbortIgnored=true)):i.status.fetchResolved=true),E&&!K&&!oe)return I(l.signal.reason);let G=Y;return a(this,Z)[n]===Y&&(L===void 0?G.__staleWhileFetching?a(this,Z)[n]=G.__staleWhileFetching:F(this,D,tt).call(this,e,"fetch"):(i.status&&(i.status.fetchUpdated=true),this.set(e,L,m.options))),L},y=L=>(i.status&&(i.status.fetchRejected=true,i.status.fetchError=L),I(L)),I=L=>{let{aborted:oe}=l.signal,E=oe&&i.allowStaleOnFetchAbort,K=E||i.allowStaleOnFetchRejection,G=K||i.noDeleteOnFetchRejection,R=Y;if(a(this,Z)[n]===Y&&(!G||R.__staleWhileFetching===void 0?F(this,D,tt).call(this,e,"fetch"):E||(a(this,Z)[n]=R.__staleWhileFetching)),K)return i.status&&R.__staleWhileFetching!==void 0&&(i.status.returnedStale=true),R.__staleWhileFetching;if(R.__returned===R)throw L},S=(L,oe)=>{var K;let E=(K=a(this,bt))==null?void 0:K.call(this,e,c,m);E&&E instanceof Promise&&E.then(G=>L(G===void 0?void 0:G),oe),l.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(L(void 0),i.allowStaleOnFetchAbort&&(L=G=>h(G,true)));});};i.status&&(i.status.fetchDispatched=true);let Y=new Promise(S).then(h,y),U=Object.assign(Y,{__abortController:l,__staleWhileFetching:c,__returned:void 0});return n===void 0?(this.set(e,U,{...m.options,status:void 0}),n=a(this,pe).get(e)):a(this,Z)[n]=U,U},de=function(e){if(!a(this,nt))return false;let n=e;return !!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof $t},yn=function(e,n){a(this,Oe)[n]=e,a(this,Se)[e]=n;},Mt=function(e){e!==a(this,xe)&&(e===a(this,be)?H(this,be,a(this,Se)[e]):F(this,D,yn).call(this,a(this,Oe)[e],a(this,Se)[e]),F(this,D,yn).call(this,a(this,xe),e),H(this,xe,e));},tt=function(e,n){var s,c;let i=false;if(a(this,me)!==0){let l=a(this,pe).get(e);if(l!==void 0)if(i=true,a(this,me)===1)F(this,D,xn).call(this,n);else {a(this,ct).call(this,l);let v=a(this,Z)[l];if(F(this,D,de).call(this,v)?v.__abortController.abort(new Error("deleted")):(a(this,Ge)||a(this,Ae))&&(a(this,Ge)&&((s=a(this,Le))==null||s.call(this,v,e,n)),a(this,Ae)&&a(this,Pe)?.push([v,e,n])),a(this,pe).delete(e),a(this,ue)[l]=void 0,a(this,Z)[l]=void 0,l===a(this,xe))H(this,xe,a(this,Oe)[l]);else if(l===a(this,be))H(this,be,a(this,Se)[l]);else {let m=a(this,Oe)[l];a(this,Se)[m]=a(this,Se)[l];let h=a(this,Se)[l];a(this,Oe)[h]=a(this,Oe)[l];}Gt(this,me)._--,a(this,Ue).push(l);}}if(a(this,Ae)&&a(this,Pe)?.length){let l=a(this,Pe),v;for(;v=l?.shift();)(c=a(this,ze))==null||c.call(this,...v);}return i},xn=function(e){var n,i;for(let s of F(this,D,et).call(this,{allowStale:true})){let c=a(this,Z)[s];if(F(this,D,de).call(this,c))c.__abortController.abort(new Error("deleted"));else {let l=a(this,ue)[s];a(this,Ge)&&((n=a(this,Le))==null||n.call(this,c,l,e)),a(this,Ae)&&a(this,Pe)?.push([c,l,e]);}}if(a(this,pe).clear(),a(this,Z).fill(void 0),a(this,ue).fill(void 0),a(this,_e)&&a(this,He)&&(a(this,_e).fill(0),a(this,He).fill(0)),a(this,We)&&a(this,We).fill(0),H(this,be,0),H(this,xe,0),a(this,Ue).length=0,H(this,Ye,0),H(this,me,0),a(this,Ae)&&a(this,Pe)){let s=a(this,Pe),c;for(;c=s?.shift();)(i=a(this,ze))==null||i.call(this,...c);}};var jt=Pn;var Ve=class{cache;map=new Map;constructor(e){this.cache=new jt({max:e.cacheSize}),this.map=new Map;}get[Symbol.iterator](){return this.map[Symbol.iterator]}get[Symbol.toStringTag](){return this.map[Symbol.toStringTag]}clear(){this.cache.clear(),this.map.clear();}delete(e){let n=this.map.delete(e);return n&&this.cache.delete(e),n}get forEach(){return this.map.forEach}get(e){let n=this.cache.get(e);return n||this.map.get(e)}has(e){return this.map.has(e)}set(e,n){return this.map.set(e,n),this.cache.set(e,n),this}get size(){return this.map.size}entries(){return this.map.entries()}keys(){return this.map.keys()}values(){return this.map.values()}};var vn=Symbol("SerializableEvent"),At=new Ve({cacheSize:5});function Oi(t){return (e,n,i)=>{let s=i.value;Tn.add(s,t||`${n}`);}}var Tn;(c=>{function t(l,v){l[vn]=v,At.get(v)&&k.info(`Event "${v}" already exists, it will be overwritten`),At.set(v,l);}c.add=t;function e(l){try{let v=At.get(l);if(!v){k.error(`Event "${l}" not found, did you forget to register it with the eventDecorator?`);return}return v}catch(v){k.error(`Error while getting Event "${l}"`,v);return}}c.get=e;function n(){return Array.from(At.values())}c.values=n;function i(l){return At.has(l)}c.has=i;function s(){return Array.from(At.keys())}c.keys=s;})(Tn||={});var In=Tn;async function ei(t,e){if("onEvents"in e)for(let n in e.onEvents){let i=e.onEvents[n],s=In.get(i);s&&t.on(n,s);}}function ti(t){let{onEventsHandlers:e={}}=t;return e}function lt(t,e,n){let i=n[vn];return i&&typeof i=="string"?(e.onEventsHandlers[t]=i,true):(k.warn(`The event handler for event "${t}" is not registered with the eventDecorator, it will not be saved in the memory and it will not work after loading the game. Please register the event handler with the eventDecorator to avoid this warning. Read more about it here: https://pixi-vn.com/start/canvas-functions#add-a-listener-to-an-event`),false)}var Et=new Ve({cacheSize:5}),ni=new Ve({cacheSize:2}),ii=new Ve({cacheSize:2});function Mi(t={}){return e=>{Cn.add(e,t);}}async function De(t,e,n){let i=n?.ignoreScale||false,s=n?.end;if("isRenderGroup"in e&&e.isRenderGroup!==void 0&&(t.isRenderGroup=e.isRenderGroup),"blendMode"in e&&e.blendMode!==void 0&&(t.blendMode=e.blendMode),"tint"in e&&e.tint!==void 0&&(t.tint=e.tint),"alpha"in e&&e.alpha!==void 0&&(t.alpha=e.alpha),"angle"in e&&e.angle!==void 0&&(t.angle=e.angle),"renderable"in e&&e.renderable!==void 0&&(t.renderable=e.renderable),"rotation"in e&&e.rotation!==void 0&&(t.rotation=e.rotation),!i&&"scale"in e&&e.scale!==void 0&&(typeof e.scale=="number"?t.scale.set(e.scale,e.scale):t.scale.set(e.scale.x,e.scale.y)),"pivot"in e&&e.pivot!==void 0&&(typeof e.pivot=="number"?t.pivot.set(e.pivot,e.pivot):t.pivot.set(e.pivot.x,e.pivot.y)),"position"in e&&e.position!==void 0&&t.position.set(e.position.x,e.position.y),"skew"in e&&e.skew!==void 0&&t.skew.set(e.skew.x,e.skew.y),"visible"in e&&e.visible!==void 0&&(t.visible=e.visible),"x"in e&&e.x!==void 0&&(t.x=e.x),"y"in e&&e.y!==void 0&&(t.y=e.y),"boundsArea"in e&&e.boundsArea!==void 0&&(t.boundsArea=e.boundsArea),"cursor"in e&&e.cursor!==void 0&&(t.cursor=e.cursor),"eventMode"in e&&e.eventMode!==void 0&&(t.eventMode=e.eventMode),"interactive"in e&&e.interactive!==void 0&&(t.interactive=e.interactive),"interactiveChildren"in e&&e.interactiveChildren!==void 0&&(t.interactiveChildren=e.interactiveChildren),"hitArea"in e&&e.hitArea!==void 0&&(t.hitArea=e.hitArea),ei(t,e),"pixivnFilters"in e&&e.pixivnFilters!==void 0){let c=e.pixivnFilters.map(l=>filters.RegisteredFilters.getInstance(l.filterId,l.args,l.padding)).filter(l=>!!l);t.filters=c.length>0?c:null;}"align"in e&&e.align!==void 0&&"align"in t&&(t.align=e.align),"percentagePosition"in e&&e.percentagePosition!==void 0&&"percentagePosition"in t&&(t.percentagePosition=e.percentagePosition),s&&await s(),i||("width"in e&&e.width!==void 0&&(t.width=e.width),"height"in e&&e.height!==void 0&&(t.height=e.height));}var Cn;(v=>{function t(m,h={}){let{name:y=m.name,getInstance:I=async(Y,U)=>{let L=new Y;return await L.setMemory(U),L},copyProperty:S=async(Y,U)=>{await Y.setMemory(U);}}=h;Et.get(y)&&k.warn(`CanvasElement "${y}" already registered`),m.prototype.pixivnId=y,Et.set(y,m),ni.set(y,I),ii.set(y,S);}v.add=t;function e(m){let h=Et.get(m);if(!h){k.error(`CanvasElement "${m}" not found, did you forget to register it with the canvasComponentDecorator?`);return}return h}v.get=e;async function n(m,h){let y=e(m),I=ni.get(m);if(!y||!I){k.error(`CanvasElement "${m}" not found, did you forget to register it with the canvasComponentDecorator?`);return}try{return await I(y,h)}catch(S){k.error(`Error while getting CanvasElement instance "${m}"`,S);}}v.getInstance=n;async function i(m,h,y){let I=ii.get(m);if(!I){k.error(`CanvasElement "${m}" not found, did you forget to register it with the canvasComponentDecorator?`);return}try{await I(h,y);}catch(S){k.error(`Error while copying properties of CanvasElement "${m}"`,S);}}v.copyProperty=i;function s(){return Array.from(Et.values())}v.values=s;function c(m){return Et.has(m)}v.has=c;function l(){return Array.from(Et.keys())}v.keys=l;})(Cn||={});var Ce=Cn;async function Kt(t){let e=await Ce.getInstance(t.pixivnId,t);if(!e)throw new core.PixiError("unregistered_element",`The element ${t.pixivnId} could not be created`,"canvas",t);return e}function wn(t){return "memory"in t?t.memory:t instanceof dt__default.default.Text?An(t):t instanceof dt__default.default.Sprite?Sn(t):ut(t)}function ki(t){let e=t.parent;return {width:t.width,height:t.height,isRenderGroup:t.isRenderGroup,blendMode:t.blendMode,tint:t.tint,alpha:t.alpha,angle:t.angle,renderable:t.renderable,rotation:t.rotation,scale:{x:t.scale.x,y:t.scale.y},pivot:{x:t.pivot.x,y:t.pivot.y},position:{x:t.position.x,y:t.position.y},skew:{x:t.skew.x,y:t.skew.y},visible:t.visible,x:t.x,y:t.y,boundsArea:t.boundsArea,cursor:t.cursor,eventMode:t.eventMode,interactive:t.interactive,interactiveChildren:t.interactiveChildren,hitArea:t.hitArea,index:e?.getChildIndex(t),parentLabel:e?.label,label:t.label,pixivnFilters:Bi(t.filters)}}function Bi(t){if(!t)return;let e=Array.isArray(t)?t:[t],n=[];for(let i of e){let s=i.pixivnFilterId;if(!s){k.warn("A Filter instance without a registered pixivnFilterId can't be saved and will be skipped. Register it with filterDecorator/RegisteredFilters to make it save-compatible.",i);continue}let c=filters.RegisteredFilters.toMemory(s,i);c&&n.push(c);}return n}function bn(t,e){return {url:t.source.label,alias:e===t.source.label?void 0:e}}function ut(t,e){let n=Fi(t,mt),s=e?.childrenExport||false?t.children.sort((c,l)=>t.getChildIndex(c)-t.getChildIndex(l)).map(c=>wn(c)):[];return {pixivnId:n,elements:s,onEvents:ti(t),...ki(t)}}function Sn(t){let e=ut(t),n=e.pixivnId??xt,i="assetsAliases"in t&&Array.isArray(t.assetsAliases)?bn(t.texture,t.assetsAliases[0]):"textureAlias"in t?bn(t.texture,t.textureAlias):bn(t.texture);return {...e,pixivnId:n,textureData:i,anchor:{x:t.anchor.x,y:t.anchor.y},roundPixels:t.roundPixels}}function An(t){let e=ut(t),n=e.pixivnId??Pt;return {...e,pixivnId:n,anchor:{x:t.anchor.x,y:t.anchor.y},text:t.text,resolution:t.resolution,style:Ui(t.style),roundPixels:t.roundPixels}}function Fi(t,e){return Object.hasOwn(t,"pixivnId")?t.pixivnId:e}function qt(t){switch(t.type){case "linear":return {type:"linear",colorStops:t.colorStops,end:{x:t.end.x,y:t.end.y},start:{x:t.start.x,y:t.start.y},textureSpace:t.textureSpace,wrapMode:t.texture.source.wrapMode,textureSize:t.texture.source.width/t.texture.source.height};case "radial":return {type:"radial",colorStops:t.colorStops,textureSpace:t.textureSpace,center:{x:t.center.x,y:t.center.y},innerRadius:t.innerRadius,outerCenter:{x:t.outerCenter.x,y:t.outerCenter.y},outerRadius:t.outerRadius,rotation:t.rotation,scale:t.scale,wrapMode:t.texture.source.wrapMode,textureSize:t.texture.source.width/t.texture.source.height}}}function Li(t){if(t!=null){{if(typeof t=="number")return t;if(typeof t=="string"||Array.isArray(t))return t;if(t instanceof dt__default.default.FillGradient)return qt(t);if(typeof t=="object"&&"fill"in t&&typeof t.fill!="function"&&t.fill){if(!(t.fill instanceof dt__default.default.FillPattern))return qt(t.fill)}}k.warn("Unsupported property type for Text.style.fill.",t);}}function zi(t){if(typeof t=="number")return t;if(typeof t=="string")return t;if(Array.isArray(t))return t;if(t instanceof dt__default.default.Color)return t.toNumber();k.warn("Unsupported color type.",t);}function Yi(t){if(t!=null){{if(typeof t=="number")return t;if(typeof t=="string"||Array.isArray(t))return t;if(t instanceof dt__default.default.FillGradient)return qt(t);if(typeof t=="object"&&"alignment"in t)return {alignment:t.alignment,alpha:t.alpha,color:zi(t.color),join:t.join,miterLimit:t.miterLimit,width:t.width,cap:t.cap,pixelLine:t.pixelLine,textureSpace:t.textureSpace};if(typeof t=="object"&&"fill"in t&&typeof t.fill!="function"&&t.fill){if(!(t.fill instanceof dt__default.default.FillPattern))return qt(t.fill)}}k.warn("Unsupported property type for Text.style.stroke.",t);}}function Ui(t){return {align:t.align,breakWords:t.breakWords,dropShadow:t.dropShadow,fill:Li(t.fill),fontFamily:t.fontFamily,fontSize:t.fontSize,fontStyle:t.fontStyle,fontVariant:t.fontVariant,fontWeight:t.fontWeight,leading:t.leading,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,padding:t.padding,stroke:Yi(t.stroke),textBaseline:t.textBaseline,trim:t.trim,whiteSpace:t.whiteSpace,wordWrap:t.wordWrap,wordWrapWidth:t.wordWrapWidth}}function ft(t){try{if(typeof t>"u")return t;let e=JSON.stringify(t);return JSON.parse(e)}catch(e){throw k.error("Error creating exportable element",t,e),new core.PixiError("not_json_serializable","Error creating exportable element")}}var kt=class{tickersPausedByGameLayerRender=[];get app(){return fe.app}get gameLayer(){return fe.gameLayer}get isInitialized(){return fe._isInitialized}get width(){return fe.canvasWidth}get height(){return fe.canvasHeight}get screen(){return this.app.screen}async init(e,n,i){return await fe.init(e,n,i)}get children(){return fe.gameLayer.children}async copyCanvasElementProperty(e,n,i={}){let s=["isRenderGroup","scale","visible","boundsArea","text","resolution","style","height","width"],{ignoreProperties:c=m=>m}=i;if(typeof n=="string"){let m=this.find(n);if(m)n=m;else {k.error(`Canvas element ${n} not found`);return}}if(typeof e=="string"){let m=this.find(e);if(m)e=m;else {k.error(`Canvas element ${e} not found`);return}}e instanceof dt__default.default.Container&&(e=e.memory);let l=c(s),v={...e};l.forEach(m=>{m in v&&delete v[m];}),await Ce.copyProperty(n.pixivnId,n,v);}add(e,n,i={}){if(e===Be){k.error(`The alias ${Be} is reserved`);return}let s=this.find(e),c=i?.ignoreOldStyle;s&&!c&&this.copyCanvasElementProperty(s,n);let{zIndex:l=s?.parent?.getChildIndex(s)}=i;s&&!this.canvasElementIsOnCanvas(s)?k.error(`The canvas element ${e} exist in the memory but it is not on the canvas, so the zIndex is not set`):s&&this.remove(e,{ignoreTickers:true}),l!==void 0?(n.label=e,this.gameLayer.addChildAt(n,l)):(n.label=e,this.gameLayer.addChild(n));}remove(e,n={}){if(e===Be){k.error(`The alias ${Be} is reserved`);return}let i=n.ignoreTickers;typeof e=="string"&&(e=[e]),e.forEach(s=>{this.gameLayer.getChildrenByLabel(s).forEach(c=>{this.gameLayer.removeChild(c),!i&&tickers.tickers.unlinkComponent(s);});});}find(e){if(e===Be)return this.gameLayer;let n=this.gameLayer.getChildByLabel(e);if(n)return n}canvasElementIsOnCanvas(e){return this.gameLayer.children.includes(e)}removeAll(){this.gameLayer.removeChildren();}editAlias(e,n,i={}){let s=this.find(e);s&&(s.label=n),!i.ignoreTickers&&tickers.tickers.transfer(e,n,"move");}get currentTickers(){return this.tickers.currentTickers}get currentTickersSteps(){return this.tickers.currentTickersSteps}findTicker(e){return tickers.tickers.find(e)}addTicker(e,n){return tickers.tickers.add(e,n)}addTickersSequence(e,n,i=0){return tickers.tickers.addSequence(e,n,i)}onTickerComplete(e,n){return tickers.tickers.onComplete(e,n)}unlinkComponentFromTicker(e,n){return tickers.tickers.unlinkComponent(e,n)}removeAllTickers(){return tickers.tickers.removeAll()}removeTicker(e,n={stopTicker:true}){return tickers.removeTicker(e,n)}pauseTicker(e){return tickers.tickers.pause(e)}resumeTicker(e){return tickers.tickers.resume(e)}isTickerPaused(e,n){return tickers.tickers.isPaused(e,n)}pause(){this.gameLayer.renderable!==false&&(this.gameLayer.renderable=false,this.tickersPausedByGameLayerRender=tickers.tickers.pause({id:Array.from(tickers.TickersManagerStatic._currentTickers.keys())}));}resume(){if(this.gameLayer.renderable===true)return;this.gameLayer.renderable=true;let e=this.tickersPausedByGameLayerRender.filter(n=>tickers.TickersManagerStatic._currentTickers.has(n));e.length>0&&tickers.tickers.resume({id:e}),this.tickersPausedByGameLayerRender=[];}transferTickers(e,n,i="move"){return tickers.tickers.transfer(e,n,i)}completeTickerOnStepEnd(e){return tickers.tickers.completeOnStepEnd(e)}async forceCompletionOfTicker(e,n){return tickers.tickers.forceCompletion(e,n)}tickers=tickers.tickers;animate(e,n,i,s){return core.GameUnifier.animate(e,n,i,s)}addLayerInternal(e,n){if(e===Be){k.error(`The alias ${Be} is reserved`);return}return n.label=e,fe.app.stage.addChild(n)}getLayerInternal(e){return fe.app.stage.getChildByLabel(e)}removeLayerInternal(e){let n=fe.app.stage.getChildByLabel(e);n&&fe.app.stage.removeChild(n);}addHtmlLayerInternal(e,n,i){return fe.addHtmlLayer(e,n,i)}removeHtmlLayerInternal(e){return fe.removeHtmlLayer(e)}getHtmlLayerInternal(e){return fe.getHtmlLayer(e)}addLayer(e,n){return this.addLayerInternal(e,n)}getLayer(e){return this.getLayerInternal(e)}removeLayer(e){return this.removeLayerInternal(e)}addHtmlLayer(e,n,i){return this.addHtmlLayerInternal(e,n,i)}removeHtmlLayer(e){return this.removeHtmlLayerInternal(e)}getHtmlLayer(e){return this.getHtmlLayerInternal(e)}layers={get gameLayer(){return fe.gameLayer},add:(e,n)=>this.addLayerInternal(e,n),get:e=>this.getLayerInternal(e),remove:e=>this.removeLayerInternal(e)};htmlLayers={add:(e,n,i)=>this.addHtmlLayerInternal(e,n,i),get:e=>this.getHtmlLayerInternal(e),remove:e=>this.removeHtmlLayerInternal(e)};async extractImage(){let e=this.gameLayer.renderable===false;e&&this.resume();let n;try{n=this.app.renderer.extract.image(this.app.stage);}finally{e&&this.pause();}return (await n).src}clear(){this.tickersPausedByGameLayerRender=[],tickers.tickers.removeAll(),this.removeAll();}export(){let e=this.gameLayer.renderable===false;e&&this.resume();try{let n={};return this.children.forEach(i=>{i.label&&(n[i.label]=wn(i));}),{tickers:ft(tickers.TickersManagerStatic.currentTickersWithoutCreatedBySteps()),tickersSteps:ft(tickers.TickersManagerStatic.currentTickersSequence()),elements:ft(n),stage:ft(ut(this.gameLayer)),elementAliasesOrder:ft(fe.childrenAliasesOrder),tickersToCompleteOnStepEnd:ft(tickers.TickersManagerStatic._tickersToCompleteOnStepEnd)}}finally{e&&this.pause();}}async restore(e){this.clear();try{if(Object.hasOwn(e,"elements")&&Object.hasOwn(e,"elementAliasesOrder")){let n=e.elementAliasesOrder,i={},s=Object.entries(e.elements).map(async([c,l])=>{i[c]=await Kt(l);});await Promise.all(s),n.forEach(c=>{let l=i[c];l&&this.add(c,l);});}else {k.error("The data does not have the properties elementAliasesOrder and elements");return}if(Object.hasOwn(e,"stage")&&Object.hasOwn(e,"stage")?De(this.gameLayer,e.stage,{ignoreScale:!0}):k.error("The data does not have the properties stage"),Object.hasOwn(e,"tickers")){let n=e.tickers;Object.entries(n).forEach(([i,s])=>{let c=s.canvasElementAliases;if(c.length!==0){let l=tickers.RegisteredTickers.getInstance(s.id,s.args,{duration:s.duration,priority:s.priority,id:i,canvasElementAliases:c});l?(l.canvasElementAliases=c,tickers.tickers.add(c,l),s.paused&&l.pause()):k.error(`Ticker ${s.id} not found`);}});}if(Object.hasOwn(e,"tickersSteps")){let n=e.tickersSteps;Object.entries(n).forEach(([i,s])=>{tickers.TickersManagerStatic._currentTickersSequence.set(i,new Map(Object.entries(s))),Object.keys(s).forEach(c=>{tickers.runTickersSequence(i,c);});});}if(Object.hasOwn(e,"tickersToCompleteOnStepEnd")){let n=e.tickersToCompleteOnStepEnd,i=n.tikersIds,s=n.stepAlias.map(c=>({id:c.id,alias:c.alias}));tickers.TickersManagerStatic._tickersToCompleteOnStepEnd.tikersIds.length=0,tickers.TickersManagerStatic._tickersToCompleteOnStepEnd.tikersIds.push(...i),tickers.TickersManagerStatic._tickersToCompleteOnStepEnd.stepAlias.length=0,tickers.TickersManagerStatic._tickersToCompleteOnStepEnd.stepAlias.push(...s);}}catch(n){k.error("Error importing data",n);}}};var ve=class t{static init(e){t._getScreen=e.getScreen;}static _getScreen;static get screen(){return t._getScreen()}};exports.CanvasPropertyUtility=void 0;(m=>{function t(h,y,I,S,Y,U=0){return Y?h==="width"?y*(ve.screen.width-I)+I-S-U*I:y*(ve.screen.height-I)+I-S-U*I:h==="width"?y*(ve.screen.width-I)+S+U*I:y*(ve.screen.height-I)+S+U*I}m.calculatePositionByAlign=t;function e(h,y,I,S,Y,U=0){return Y?h==="width"?(y-I+S+U*I)/(ve.screen.width-I):(y-I+S+U*I)/(ve.screen.height-I):h==="width"?(y-S-U*I)/(ve.screen.width-I):(y-S-U*I)/(ve.screen.height-I)}m.calculateAlignByPosition=e;function n(h,y){return h==="width"?y*ve.screen.width:y*ve.screen.height}m.calculatePositionByPercentagePosition=n;function i(h,y){return h==="width"?y/ve.screen.width:y/ve.screen.height}m.calculatePercentagePositionByPosition=i;function s(h,y){if(y=y%360,y<0&&(y+=360),y===0)return {x:h.x,y:h.y};if(y===90)return {x:-h.y,y:h.x};if(y===180)return {x:-h.x,y:-h.y};if(y===270)return {x:h.y,y:-h.x};if(y>0&&y<90){let I=y*Math.PI/180,S=Math.cos(I),Y=Math.sin(I),U=h.x*S-h.y*Y,L=h.x*Y+h.y*S;return h.x!==0&&Math.sign(U)!==Math.sign(h.x)&&(U=-U),h.y!==0&&Math.sign(L)!==Math.sign(h.y)&&(L=-L),{x:U,y:L}}else if(y>90&&y<180){let I=(y-90)*Math.PI/180,S=Math.cos(I),Y=Math.sin(I),U=-h.y*Y-h.x*S,L=h.y*S-h.x*Y;return h.x!==0&&Math.sign(U)!==Math.sign(h.x)&&(U=-U),h.y!==0&&Math.sign(L)!==Math.sign(h.y)&&(L=-L),{x:U,y:L}}else if(y>180&&y<270){let I=(y-180)*Math.PI/180,S=Math.cos(I),Y=Math.sin(I),U=-h.x*S+h.y*Y,L=-h.x*Y-h.y*S;return h.x!==0&&Math.sign(U)!==Math.sign(h.x)&&(U=-U),h.y!==0&&Math.sign(L)!==Math.sign(h.y)&&(L=-L),{x:U,y:L}}else if(y>270&&y<360){let I=(y-270)*Math.PI/180,S=Math.cos(I),Y=Math.sin(I),U=h.y*Y-h.x*S,L=-h.y*S-h.x*Y;return h.x!==0&&Math.sign(U)!==Math.sign(h.x)&&(U=-U),h.y!==0&&Math.sign(L)!==Math.sign(h.y)&&(L=-L),{x:U,y:L}}return {x:0,y:0}}m.getSuperPoint=s;function c(h,y){if(y=y%360,y<0&&(y+=360),y===0)return {x:h.x,y:h.y};if(y===90)return {x:h.y,y:-h.x};if(y===180)return {x:-h.x,y:-h.y};if(y===270)return {x:-h.y,y:h.x};if(y>0&&y<90){let I=y*Math.PI/180,S=Math.cos(I),Y=Math.sin(I);return {x:h.x*S+h.y*Y,y:-h.x*Y+h.y*S}}else if(y>90&&y<180){let I=(y-90)*Math.PI/180,S=Math.cos(I),Y=Math.sin(I);return {x:h.y*S-h.x*Y,y:-h.y*Y-h.x*S}}else if(y>180&&y<270){let I=(y-180)*Math.PI/180,S=Math.cos(I),Y=Math.sin(I);return {x:-h.x*S-h.y*Y,y:h.x*Y-h.y*S}}else if(y>270&&y<360){let I=(y-270)*Math.PI/180,S=Math.cos(I),Y=Math.sin(I);return {x:-h.y*S+h.x*Y,y:h.y*Y+h.x*S}}return {x:0,y:0}}m.getPointBySuperPoint=c;function l(h){let y=h.width,I=h.height,S=h.angle%360;return S<0&&(S+=360),S===0||S===180?y:S===90||S===270?I:Math.abs(y*Math.cos(S*Math.PI/180))+Math.abs(I*Math.sin(S*Math.PI/180))}m.getSuperWidth=l;function v(h){let y=h.width,I=h.height,S=h.angle%360;return S<0&&(S+=360),S===0||S===180?I:S===90||S===270?y:Math.abs(I*Math.cos(S*Math.PI/180))+Math.abs(y*Math.sin(S*Math.PI/180))}m.getSuperHeight=v;})(exports.CanvasPropertyUtility||={});async function Bt(t){if(t!=="EMPTY"){if(!t)throw k.error("Texture not found",t),new core.PixiError("unregistered_asset","Texture not found");if(dt__default.default.Assets.cache.has(t)){let e=dt__default.default.Assets.get(t);if(e)return e}return dt__default.default.Assets.load(t).then(e=>{if(!e)throw k.error("Texture not found",t),new core.PixiError("unregistered_asset","Texture not found");if(!(e instanceof dt__default.default.Texture))throw k.error("File is not a Texture",t),new core.PixiError("unregistered_asset","File is not a Texture");return e}).catch(e=>{throw k.error("Error loading file",e),new core.PixiError("unknown_element","Error loading file")})}}function Ne(t){return t&&(typeof t.align!="number"&&(t.xAlign!==void 0&&(t.align===void 0?(t.align={x:t.xAlign},delete t.xAlign):(t.align.x=t.xAlign,delete t.xAlign)),t.yAlign!==void 0&&(t.align===void 0?(t.align={y:t.yAlign},delete t.yAlign):(t.align.y=t.yAlign,delete t.yAlign))),typeof t.percentagePosition!="number"&&(t.percentageX!==void 0&&(t.percentagePosition===void 0?(t.percentagePosition={x:t.percentageX},delete t.percentageX):(t.percentagePosition.x=t.percentageX,delete t.percentageX)),t.percentageY!==void 0&&(t.percentagePosition===void 0?(t.percentagePosition={y:t.percentageY},delete t.percentageY):(t.percentagePosition.y=t.percentageY,delete t.percentageY))),t)}var ht=class t extends dt__default.default.Sprite{constructor(e){if(e instanceof dt__default.default.Texture)super(e);else {let{align:n,percentagePosition:i,...s}=Ne(e)||{};super(s),n&&(this.align=n),i&&(this.percentagePosition=i);}this.pixivnId=this.constructor.prototype.pixivnId||xt;}pixivnId=xt;get memory(){return {...Sn(this),pixivnId:this.pixivnId,align:this._align,percentagePosition:this._percentagePosition}}async setMemory(e){return await en(this,e)}static from(e,n){let i=dt__default.default.Sprite.from(e,n),s=new t;return s.texture=i.texture,s}onEventsHandlers={};on(e,n,i){return lt(e,this,n),super.on(e,(...s)=>n(...s,this),i)}_align=void 0;set align(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),typeof e=="number"?(this._align.x=e,this._align.y=e):(e.x!==void 0&&(this._align.x=e.x),e.y!==void 0&&(this._align.y=e.y)),this.reloadPosition();}get align(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),n=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return {x:exports.CanvasPropertyUtility.calculateAlignByPosition("width",this.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,n.x<0,this.anchor.x),y:exports.CanvasPropertyUtility.calculateAlignByPosition("height",this.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,n.y<0,this.anchor.y)}}set xAlign(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),this._align.x=e,this.reloadPosition();}get xAlign(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),n=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return exports.CanvasPropertyUtility.calculateAlignByPosition("width",this.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,n.x<0,this.anchor.x)}set yAlign(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),this._align.y=e,this.reloadPosition();}get yAlign(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),n=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return exports.CanvasPropertyUtility.calculateAlignByPosition("height",this.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,n.y<0,this.anchor.y)}_percentagePosition=void 0;set percentagePosition(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),typeof e=="number"?(this._percentagePosition.x=e,this._percentagePosition.y=e):(e.x!==void 0&&(this._percentagePosition.x=e.x),e.y!==void 0&&(this._percentagePosition.y=e.y)),this.reloadPosition();}get percentagePosition(){return {x:exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("width",this.x),y:exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("height",this.y)}}get percentageX(){return exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("width",this.x)}set percentageX(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.x=e,this.reloadPosition();}get percentageY(){return exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("height",this.y)}set percentageY(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.y=e,this.reloadPosition();}get positionType(){return this._align?"align":this._percentagePosition?"percentage":"pixel"}get positionInfo(){switch(this.positionType){case "align":return {x:this.xAlign,y:this.yAlign,type:"align"};case "percentage":return {x:this.percentageX,y:this.percentageY,type:"percentage"};default:return {x:this.x,y:this.y,type:"pixel"}}}set positionInfo(e){e.type==="align"?this.align={x:e.x,y:e.y}:e.type==="percentage"?this.percentagePosition={x:e.x,y:e.y}:this.position.set(e.x,e.y);}reloadPosition(){if(this._align){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),n=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);this._align.x!==void 0&&(super.x=exports.CanvasPropertyUtility.calculatePositionByAlign("width",this._align.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,n.x<0,this.anchor.x)),this._align.y!==void 0&&(super.y=exports.CanvasPropertyUtility.calculatePositionByAlign("height",this._align.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,n.y<0,this.anchor.y));}else this._percentagePosition&&(this._percentagePosition.x!==void 0&&(super.x=exports.CanvasPropertyUtility.calculatePositionByPercentagePosition("width",this._percentagePosition.x)),this._percentagePosition.y!==void 0&&(super.y=exports.CanvasPropertyUtility.calculatePositionByPercentagePosition("height",this._percentagePosition.y)));}get position(){return super.position}set position(e){this._align=void 0,this._percentagePosition=void 0,super.position=e;}get x(){return super.x}set x(e){this._align=void 0,this._percentagePosition=void 0,super.x=e;}get y(){return super.y}set y(e){this._align=void 0,this._percentagePosition=void 0,super.y=e;}};Ce.add(ht,{name:xt,copyProperty:async(t,e)=>{await en(t,e,{ignoreTexture:true});}});async function en(t,e,n){e=Ne(e);let i=n?.ignoreTexture||false;if(await De(t,e),!i){let c;if("textureData"in e&&e.textureData&&(c=e.textureData),c&&c.url!=="EMPTY"){let l=c.url;c.alias&&dt__default.default.Assets.resolver.hasKey(c.alias)&&(l=c.alias);try{let v=await Bt(l);v&&(t.texture=v);}catch(v){k.error("Error in Sprite.setMemorySprite() while loading texture"),v=new core.PixiError("unregistered_asset",`Error loading image ${l}`,"canvas",e),core.GameUnifier.runOnError(v,{});}}}let s=n?.half;s&&await s(),"anchor"in e&&e.anchor!==void 0&&(typeof e.anchor=="number"?t.anchor.set(e.anchor,e.anchor):t.anchor.set(e.anchor.x,e.anchor.y)),"align"in e&&e.align!==void 0&&(t.align=e.align),"percentagePosition"in e&&e.percentagePosition!==void 0&&(t.percentagePosition=e.percentagePosition),"roundPixels"in e&&e.roundPixels!==void 0&&(t.roundPixels=e.roundPixels);}var se=class t extends ht{_textureAlias;get textureAlias(){return this._textureAlias?this._textureAlias:this.texture.source.label}pixivnId=yt;constructor(e,n){super(e),n&&(this._textureAlias=n);}get memory(){return {...super.memory,pixivnId:this.pixivnId,loadIsStarted:this._loadIsStarted}}async setMemory(e){let n;"textureData"in e&&e.textureData&&(n=e.textureData),"assetsData"in e&&Array.isArray(e.assetsData)&&e.assetsData.length>0&&(n=e.assetsData[0]),n&&n.alias&&(this._textureAlias=n.alias),await tn(this,e),this.reloadPosition();}static from(e,n){let i=dt__default.default.Sprite.from(e,n),s=new t;return s.texture=i.texture,s}_loadIsStarted=false;get loadIsStarted(){return this._loadIsStarted}async load(){return this._loadIsStarted=true,Bt(this.textureAlias).then(e=>{this._loadIsStarted=false,e&&(this.texture=e);}).catch(e=>{this._loadIsStarted=false,k.error("Error into ImageSprite.load()"),e=new core.PixiError("unregistered_asset",`Error loading image ${this.textureAlias}`,"canvas",{...this.memory,label:this.textureAlias},this),core.GameUnifier.runOnError(e,{});})}set texture(e){super.texture=e,this.reloadPosition();}get texture(){return super.texture}get haveEmptyTexture(){return this.texture._source.label==="EMPTY"}};Ce.add(se,{name:yt,copyProperty:async(t,e)=>{await tn(t,e,{ignoreTexture:true});}});async function tn(t,e,n){return await en(t,e,{half:async()=>{"loadIsStarted"in e&&e.loadIsStarted&&await t.load();},ignoreTexture:n?.ignoreTexture})}var $e=class t extends se{constructor(e,n){if(e instanceof dt__default.default.Texture){super(e,n);return}let{loop:i,paused:s,currentTime:c,...l}=e||{};super(l,n),i&&(this.loop=i),s&&(this.paused=s),c&&(this.currentTime=c);}pixivnId=vt;get memory(){return {...super.memory,pixivnId:this.pixivnId,loop:this.loop,paused:this._paused,currentTime:this.currentTime}}async setMemory(e){await si(this,e),this.reloadPosition();}static from(e,n){let i=dt__default.default.Sprite.from(e,n),s=new t;return s.texture=i.texture,s}async load(){await super.load(),this.loop=this._looop,this.currentTime=this._currentTime,this.paused=this._paused;}_looop=false;get loop(){return this.texture?.source?.resource?.loop||false}set loop(e){this._looop=e,this.texture?.source?.resource&&(this.texture.source.resource.loop=e);}_paused=false;get paused(){return this.texture?.source?.resource?.paused||false}set paused(e){e?this.pause():this.play();}pause(){this._paused=true,this.texture?.source?.resource&&this.texture.source.resource.pause();}play(){this._paused=false,this.texture?.source?.resource?.play&&typeof this.texture.source.resource.play=="function"&&this.texture.source.resource.play();}_currentTime=0;get currentTime(){return this.texture?.source?.resource?.currentTime||0}set currentTime(e){let n=this.duration;n&&e>=n&&(e=0),this._currentTime=e,this.texture?.source?.resource&&(this.texture.source.resource.currentTime=e);}restart(){this.currentTime=0;}get duration(){if(this.texture?.source?.resource)return this.texture.source.resource.duration||0}};Ce.add($e,{name:vt,getInstance:async(t,e)=>{let n;"textureData"in e&&e.textureData&&(n=e.textureData);let i=new t(void 0,n?.alias);return await i.setMemory(e),i},copyProperty:async(t,e)=>{await si(t,e,{ignoreTexture:true});}});async function si(t,e,n){await tn(t,e,{ignoreTexture:n?.ignoreTexture}),"loop"in e&&e.loop!==void 0&&(t.loop=e.loop),"currentTime"in e&&e.currentTime!==void 0&&(t.currentTime=e.currentTime),"paused"in e&&e.paused!==void 0&&(t.paused=e.paused);}var qe=class extends dt.Container{constructor(e){let{anchor:n,align:i,percentagePosition:s,...c}=Ne(e)||{};super(c),this.pixivnId=this.constructor.prototype.pixivnId||mt,n&&(this.anchor=n),i&&(this.align=i),s&&(this.percentagePosition=s);}pixivnId=mt;get memory(){return {...ut(this,{childrenExport:true}),anchor:this._anchor?this.anchor:void 0,align:this._align,percentagePosition:this._percentagePosition}}async setMemory(e){await this.importChildren(e),await De(this,e),this.reloadAnchor(),this.reloadPosition();}async importChildren(e){for(let n=0;n<e.elements.length;n++){let i=e.elements[n],s=await Kt(i);this.addChild(s);}}onEventsHandlers={};on(e,n,i){return lt(e,this,n),super.on(e,(...s)=>n(...s,this),i)}_anchor;get anchor(){let e=super.pivot.x/this.width,n=super.pivot.y/this.height;return {x:e,y:n}}set anchor(e){typeof e=="number"?this._anchor={x:e,y:e}:this._anchor=e,this.reloadAnchor();}reloadAnchor(){this._anchor&&super.pivot.set(this._anchor.x*this.width,this._anchor.y*this.height);}get pivot(){return super.pivot}set pivot(e){this._anchor=void 0,super.pivot=e;}_align=void 0;set align(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),typeof e=="number"?(this._align.x=e,this._align.y=e):(e.x!==void 0&&(this._align.x=e.x),e.y!==void 0&&(this._align.y=e.y)),this.reloadPosition();}get align(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),n=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return {x:exports.CanvasPropertyUtility.calculateAlignByPosition("width",this.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,n.x<0),y:exports.CanvasPropertyUtility.calculateAlignByPosition("height",this.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,n.y<0)}}set xAlign(e){this._percentagePosition&&(this._percentagePosition=void 0),this._align===void 0&&(this._align={}),this._align.x=e,this.reloadPosition();}get xAlign(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),n=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return exports.CanvasPropertyUtility.calculateAlignByPosition("width",this.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,n.x<0)}set yAlign(e){this._percentagePosition&&(this._percentagePosition=void 0),this._align===void 0&&(this._align={}),this._align.y=e,this.reloadPosition();}get yAlign(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),n=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return exports.CanvasPropertyUtility.calculateAlignByPosition("height",this.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,n.y<0)}_percentagePosition=void 0;set percentagePosition(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),typeof e=="number"?(this._percentagePosition.x=e,this._percentagePosition.y=e):(e.x!==void 0&&(this._percentagePosition.x=e.x),e.y!==void 0&&(this._percentagePosition.y=e.y)),this.reloadPosition();}get percentagePosition(){return {x:exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("width",this.x),y:exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("height",this.y)}}set percentageX(e){this._align&&(this._align=void 0),this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.x=e,this.reloadPosition();}get percentageX(){return exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("width",this.x)}set percentageY(e){this._align&&(this._align=void 0),this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.y=e,this.reloadPosition();}get percentageY(){return exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("height",this.y)}get positionType(){return this._align?"align":this._percentagePosition?"percentage":"pixel"}get positionInfo(){switch(this.positionType){case "align":return {x:this.xAlign,y:this.yAlign,type:"align"};case "percentage":return {x:this.percentageX,y:this.percentageY,type:"percentage"};default:return {x:this.x,y:this.y,type:"pixel"}}}set positionInfo(e){e.type==="align"?this.align={x:e.x,y:e.y}:e.type==="percentage"?this.percentagePosition={x:e.x,y:e.y}:this.position.set(e.x,e.y);}reloadPosition(){if(this._align){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),n=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);this._align.x!==void 0&&(super.x=exports.CanvasPropertyUtility.calculatePositionByAlign("width",this._align.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,n.x<0)),this._align.y!==void 0&&(super.y=exports.CanvasPropertyUtility.calculatePositionByAlign("height",this._align.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,n.y<0));}else this._percentagePosition&&(this._percentagePosition.x!==void 0&&(super.x=exports.CanvasPropertyUtility.calculatePositionByPercentagePosition("width",this._percentagePosition.x)),this._percentagePosition.y!==void 0&&(super.y=exports.CanvasPropertyUtility.calculatePositionByPercentagePosition("height",this._percentagePosition.y)));}get position(){return super.position}set position(e){this._align=void 0,this._percentagePosition=void 0,super.position=e;}get x(){return super.x}set x(e){this._align=void 0,this._percentagePosition=void 0,super.x=e;}get y(){return super.y}set y(e){this._align=void 0,this._percentagePosition=void 0,super.y=e;}};Ce.add(qe,{name:mt,copyProperty:async(t,e)=>await De(t,e)});var Qi=new Set(["mp4","webm","ogg","ogv","avi","mov","wmv","flv","mkv","m4v","3gp","3g2","ts","mts"]);function Ft(t){let e=dt__default.default.Assets.cache.has(t)?dt__default.default.Assets.get(t):null;return e instanceof dt__default.default.Texture&&(t=e.source?.label||t),er(t)}function er(t){let e=t.split(".").pop()?.toLowerCase();return e!==void 0&&Qi.has(e)}var ae=class extends qe{constructor(e,n){let{anchor:i,align:s,percentagePosition:c,...l}=Ne(e)||{};super(l),n&&n.forEach(v=>{Ft(v)?this.addChild(new $e(void 0,v)):this.addChild(new se(void 0,v));}),i&&(this.anchor=i),s&&(this.align=s),c&&(this.percentagePosition=c);}get memory(){return {...super.memory,pixivnId:Nt,loadIsStarted:this._loadIsStarted}}async setMemory(e){await this.importChildren(e),await oi(this,e),this.reloadAnchor(),this.reloadPosition();}pixivnId=Nt;_loadIsStarted=false;get loadIsStarted(){return this._loadIsStarted}async load(){this._loadIsStarted=true;let e=this.children.map(n=>n.load());return Promise.all(e).then(()=>{this._loadIsStarted=false,this.reloadAnchor(),this.reloadPosition();}).catch(n=>{this._loadIsStarted=false,k.error("Error into ImageContainer.load()",n);})}get texture(){return this.children.length>0?this.children[0].texture:new dt__default.default.Texture}get haveEmptyTexture(){return this.children.some(e=>e.texture._source.label==="EMPTY")}};Ce.add(ae,{name:Nt,copyProperty:async(t,e)=>await oi(t,e)});async function oi(t,e){e=Ne(e)||{},De(t,e,{end:async()=>{"loadIsStarted"in e&&e.loadIsStarted&&await t.load();}});}var nn=class{constructor(...e){}get memory(){throw new core.PixiError("not_implemented","The method CanvasBaseItem.memory must be overridden")}setMemory(e){throw new core.PixiError("not_implemented","The method CanvasBaseItem.setMemory must be overridden")}pixivnId="canvas_element_id_not_set"};var pt=class extends dt__default.default.Text{constructor(e){let{align:n,percentagePosition:i,...s}=Ne(e)||{};super(s),this.pixivnId=this.constructor.prototype.pixivnId||Pt,n&&(this.align=n),i&&(this.percentagePosition=i);}pixivnId=Pt;get memory(){return {...An(this),pixivnId:this.pixivnId,align:this._align,percentagePosition:this._percentagePosition}}async setMemory(e){await ir(this,e),this.reloadPosition();}onEventsHandlers={};on(e,n,i){return lt(e,this,n),super.on(e,(...s)=>n(...s,this),i)}_align=void 0;set align(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),typeof e=="number"?(this._align.x=e,this._align.y=e):(e.x!==void 0&&(this._align.x=e.x),e.y!==void 0&&(this._align.y=e.y)),this.reloadPosition();}get align(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),n=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return {x:exports.CanvasPropertyUtility.calculateAlignByPosition("width",this.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,n.x<0,this.anchor.x),y:exports.CanvasPropertyUtility.calculateAlignByPosition("height",this.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,n.y<0,this.anchor.y)}}set xAlign(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),this._align.x=e,this.reloadPosition();}get xAlign(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),n=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return exports.CanvasPropertyUtility.calculateAlignByPosition("width",this.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,n.x<0,this.anchor.x)}set yAlign(e){this._percentagePosition=void 0,this._align===void 0&&(this._align={}),this._align.y=e,this.reloadPosition();}get yAlign(){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),n=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);return exports.CanvasPropertyUtility.calculateAlignByPosition("height",this.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,n.y<0,this.anchor.y)}_percentagePosition=void 0;set percentagePosition(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),typeof e=="number"?(this._percentagePosition.x=e,this._percentagePosition.y=e):(e.x!==void 0&&(this._percentagePosition.x=e.x),e.y!==void 0&&(this._percentagePosition.y=e.y)),this.reloadPosition();}get percentagePosition(){return {x:exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("width",this.x),y:exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("height",this.y)}}get percentageX(){return exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("width",this.x)}set percentageX(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.x=e,this.reloadPosition();}get percentageY(){return exports.CanvasPropertyUtility.calculatePercentagePositionByPosition("height",this.y)}set percentageY(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.y=e,this.reloadPosition();}get positionType(){return this._align?"align":this._percentagePosition?"percentage":"pixel"}get positionInfo(){switch(this.positionType){case "align":return {x:this.xAlign,y:this.yAlign,type:"align"};case "percentage":return {x:this.percentageX,y:this.percentageY,type:"percentage"};default:return {x:this.x,y:this.y,type:"pixel"}}}set positionInfo(e){e.type==="align"?this.align={x:e.x,y:e.y}:e.type==="percentage"?this.percentagePosition={x:e.x,y:e.y}:this.position.set(e.x,e.y);}reloadPosition(){if(this._align){let e=exports.CanvasPropertyUtility.getSuperPoint(this.pivot,this.angle),n=exports.CanvasPropertyUtility.getSuperPoint(this.scale,this.angle);this._align.x!==void 0&&(super.x=exports.CanvasPropertyUtility.calculatePositionByAlign("width",this._align.x,exports.CanvasPropertyUtility.getSuperWidth(this),e.x,n.x<0,this.anchor.x)),this._align.y!==void 0&&(super.y=exports.CanvasPropertyUtility.calculatePositionByAlign("height",this._align.y,exports.CanvasPropertyUtility.getSuperHeight(this),e.y,n.y<0,this.anchor.y));}else this._percentagePosition&&(this._percentagePosition.x!==void 0&&(super.x=exports.CanvasPropertyUtility.calculatePositionByPercentagePosition("width",this._percentagePosition.x)),this._percentagePosition.y!==void 0&&(super.y=exports.CanvasPropertyUtility.calculatePositionByPercentagePosition("height",this._percentagePosition.y)));}get position(){return super.position}set position(e){this._align=void 0,this._percentagePosition=void 0,super.position=e;}get x(){return super.x}set x(e){this._align=void 0,this._percentagePosition=void 0,super.x=e;}get y(){return super.y}set y(e){this._align=void 0,this._percentagePosition=void 0,super.y=e;}};Ce.add(pt,{name:Pt});async function ir(t,e){"text"in e&&e.text!==void 0&&(t.text=e.text),await De(t,e,{end:()=>{"style"in e&&e.style!==void 0&&(t.style=e.style);}}),"anchor"in e&&e.anchor!==void 0&&(typeof e.anchor=="number"?t.anchor.set(e.anchor,e.anchor):t.anchor.set(e.anchor.x,e.anchor.y)),"resolution"in e&&e.resolution!==void 0&&(t.resolution=e.resolution),"anchor"in e&&e.anchor!==void 0&&(typeof e.anchor=="number"?t.anchor.set(e.anchor,e.anchor):t.anchor.set(e.anchor.x,e.anchor.y)),"align"in e&&e.align!==void 0&&(t.align=e.align),"percentagePosition"in e&&e.percentagePosition!==void 0&&(t.percentagePosition=e.percentagePosition),"roundPixels"in e&&e.roundPixels!==void 0&&(t.roundPixels=e.roundPixels);}function Lt(t,e,n){let i=[0],s=t;for(let c=0;c<n;c++)i.push(s,-s*.6,s*.3,0),s*=e;return i}function ci(t,e,n,i){let s=n.reduce((y,I)=>I.enabled?y+I.padding:y,0),c=t.x,l=t.y,v=t.x+t.width,m=t.y+t.height;i&&(c=Math.max(c,0),l=Math.max(l,0),v=Math.min(v,i.width),m=Math.min(m,i.height));let h={x:c-s,y:l-s,width:v-c+s*2,height:m-l+s*2};return {x:t.x+e.x*t.width-h.x,y:t.y+e.y*t.height-h.y,area:h}}function On(t,e,n,i){return Math.max(0,Math.ceil(e-Math.min(t.x,t.y,n-t.x,i-t.y)))}function rn(t,e,n,i){let s=Math.min(Math.max(e,0),.5),c=Math.hypot(Math.max(t.x,n-t.x),Math.max(t.y,i-t.y));return Math.ceil(c*s/(1-s))}function sn(t,e,n,i){return i>0?i:Math.hypot(Math.max(t.x,e.width-t.x),Math.max(t.y,e.height-t.y))+n/2}function _n(t){let e=t.filters;return e?Array.isArray(e)?[...e]:[e]:[]}function or(t,e){t.filters=[..._n(t),...e];}function ar(t,e){let n=_n(t).filter(i=>!e.includes(i));t.filters=n.length>0?n:null;}function ce(t,e,n,i,s,c,l){or(e,[n]),l?.();let v=filters.filters.animate(t,n,i,{duration:s.duration??1,delay:s.delay,ease:s.ease,times:s.times,aliasToRemoveAfter:s.aliasToRemoveAfter,autoplay:s.autoplay},c,void 0,()=>{ar(e,[n]),n.destroy();});return v&&(s.completeOnContinue??true)&&tickers.tickers.completeOnStepEnd({id:v}),v}function it(t,e){let n;try{n=g.screen;}catch{n=void 0;}return ci(t.getBounds(),e,_n(t),n)}async function cr(t,e={},n){return exports.effects.shakeEffect(t,e,n)}function li(t){switch(t){case "up":return {axis:"y",sign:-1};case "down":return {axis:"y",sign:1};case "left":return {axis:"x",sign:-1};default:return {axis:"x",sign:1}}}function on(t,e,n){let i=[0],s=t;for(let c=0;c<n;c++)i.push(c%2===0?s:-s,0),s*=e;return i}function Ot(t,e,n,i){let s=[t],c=e;for(let l=0;l<i;l++)s.push(t+c,t),c*=n;return s}exports.effects=void 0;(oe=>{async function t(E,K={},G){let R=g.find(E);if(!R){k.error(`The element with the alias ${E} does not exist. So the shake effect can't be applied.`);return}let B={x:R.position.x,y:R.position.y},{shakeType:V="horizontal",maxShockSize:X=10,shocksNumber:Q=10,...$}=K,W=Q-1;if(W<2){k.error("The number of shocks must be at least 3.");return}let J=Math.floor(W/2),q=Math.ceil(W/2),j=[];for(let re=0;re<J;re++){let he=X*(re+1)/J;V==="horizontal"?re%2!==0?j.push(B.x+he):j.push(B.x-he):re%2!==0?j.push(B.y+he):j.push(B.y-he);}let ne=J%2===0;for(let re=q;re>0;re--){let he=X*(re+1)/(q-1);V==="horizontal"?re%2===0&&!ne||re%2!==0&&ne?j.push(B.x-he):j.push(B.x+he):re%2===0&&!ne||re%2!==0&&ne?j.push(B.y-he):j.push(B.y+he);}let le;if(V==="horizontal"?(j.push(B.x),le=g.animate(E,{x:j},$,G)):(j.push(B.y),le=g.animate(E,{y:j},$,G)),le)return [le]}oe.shakeEffect=t;async function e(E,K={},G){let R=g.find(E);if(!R){k.error(`The element with the alias ${E} does not exist. So the bounce effect can't be applied.`);return}let{direction:B="up",distance:V=30,bounces:X=4,decay:Q=.5,...$}=K,{axis:W,sign:J}=li(B),q=W==="x"?R.position.x:R.position.y,j=[q],ne=V;for(let re=0;re<X;re++)j.push(q+J*ne,q),ne*=Q;let le=g.animate(E,{[W]:j},$,G);if(le)return [le]}oe.bounceEffect=e;async function n(E,K={},G){let R=g.find(E);if(!R){k.error(`The element with the alias ${E} does not exist. So the pulse effect can't be applied.`);return}let{scale:B=1.2,pulses:V=3,decay:X=.6,...Q}=K,$=R.scale.x,W=R.scale.y,J=[$],q=[W],j=B-1;for(let le=0;le<V;le++)J.push($*(1+j),$),q.push(W*(1+j),W),j*=X;let ne=g.animate(E,{scaleX:J,scaleY:q},Q,G);if(ne)return [ne]}oe.pulseEffect=n;async function i(E,K={},G){let R=g.find(E);if(!R){k.error(`The element with the alias ${E} does not exist. So the hop effect can't be applied.`);return}let{direction:B="up",distance:V=40,secondaryHops:X=0,decay:Q=.5,...$}=K,{axis:W,sign:J}=li(B),q=W==="x"?R.position.x:R.position.y,j=[q],ne=V;for(let re=0;re<1+X;re++)j.push(q+J*ne,q),ne*=Q;let le=g.animate(E,{[W]:j},$,G);if(le)return [le]}oe.hopEffect=i;async function s(E,K={},G){let R=g.find(E);if(!R){k.error(`The element with the alias ${E} does not exist. So the wiggle effect can't be applied.`);return}let{angle:B=15,repetitions:V=3,decay:X=.5,...Q}=K,$=R.rotation,W=B*Math.PI/180,J=on(W,X,V).map(j=>$+j),q=g.animate(E,{rotation:J},Q,G);if(q)return [q]}oe.wiggleEffect=s;async function c(E,K={},G){let R=g.find(E);if(!R){k.error(`The element with the alias ${E} does not exist. So the nod effect can't be applied.`);return}let{axis:B="horizontal",distance:V=15,repetitions:X=3,decay:Q=.5,...$}=K,W=B==="horizontal"?"x":"y",J=B==="horizontal"?R.position.x:R.position.y,q=on(V,Q,X).map(ne=>J+ne),j=g.animate(E,{[W]:q},$,G);if(j)return [j]}oe.nodEffect=c;async function l(E,K={},G){let R=g.find(E);if(!R){k.error(`The element with the alias ${E} does not exist. So the sway effect can't be applied.`);return}let{axis:B="horizontal",distance:V=10,angle:X=5,repetitions:Q=3,decay:$=0,ease:W="easeInOut",...J}=K,q=B==="horizontal"?"x":"y",j=B==="horizontal"?R.position.x:R.position.y,ne=R.rotation,le=X*Math.PI/180,re=on(V,$||1,Q).map(je=>j+je),he=on(le,$||1,Q).map(je=>ne+je),Re=g.animate(E,{[q]:re,rotation:he},{ease:W,...J},G);if(Re)return [Re]}oe.swayEffect=l;async function v(E,K={},G){let R=g.find(E);if(!R){k.error(`The element with the alias ${E} does not exist. So the punch effect can't be applied.`);return}let{mode:B="scale",strength:V=.3,overshoot:X=.3,...Q}=K,$;if(B==="scale"){let W=J=>[J,J*(1+V),J*(1-V*X),J];$=g.animate(E,{scaleX:W(R.scale.x),scaleY:W(R.scale.y)},Q,G);}else {let W=B==="rotation"?R.rotation:B==="x"?R.position.x:R.position.y,J=B==="rotation"?V*Math.PI/180:V,q=[W,W+J,W-J*X,W];$=g.animate(E,{[B]:q},Q,G);}if($)return [$]}oe.punchEffect=v;async function m(E,K={},G){let R=g.find(E);if(!R){k.error(`The element with the alias ${E} does not exist. So the glitch effect can't be applied.`);return}let{strength:B=40,bursts:V=3,slices:X=8,direction:Q=0,rgbSplit:$=6,decay:W=.5,ease:J="linear",...q}=K,j=new filters.filters.GlitchFilter({slices:X,direction:Q,offset:0});j.refresh(),j.padding=Math.ceil(Math.abs(B));let ne=[],le=ce(E,R,j,{offset:Lt(B,W,V)},{ease:J,...q},G);if(le&&ne.push(le),$!==0){let re=Lt($,W,V),he=new filters.filters.RGBSplitFilter({red:{x:0,y:0},green:{x:0,y:0},blue:{x:0,y:0}});he.padding=Math.ceil(Math.abs($));let Re=ce(E,R,he,{redX:re,blueX:re.map(je=>-je)},{ease:J,...q},G);Re&&ne.push(Re);}if(ne.length>0)return ne}oe.glitchEffect=m;async function h(E,K={},G){let R=g.find(E);if(!R){k.error(`The element with the alias ${E} does not exist. So the chromatic aberration effect can't be applied.`);return}let{strength:B=8,axis:V="horizontal",bursts:X=1,decay:Q=.5,...$}=K,W=new filters.filters.RGBSplitFilter({red:{x:0,y:0},green:{x:0,y:0},blue:{x:0,y:0}});W.padding=Math.ceil(Math.abs(B));let J=V==="horizontal"?"redX":"redY",q=V==="horizontal"?"blueX":"blueY",j={[J]:Ot(0,B,Q,X),[q]:Ot(0,-B,Q,X)},ne=ce(E,R,W,j,$,G);if(ne)return [ne]}oe.chromaticAberrationEffect=h;async function y(E,K={},G){let R=g.find(E);if(!R){k.error(`The element with the alias ${E} does not exist. So the shockwave effect can't be applied.`);return}let{origin:B={x:.5,y:.5},amplitude:V=30,wavelength:X=160,brightness:Q=1,radius:$=-1,speed:W=500,strength:J,...q}=K,{width:j,height:ne}=R.getBounds(),le=J??sn({x:B.x*j,y:B.y*ne},{width:j,height:ne},X,$)/W,re=new filters.filters.ShockwaveFilter({center:{x:0,y:0},amplitude:V,wavelength:X,brightness:Q,radius:$,speed:W,time:0});re.padding=Math.ceil(Math.abs(V)*1.25);let he=ce(E,R,re,{time:[0,le]},q,G,()=>{let{x:Re,y:je}=it(R,B);re.center={x:Re,y:je};});if(he)return [he]}oe.shockwaveEffect=y;async function I(E,K={},G){let R=g.find(E);if(!R){k.error(`The element with the alias ${E} does not exist. So the radial blur effect can't be applied.`);return}let{strength:B=.5,bursts:V=1,origin:X={x:.5,y:.5},innerRadius:Q=0,radius:$=-1,decay:W=.5,...J}=K,q=new filters.filters.ZoomBlurFilter({center:{x:0,y:0},innerRadius:Q,radius:$,strength:0}),{width:j,height:ne}=R.getBounds();q.padding=rn({x:X.x*j,y:X.y*ne},B,j,ne);let le=Ot(0,B,W,V),re=ce(E,R,q,{strength:le},J,G,()=>{let{x:he,y:Re}=it(R,X);q.center={x:he,y:Re};});if(re)return [re]}oe.radialBlurEffect=I;async function S(E,K={},G){let R=g.find(E);if(!R){k.error(`The element with the alias ${E} does not exist. So the blur pulse effect can't be applied.`);return}let{strength:B=8,pulses:V=3,quality:X,decay:Q=.5,...$}=K,W=new filters.filters.BlurFilter({strength:0,quality:X}),J=Ot(0,B,Q,V),q=ce(E,R,W,{strength:J},$,G);if(q)return [q]}oe.blurPulseEffect=S;async function Y(E,K={},G){let R=g.find(E);if(!R){k.error(`The element with the alias ${E} does not exist. So the vignette pulse effect can't be applied.`);return}let{strength:B=1,pulses:V=1,radius:X=.5,blur:Q=.5,decay:$=.5,...W}=K,J=new filters.filters.CRTFilter({curvature:0,lineWidth:0,lineContrast:0,noise:0,vignetting:X,vignettingBlur:Q,vignettingAlpha:0}),q=Ot(0,B,$,V),j=ce(E,R,J,{vignettingAlpha:q},W,G);if(j)return [j]}oe.vignettePulseEffect=Y;async function U(E,K={},G){let R=g.find(E);if(!R){k.error(`The element with the alias ${E} does not exist. So the desaturate effect can't be applied.`);return}let{amount:B=0,duration:V=1,holdDuration:X=0,...Q}=K,$=V*2+X,W=[0,V/$,(V+X)/$,1],J=new filters.filters.AdjustmentFilter({saturation:1}),q=ce(E,R,J,{saturation:[1,B,B,1]},{...Q,duration:$,times:W},G);if(q)return [q]}oe.desaturateEffect=U;async function L(E,K={},G){let R=g.find(E);if(!R){k.error(`The element with the alias ${E} does not exist. So the glow pulse effect can't be applied.`);return}let{strength:B=4,pulses:V=3,color:X=16777215,distance:Q=10,innerStrength:$=0,decay:W=.5,...J}=K,q=new filters.filters.GlowFilter({outerStrength:0,innerStrength:$,distance:Q,color:X}),j=Ot(0,B,W,V),ne=ce(E,R,q,{outerStrength:j},J,G);if(ne)return [ne]}oe.glowPulseEffect=L;})(exports.effects||={});function gt(t){let e=t.getLocalBounds();return {x:e.x,y:e.y,width:e.width,height:e.height}}function Rn(t,e){return e.graphics||(e.graphics=new dt.Graphics,e.graphics.label="",t.parent?.addChild(e.graphics),t.mask=e.graphics),dr(t,e.graphics),e.graphics}function dr(t,e){e.position.copyFrom(t.position),e.scale.copyFrom(t.scale),e.pivot.copyFrom(t.pivot),e.skew.copyFrom(t.skew),e.rotation=t.rotation;}function ur(t,e){e.graphics&&(t.mask===e.graphics&&(t.mask=null),e.graphics.parent?.removeChild(e.graphics),e.graphics.destroy({children:true}),e.graphics=void 0);}function fr(t,e,n,i){let s=e.invert?1-n:n,{bounds:c}=e,l=Rn(t,i),v=c.x+c.width/2,m=c.y+c.height/2,h=Math.sqrt(c.width**2+c.height**2)||1,y=Math.max(s,0)*h*2,I=e.angle*Math.PI/180;if(l.clear(),y>0){let S=Math.cos(-I),Y=Math.sin(-I),U=[[-h,-h],[-h+y,-h],[-h+y,h],[-h,h]].flatMap(([L,oe])=>[v+L*S-oe*Y,m+L*Y+oe*S]);l.poly(U).fill(16777215);}}function hr(t,e,n,i){let s=e.invert?1-n:n,{bounds:c}=e,l=Rn(t,i),v=c.x+c.width*e.originX,m=c.y+c.height*e.originY,h=Math.max(v-c.x,c.x+c.width-v),y=Math.max(m-c.y,c.y+c.height-m),I=Math.sqrt(h**2+y**2)||1,S=Math.max(s,0)*I,Y=e.aspect>0?e.aspect:1;if(l.clear(),e.outside){let U=I*Math.max(Y,1)*2;l.rect(c.x-U,c.y-U,c.width+U*2,c.height+U*2).fill(16777215),S>0&&l.ellipse(v,m,S*Y,S).cut();}else S>0&&l.ellipse(v,m,S*Y,S).fill(16777215);}function pr(t,e,n,i){let s=e.invert?1-n:n,c=1-s,{bounds:l}=e,v=Rn(t,i);if(v.clear(),e.direction==="outward"){if(s>0)if(e.orientation==="horizontal"){let m=l.x+l.width*e.origin;v.rect(m-(m-l.x)*s,l.y,l.width*s,l.height).fill(16777215);}else {let m=l.y+l.height*e.origin;v.rect(l.x,m-(m-l.y)*s,l.width,l.height*s).fill(16777215);}return}if(e.orientation==="horizontal"){let m=l.x+l.width*e.origin,h=m-l.x,y=l.x+l.width-m,I=l.x-c*h,S=m+c*y;h>0&&v.rect(I,l.y,h,l.height).fill(16777215),y>0&&v.rect(S,l.y,y,l.height).fill(16777215);}else {let m=l.y+l.height*e.origin,h=m-l.y,y=l.y+l.height-m,I=l.y-c*h,S=m+c*y;h>0&&v.rect(l.x,I,l.width,h).fill(16777215),y>0&&v.rect(l.x,S,l.width,y).fill(16777215);}}function gr(t,e,n){switch(e.kind){case "wipe":case "iris":case "split":ur(t,n);break}}function mr(t,e,n,i){switch(e.kind){case "wipe":return fr(t,e,n,i);case "iris":return hr(t,e,n,i);case "split":return pr(t,e,n,i)}}function Dn(t,e){let n={};return {apply(i){let s=g.find(t);s&&(n.component=s,mr(s,e,i,n));},cleanup(){let i=n.component??g.find(t);i&&gr(i,e,n);}}}function an(t,e,n){let i={...g.find(t)?.memory,...n},s=new ae(n,e);return i&&g.copyCanvasElementProperty(i,s),g.add(t,s,{ignoreOldStyle:true,zIndex:n?.zIndex}),s}async function yr(t,e,n){let i={...g.find(t)?.memory,...n},s=new ae(n,e);return s.label=t,await s.load(),i&&g.copyCanvasElementProperty(i,s),g.add(t,s,{ignoreOldStyle:true,zIndex:n?.zIndex}),s}function cn(t,e,n){if(!e)if(dt__default.default.Assets.resolver.hasKey(t))e=t;else throw new core.PixiError("unregistered_asset",`The image ${t} does not exist in the cache.`,"canvas",{pixivnId:yt,...n,label:t});let i={...g.find(t)?.memory,...n},s=new se(n,e);return i&&g.copyCanvasElementProperty(i,s),g.add(t,s,{ignoreOldStyle:true,zIndex:n?.zIndex}),s}async function xr(t,e,n){if(!e)if(dt__default.default.Assets.resolver.hasKey(t))e=t;else throw new core.PixiError("unregistered_asset",`The image ${t} does not exist in the cache.`,"canvas",{pixivnId:yt,...n,label:t});let i={...g.find(t)?.memory,...n},s=new se(n,e);return s.label=t,await s.load(),i&&g.copyCanvasElementProperty(i,s),g.add(t,s,{ignoreOldStyle:true,zIndex:n?.zIndex}),s}function ln(t,e,n){if(!e)if(dt__default.default.Assets.resolver.hasKey(t))e=t;else throw new core.PixiError("unregistered_asset",`The video ${t} does not exist in the cache.`,"canvas",{pixivnId:vt,...n,label:t});let i={...g.find(t)?.memory,...n},s=new $e(n,e);return i&&g.copyCanvasElementProperty(i,s),g.add(t,s,{ignoreOldStyle:true,zIndex:n?.zIndex}),s}async function Pr(t,e,n){if(!e)if(dt__default.default.Assets.resolver.hasKey(t))e=t;else throw new core.PixiError("unregistered_asset",`The video ${t} does not exist in the cache.`,"canvas",{pixivnId:vt,...n,label:t});let i={...g.find(t)?.memory,...n},s=new $e(n,e);return s.label=t,await s.load(),i&&g.copyCanvasElementProperty(i,s),g.add(t,s,{ignoreOldStyle:true,zIndex:n?.zIndex}),s}async function vr(t,e,n={},i){return exports.transitions.showWithDissolve(t,e,n,i)}function Tr(t,e={},n){return exports.transitions.removeWithDissolve(t,e,n)}async function Ir(t,e,n={},i){return exports.transitions.showWithFade(t,e,n,i)}function Cr(t,e={},n){return exports.transitions.removeWithFade(t,e,n)}async function br(t,e,n={},i){return exports.transitions.moveIn(t,e,n,i)}function wr(t,e={},n){return exports.transitions.moveOut(t,e,n)}async function Sr(t,e,n={},i){return exports.transitions.zoomIn(t,e,n,i)}function Ar(t,e={},n){return exports.transitions.zoomOut(t,e,n)}async function Er(t,e,n={},i){return exports.transitions.pushIn(t,e,n,i)}function Or(t,e={direction:"right"},n){return exports.transitions.pushOut(t,e,n)}exports.transitions=void 0;(Nr=>{function t(o){switch(o.type){case "align":return {xAlign:o.x,yAlign:o.y};case "percentage":return {percentageX:o.x,percentageY:o.y};default:return {x:o.x,y:o.y}}}function e(o,r,d){if(typeof r=="string")return Ft(r)?ln(o,r,{...d.properties,zIndex:d.zIndex}):cn(o,r,{...d.properties,zIndex:d.zIndex});if(Array.isArray(r))return an(o,r,{...d.properties,zIndex:d.zIndex});if(typeof r=="object"&&"value"in r&&"options"in r){if(typeof r.value=="string")return Ft(r.value)?ln(o,r.value,{...r.options,...d.properties,zIndex:d.zIndex}):cn(o,r.value,{...r.options,...d.properties,zIndex:d.zIndex});if(Array.isArray(r.value))return an(o,r.value,{...r.options,...d.properties,zIndex:d.zIndex})}return g.add(o,r,d),r}function n(o){let r=o;return {x:r.x,y:r.y,anchor:r.anchor,scale:r.scale,pivot:r.pivot,skew:r.skew,rotation:r.rotation,angle:r.angle}}function i(o,r,d){let u,f=g.find(o);f&&(u=`${o}_temp_${d}`,g.editAlias(o,u));let p=e(o,r,{zIndex:f?f.parent?.getChildIndex(f):void 0,properties:f?n(f):void 0});return f?.parent?.setChildIndex(f,f.parent.getChildIndex(f)-.1),u&&g.copyCanvasElementProperty(u,o),u&&tickers.tickers.transfer(u,o,"duplicate"),{component:p,oldComponentAlias:u}}function s(o,r,d,u){return o?r?u(o)??[]:(d.push(o),[]):[]}function c(o){let{aliasToRemoveAfter:r,animateOldComponentOut:d,...u}=o;return u}function l(o,r){let d=o?[o,...r]:r;return d.length>0?d:void 0}function v(o){switch(o){case "up":return 90;case "down":return 270;case "left":return 180;default:return 0}}function m(o,r,d){let{apply:u,cleanup:f}=Dn(o,r.config),p=filters.filters.animate(o,void 0,{value:[r.from,r.to]},{duration:r.duration??1,delay:r.delay,ease:r.ease,aliasToRemoveAfter:r.aliasToRemoveAfter,tickerIdToResume:r.tickerIdToResume},d,u,f,{alias:o,config:r.config});return p&&u(r.from),p&&(r.completeOnContinue??true)&&tickers.tickers.completeOnStepEnd({id:p}),p}function h(o,r,d,u,f,p){let T=Math.max(u,0)/4;d==="in"?(r&&(r.alpha=0),g.animate(o,{alpha:[0,1]},{duration:T,delay:p,completeOnContinue:false},f)):g.animate(o,{alpha:[1,0]},{duration:T,delay:typeof p=="function"?(O,x)=>p(O,x)+Math.max(u-T,0):(p??0)+Math.max(u-T,0),completeOnContinue:false},f);}function y(o,r,d,u,f=false){let p=Math.max(u,1),T=r*2+d,O=f?r+d:T,x=Math.max(T*(p-1)+O,.001),A=[0],b=[0],w=0;for(let C=0;C<p;C++){let P=C===p-1;w+=r,A.push(o),b.push(w/x),w+=d,A.push(o),b.push(w/x),(!P||!f)&&(w+=r,A.push(0),b.push(Math.min(w/x,1)));}return {values:A,times:b,total:x}}async function I(o,r,d={},u){let{completeOnContinue:f=true,tickerIdToResume:p=[],...T}=d,O=[];r||(r=o),typeof p=="string"&&(p=[p]);let x,A=g.find(o);if(A&&(x=`${o}_temp_disolve`,g.editAlias(o,x)),r=e(o,r,{zIndex:A?A.parent?.getChildIndex(A):void 0,properties:A?n(A):void 0}),A?.parent?.setChildIndex(A,A.parent.getChildIndex(A)-.1),x&&g.copyCanvasElementProperty(x,o),x&&tickers.tickers.transfer(x,o,"duplicate"),r.alpha=0,x){let w=S(x,{...d,autoplay:false,completeOnContinue:f},u);w&&(O.push(...w),p.push(...w));}let b=g.animate(o,{alpha:1},{...T,tickerIdToResume:p,completeOnContinue:f},u);if(b&&O.push(b),O.length>0)return O}Nr.showWithDissolve=I;function S(o,r={},d){let{completeOnContinue:u=true,aliasToRemoveAfter:f=[],...p}=r;typeof f=="string"&&(f=[f]),f.push(o);let T=g.animate(o,{alpha:0},{...p,aliasToRemoveAfter:f,completeOnContinue:u},d);if(T)return [T]}Nr.removeWithDissolve=S;async function Y(o,r,d={},u){let{completeOnContinue:f=true,aliasToRemoveAfter:p=[],...T}=d,O=[];r||(r=o),typeof p=="string"&&(p=[p]);let x=g.find(o);if(!x)return I(o,r,d,u);let A=`${o}_temp_fade`;g.editAlias(o,A),p.push(A),r=e(o,r,{zIndex:x?x.parent?.getChildIndex(x):void 0,properties:n(x)}),x?.parent?.setChildIndex(x,x.parent.getChildIndex(x)-.1),A&&g.copyCanvasElementProperty(A,o),A&&tickers.tickers.transfer(A,o,"duplicate"),r.alpha=0;let b=g.animate(o,{alpha:1},{...T,aliasToRemoveAfter:p,completeOnContinue:f},u);if(b){let w=S(A,{...d,tickerIdToResume:b,completeOnContinue:f},u);w&&O.push(...w),O.push(b),tickers.tickers.pause({id:b});}if((r instanceof se||r instanceof ae)&&r.haveEmptyTexture&&await r.load(),O.length>0)return O}Nr.showWithFade=Y;function U(o,r={},d){return S(o,r,d)}Nr.removeWithFade=U;async function L(o,r,d={},u){let{direction:f="right",completeOnContinue:p=true,tickerIdToResume:T=[],aliasToRemoveAfter:O=[],removeOldComponentWithMoveOut:x,animateOldComponentOut:A=x??false,motionBlur:b,...w}=d,C=[],P;r||(r=o),typeof T=="string"&&(T=[T]),typeof O=="string"&&(O=[O]);let _,z=g.find(o);if(z&&(_=`${o}_temp_movein`,g.editAlias(o,_),z instanceof se||z instanceof ae?P=z.positionInfo:P={x:z.x,y:z.y,type:"pixel"}),r=e(o,r,{zIndex:z?z.parent?.getChildIndex(z):void 0}),z?.parent?.setChildIndex(z,z.parent.getChildIndex(z)-.1),_&&g.copyCanvasElementProperty(_,o),_&&tickers.tickers.transfer(_,o,"move"),(r instanceof se||r instanceof ae)&&r.haveEmptyTexture&&await r.load(),P||(r instanceof se||r instanceof ae?P=r.positionInfo:P={x:r.x,y:r.y,type:"pixel"}),_)if(A){let ge=oe(_,{...w,direction:f,motionBlur:b,autoplay:false,completeOnContinue:p},u);ge&&(C.push(...ge),T.push(...ge));}else O.push(_);switch(f){case "up":r.y=g.height+r.height;break;case "down":r.y=-r.height;break;case "left":r.x=g.width+r.width;break;case "right":r.x=-r.width;break}let N=tickers.tickers.pause({canvasAlias:o});T.push(...N);let ee=g.animate(o,t(P),{...w,tickerIdToResume:T,aliasToRemoveAfter:O,completeOnContinue:p},u);ee&&C.push(ee);let te=dn(o,r,f,b,{...w,completeOnContinue:p},u);if(te&&C.push(te),C.length>0)return C}Nr.moveIn=L;function oe(o,r={},d){let{direction:u="right",completeOnContinue:f=true,aliasToRemoveAfter:p=[],motionBlur:T,...O}=r;typeof p=="string"&&(p=[p]),p.push(o);let x=g.find(o);if(!x){k.warn(`The canvas component "${o}" is not found.`);return}let A={x:x.x,y:x.y};switch(u){case "up":A.y=-x.height;break;case "down":A.y=g.height+x.height;break;case "left":A.x=-x.width;break;case "right":A.x=g.width+x.width;break}tickers.tickers.pause({canvasAlias:o});let b=g.animate(o,A,{...O,aliasToRemoveAfter:p,completeOnContinue:f},d),w=dn(o,x,u,T,{...O,completeOnContinue:f},d);return Yt([b,w])}Nr.moveOut=oe;async function E(o,r,d={},u){let{direction:f="right",completeOnContinue:p=true,tickerIdToResume:T=[],aliasToRemoveAfter:O=[],removeOldComponentWithZoomOut:x,animateOldComponentOut:A=x??false,...b}=d,w=[],C;r||(r=o),typeof T=="string"&&(T=[T]),typeof O=="string"&&(O=[O]);let P,_=g.find(o);_&&(P=`${o}_temp_zoom`,g.editAlias(o,P),_ instanceof se||_ instanceof ae?C=_.positionInfo:C={x:_.x,y:_.y,type:"pixel"}),r=e(o,r,{zIndex:_?_.parent?.getChildIndex(_):void 0}),_?.parent?.setChildIndex(_,_.parent.getChildIndex(_)-.1),P&&g.copyCanvasElementProperty(P,o),P&&tickers.tickers.transfer(P,o,"move"),(r instanceof se||r instanceof ae)&&r.haveEmptyTexture&&await r.load(),C||(r instanceof se||r instanceof ae?C=r.positionInfo:C={x:r.x,y:r.y,type:"pixel"});let z={x:r.pivot.x,y:r.pivot.y},N={x:r.scale.x,y:r.scale.y};if(P)if(A){let ge=K(P,{...b,direction:f,autoplay:false,completeOnContinue:p},u);ge&&(w.push(...ge),T.push(...ge));}else O.push(P);(r instanceof se||r instanceof ae)&&r.haveEmptyTexture&&await r.load(),f==="up"?(r.pivot.y=g.height-r.y,r.pivot.x=g.width/2-r.x,r.y=g.height,r.x=g.width/2):f==="down"?(r.pivot.y=0-r.y,r.pivot.x=g.width/2-r.x,r.y=0,r.x=g.width/2):f==="left"?(r.pivot.x=g.width-r.x,r.pivot.y=g.height/2-r.y,r.x=g.width,r.y=g.height/2):f==="right"&&(r.pivot.x=0-r.x,r.pivot.y=g.height/2-r.y,r.x=0,r.y=g.height/2),r.pivot=exports.CanvasPropertyUtility.getPointBySuperPoint(r.pivot,r.angle),r.scale.set(0);let ee=tickers.tickers.pause({canvasAlias:o});T.push(...ee);let te=g.animate(o,{pivotX:z.x,pivotY:z.y,scaleX:N.x,scaleY:N.y,...t(C)},{...b,tickerIdToResume:T,aliasToRemoveAfter:O,completeOnContinue:p},u);if(te&&w.push(te),w.length>0)return w}Nr.zoomIn=E;function K(o,r={},d){let{direction:u="right",completeOnContinue:f=true,aliasToRemoveAfter:p=[],...T}=r;typeof p=="string"&&(p=[p]),p.push(o);let O=g.find(o);if(!O){k.warn(`The canvas component "${o}" is not found.`);return}let x={x:O.x,y:O.y},A={x:O.pivot.x,y:O.pivot.y};u==="down"?(x.y=g.height,x.x=g.width/2,A.y=g.height-x.y,A.x=g.width/2-x.x):u==="up"?(x.y=0,x.x=g.width/2,A.y=0-x.y,A.x=g.width/2-x.x):u==="right"?(x.x=g.width,x.y=g.height/2,A.x=g.width-x.x,A.y=g.height/2-x.y):u==="left"&&(x.x=0,x.y=g.height/2,A.x=0-x.x,A.y=g.height/2-x.y),A=exports.CanvasPropertyUtility.getPointBySuperPoint(A,O.angle),tickers.tickers.pause({canvasAlias:o});let b=g.animate(o,{...x,pivotX:A.x,pivotY:A.y,scaleX:0,scaleY:0},{...T,aliasToRemoveAfter:p,completeOnContinue:f},d);if(b)return [b]}Nr.zoomOut=K;async function G(o,r,d={},u){let{direction:f="right",completeOnContinue:p=true,tickerIdToResume:T=[],aliasToRemoveAfter:O=[],animateOldComponentOut:x=true,motionBlur:A,...b}=d,w=[],C;r||(r=o),typeof T=="string"&&(T=[T]),typeof O=="string"&&(O=[O]);let P,_=g.find(o);switch(_&&(P=`${o}_temp_push`,g.editAlias(o,P),_ instanceof se||_ instanceof ae?C=_.positionInfo:C={x:_.x,y:_.y,type:"pixel"}),r=e(o,r,{zIndex:_?_.parent?.getChildIndex(_):void 0}),_?.parent?.setChildIndex(_,_.parent.getChildIndex(_)-.1),P&&g.copyCanvasElementProperty(P,o),P&&tickers.tickers.transfer(P,o,"move"),C||((r instanceof se||r instanceof ae)&&r.haveEmptyTexture?C=r.positionInfo:C={x:r.x,y:r.y,type:"pixel"}),(r instanceof se||r instanceof ae)&&r.haveEmptyTexture&&await r.load(),f){case "up":r.y=g.height+r.height;break;case "down":r.y=-r.height;break;case "left":r.x=g.width+r.width;break;case "right":r.x=-r.width;break}let z=tickers.tickers.pause({canvasAlias:o});if(T.push(...z),P)if(x){let te=R(P,{...b,direction:f,motionBlur:A,completeOnContinue:p});te&&w.push(...te);}else O.push(P);let N=g.animate(o,t(C),{...b,tickerIdToResume:T,aliasToRemoveAfter:O,completeOnContinue:p},u);N&&w.push(N);let ee=dn(o,r,f,A,{...b,completeOnContinue:p},u);if(ee&&w.push(ee),w.length>0)return w}Nr.pushIn=G;function R(o,r={direction:"right"},d){return oe(o,r,d)}Nr.pushOut=R;async function B(o,r,d={},u){let{angle:f,direction:p="right",invert:T=false,duration:O,delay:x,ease:A,completeOnContinue:b=true,animateOldComponentOut:w=true}=d,{aliasToRemoveAfter:C=[]}=d;r||(r=o),typeof C=="string"&&(C=[C]);let{component:P,oldComponentAlias:_}=i(o,r,"wipe"),z=s(_,w,C,te=>V(te,{...c(d),angle:(f??v(p))+180},u));(P instanceof se||P instanceof ae)&&P.haveEmptyTexture&&await P.load();let N={kind:"wipe",angle:f??v(p),invert:T,bounds:gt(P)},ee=m(o,{config:N,from:0,to:1,duration:O,delay:x,ease:A,completeOnContinue:b,aliasToRemoveAfter:C},u);return l(ee,z)}Nr.wipeIn=B;function V(o,r={},d){let{angle:u,direction:f="right",invert:p=false,duration:T,delay:O,ease:x,completeOnContinue:A=true}=r,{aliasToRemoveAfter:b=[]}=r;typeof b=="string"&&(b=[b]),b.push(o);let w=g.find(o);if(!w){k.warn(`The canvas component "${o}" is not found.`);return}let C={kind:"wipe",angle:u??v(f),invert:p,bounds:gt(w)},P=m(o,{config:C,from:1,to:0,duration:T,delay:O,ease:x,completeOnContinue:A,aliasToRemoveAfter:b},d);if(P)return [P]}Nr.wipeOut=V;async function X(o,r,d={},u){let{origin:f={},aspect:p=1,invert:T=false,duration:O,delay:x,ease:A,completeOnContinue:b=true,animateOldComponentOut:w=true,direction:C="expand"}=d,{aliasToRemoveAfter:P=[]}=d;r||(r=o),typeof P=="string"&&(P=[P]);let{component:_,oldComponentAlias:z}=i(o,r,"iris"),N=s(z,w,P,ge=>Q(ge,{...c(d),direction:C==="contract"?"expand":"contract"},u));(_ instanceof se||_ instanceof ae)&&_.haveEmptyTexture&&await _.load();let ee={kind:"iris",outside:C==="contract",originX:f.x??.5,originY:f.y??.5,aspect:p,invert:T,bounds:gt(_)},te=m(o,{config:ee,from:C==="contract"?1:0,to:C==="contract"?0:1,duration:O,delay:x,ease:A,completeOnContinue:b,aliasToRemoveAfter:P},u);return l(te,N)}Nr.irisIn=X;function Q(o,r={},d){let{origin:u={},aspect:f=1,invert:p=false,duration:T,delay:O,ease:x,completeOnContinue:A=true,direction:b="expand"}=r,{aliasToRemoveAfter:w=[]}=r;typeof w=="string"&&(w=[w]),w.push(o);let C=g.find(o);if(!C){k.warn(`The canvas component "${o}" is not found.`);return}let P={kind:"iris",outside:b==="contract",originX:u.x??.5,originY:u.y??.5,aspect:f,invert:p,bounds:gt(C)},_=m(o,{config:P,from:b==="contract"?0:1,to:b==="contract"?1:0,duration:T,delay:O,ease:x,completeOnContinue:A,aliasToRemoveAfter:w},d);if(_)return [_]}Nr.irisOut=Q;async function $(o,r,d={},u){let{orientation:f="vertical",direction:p="inward",origin:T=.5,invert:O=false,duration:x,delay:A,ease:b,completeOnContinue:w=true,animateOldComponentOut:C=true}=d,{aliasToRemoveAfter:P=[]}=d;r||(r=o),typeof P=="string"&&(P=[P]);let{component:_,oldComponentAlias:z}=i(o,r,"split"),N=s(z,C,P,ge=>W(ge,{...c(d),direction:p==="inward"?"outward":"inward"},u));(_ instanceof se||_ instanceof ae)&&_.haveEmptyTexture&&await _.load();let ee={kind:"split",orientation:f,direction:p,origin:T,invert:O,bounds:gt(_)},te=m(o,{config:ee,from:0,to:1,duration:x,delay:A,ease:b,completeOnContinue:w,aliasToRemoveAfter:P},u);return l(te,N)}Nr.splitIn=$;function W(o,r={},d){let{orientation:u="vertical",direction:f="inward",origin:p=.5,invert:T=false,duration:O,delay:x,ease:A,completeOnContinue:b=true}=r,{aliasToRemoveAfter:w=[]}=r;typeof w=="string"&&(w=[w]),w.push(o);let C=g.find(o);if(!C){k.warn(`The canvas component "${o}" is not found.`);return}let P={kind:"split",orientation:u,direction:f,origin:p,invert:T,bounds:gt(C)},_=m(o,{config:P,from:1,to:0,duration:O,delay:x,ease:A,completeOnContinue:b,aliasToRemoveAfter:w},d);if(_)return [_]}Nr.splitOut=W;async function J(o,r,d={},u){let{strength:f=32,quality:p=4,duration:T,delay:O,ease:x,completeOnContinue:A=true,fadeComponent:b=true,animateOldComponentOut:w=true}=d,{aliasToRemoveAfter:C=[]}=d;r||(r=o),typeof C=="string"&&(C=[C]);let{component:P,oldComponentAlias:_}=i(o,r,"blur"),z=s(_,w,C,ge=>q(ge,c(d),u));(P instanceof se||P instanceof ae)&&P.haveEmptyTexture&&await P.load();let N=T??1;b&&h(o,P,"in",N,u);let ee=new filters.filters.BlurFilter({strength:f,quality:p}),te=ce(o,P,ee,{strength:[f,0]},{duration:N,delay:O,ease:x,completeOnContinue:A,aliasToRemoveAfter:C},u);return l(te,z)}Nr.blurIn=J;function q(o,r={},d){let{strength:u=32,quality:f=4,duration:p,delay:T,ease:O,completeOnContinue:x=true,fadeComponent:A=true}=r,{aliasToRemoveAfter:b=[]}=r;typeof b=="string"&&(b=[b]),b.push(o);let w=g.find(o);if(!w){k.warn(`The canvas component "${o}" is not found.`);return}let C=p??1;A&&h(o,w,"out",C,d);let P=new filters.filters.BlurFilter({strength:0,quality:f}),_=ce(o,w,P,{strength:[0,u]},{duration:C,delay:T,ease:O,completeOnContinue:x,aliasToRemoveAfter:b},d);if(_)return [_]}Nr.blurOut=q;async function j(o,r,d={},u){let{pixelSize:f=32,direction:p="up-left",duration:T,delay:O,ease:x,completeOnContinue:A=true,fadeComponent:b=false,animateOldComponentOut:w=true}=d,{aliasToRemoveAfter:C=[]}=d;r||(r=o),typeof C=="string"&&(C=[C]);let{component:P,oldComponentAlias:_}=i(o,r,"pixelate"),z=s(_,w,C,Wt=>ne(Wt,c(d),u));(P instanceof se||P instanceof ae)&&P.haveEmptyTexture&&await P.load();let N=T??1;b&&h(o,P,"in",N,u);let ee=le(f,p,"in"),te=new filters.filters.PixelateFilter([ee.sizeX[0],ee.sizeY[0]]),ge=ce(o,P,te,ee,{duration:N,delay:O,ease:x,completeOnContinue:A,aliasToRemoveAfter:C},u);return l(ge,z)}Nr.pixelateIn=j;function ne(o,r={},d){let{pixelSize:u=32,direction:f="up-left",duration:p,delay:T,ease:O,completeOnContinue:x=true,fadeComponent:A=false}=r,{aliasToRemoveAfter:b=[]}=r;typeof b=="string"&&(b=[b]),b.push(o);let w=g.find(o);if(!w){k.warn(`The canvas component "${o}" is not found.`);return}let C=p??1;A&&h(o,w,"out",C,d);let P=le(u,f,"out"),_=new filters.filters.PixelateFilter([P.sizeX[0],P.sizeY[0]]),z=ce(o,w,_,P,{duration:C,delay:T,ease:O,completeOnContinue:x,aliasToRemoveAfter:b},d);if(z)return [z]}Nr.pixelateOut=ne;function le(o,r,d){let u=d==="in"?1:-1,f=(r.endsWith("left")?1:-1)*u,p=(r.startsWith("up")?1:-1)*u,T=Math.max(1,Math.abs(o)),O=d==="in"?[T,1]:[1,T];return {sizeX:O.map(x=>x*f),sizeY:O.map(x=>x*p)}}async function re(o,r,d={},u){let{color:f=16777215,maxAlpha:p=1,duration:T=.3,holdDuration:O=0,pulses:x=1,completeOnContinue:A=true,fadeComponent:b=true,...w}=d;r||(r=o);let C=g.find(o);if(C)return je(o,C,r,{color:f,maxAlpha:p,fadeDuration:T,holdDuration:O,pulses:x,completeOnContinue:A,rest:w,priority:u});let{component:P}=i(o,r,"flash");(P instanceof se||P instanceof ae)&&P.haveEmptyTexture&&await P.load(),b&&h(o,P,"in",T,u);let _=[],z=Re(P,{color:f,maxAlpha:p,fadeDuration:T,holdDuration:O,pulses:x,completeOnContinue:A,aliasToRemoveAfter:[],rest:w,priority:u});if(z&&_.push(z),_.length>0)return _}Nr.flashIn=re;function he(o,r={},d){let{color:u=16777215,maxAlpha:f=1,duration:p=.3,holdDuration:T=0,pulses:O=1,completeOnContinue:x=true,fadeComponent:A=true,...b}=r,w=g.find(o);if(!w){k.warn(`The canvas component "${o}" is not found.`);return}if(A){let{total:P}=y(f,p,T,O);h(o,w,"out",P,d);}let C=Re(w,{color:u,maxAlpha:f,fadeDuration:p,holdDuration:T,pulses:O,completeOnContinue:x,aliasToRemoveAfter:[o],rest:b,priority:d});if(C)return [C]}Nr.flashOut=he;function Re(o,r){let{values:d,times:u,total:f}=y(r.maxAlpha,r.fadeDuration,r.holdDuration,r.pulses,r.endAtPeak??false),p=new filters.filters.ColorOverlayFilter({color:r.color,alpha:0});return ce(o.label,o,p,{alpha:d},{duration:f,times:u,delay:r.rest.delay,ease:r.rest.ease,aliasToRemoveAfter:r.aliasToRemoveAfter,completeOnContinue:r.completeOnContinue},r.priority)}async function je(o,r,d,u){let{component:f,oldComponentAlias:p}=i(o,d,"flash");if(!p)return;let T=f.alpha,O=r.alpha;f.alpha=0,(f instanceof se||f instanceof ae)&&f.haveEmptyTexture&&await f.load();let{values:x,times:A,total:b}=y(u.maxAlpha,u.fadeDuration,u.holdDuration,u.pulses,true),w=b+u.fadeDuration,C=b/w,P={duration:w,delay:u.rest.delay,ease:u.rest.ease,completeOnContinue:u.completeOnContinue},_=ce(p,r,new filters.filters.ColorOverlayFilter({color:u.color,alpha:0}),{alpha:[...x,u.maxAlpha]},{...P,times:[...A.map(ge=>ge*C),1],aliasToRemoveAfter:[p]},u.priority),z=ce(o,f,new filters.filters.ColorOverlayFilter({color:u.color,alpha:u.maxAlpha}),{alpha:[u.maxAlpha,u.maxAlpha,0]},{...P,times:[0,C,1],aliasToRemoveAfter:u.rest.aliasToRemoveAfter},u.priority),N={duration:w,delay:u.rest.delay,times:[0,C,C,1],ease:"linear"},ee=g.animate(p,{alpha:[O,O,0,0]},N,u.priority),te=g.animate(o,{alpha:[0,0,T,T]},N,u.priority);return u.completeOnContinue&&(ee&&tickers.tickers.completeOnStepEnd({id:ee}),te&&tickers.tickers.completeOnStepEnd({id:te})),Yt([_,z,ee,te])}function dn(o,r,d,u,f,p){if(!u)return;let T=u===true?40:u,O=d==="up"||d==="down"?"velocityY":"velocityX",x=d==="up"||d==="left"?-1:1,A=new filters.filters.MotionBlurFilter({velocity:{x:0,y:0},kernelSize:15});return ce(o,r,A,{[O]:[0,x*T,0]},{duration:f.duration??.3,delay:f.delay,ease:f.ease,completeOnContinue:f.completeOnContinue,autoplay:f.autoplay},p)}function Yt(o){let r=o.filter(d=>!!d);return r.length>0?r:void 0}async function rt(o,r,d,u,f,p,T,O,x=false){let{duration:A,delay:b,ease:w,completeOnContinue:C=true,fadeComponent:P=f,animateOldComponentOut:_=true}=u,{aliasToRemoveAfter:z=[]}=u;typeof z=="string"&&(z=[z]);let{component:N,oldComponentAlias:ee}=i(o,r??o,d),te=x&&!!ee&&_,ge=N.alpha;te&&(N.alpha=0);let Wt=()=>s(ee,_,z,O),un=te?[]:Wt();(N instanceof se||N instanceof ae)&&N.haveEmptyTexture&&await N.load(),te&&un.push(...Wt());let _t=A??1,Hn=x&&un.length>0?typeof b=="function"?(Ti,Ii)=>b(Ti,Ii)+_t:(b??0)+_t:b,Ht;return te?(Ht=g.animate(o,{alpha:[0,ge]},{duration:P?_t/4:0,delay:Hn},p),Ht&&C&&tickers.tickers.completeOnStepEnd({id:Ht})):P&&h(o,N,"in",_t,p),Yt([...T(N,{duration:_t,delay:Hn,ease:w,completeOnContinue:C},z),...un,Ht])}function st(o,r,d,u,f){let{duration:p,delay:T,ease:O,completeOnContinue:x=true,fadeComponent:A=d}=r,{aliasToRemoveAfter:b=[]}=r;typeof b=="string"&&(b=[b]),b.push(o);let w=g.find(o);if(!w){k.warn(`The canvas component "${o}" is not found.`);return}let C=p??1;return A&&h(o,w,"out",C,u,T),Yt(f(w,{duration:C,delay:T,ease:O,completeOnContinue:x},b))}function kn(o){let{width:r,height:d}=o.getBounds();return Math.hypot(r,d)/2}function Ut(o){return {x:o?.x??.5,y:o?.y??.5}}function Bn(o,r,d,u,f,p,T){let{strength:O=40,bursts:x=3,slices:A=8,rgbSplit:b=6}=u,w=z=>{let N=Lt(z,.5,x);return d==="in"?N:N.reverse()},C={...f,ease:f.ease??"linear"},P=new filters.filters.GlitchFilter({slices:A,offset:0});P.refresh(),P.padding=Math.ceil(Math.abs(O));let _=[ce(o,r,P,{offset:w(O)},{...C,aliasToRemoveAfter:p},T)];if(b!==0){let z=w(b),N=new filters.filters.RGBSplitFilter({red:{x:0,y:0},green:{x:0,y:0},blue:{x:0,y:0}});N.padding=Math.ceil(Math.abs(b)),_.push(ce(o,r,N,{redX:z,blueX:z.map(ee=>-ee)},C,T));}return _}async function Br(o,r,d={},u){return rt(o,r,"glitch",d,true,u,(f,p,T)=>Bn(o,f,"in",d,p,T,u),f=>mi(f,c(d),u),true)}Nr.glitchIn=Br;function mi(o,r={},d){return st(o,r,true,d,(u,f,p)=>Bn(o,u,"out",r,f,p,d))}Nr.glitchOut=mi;function Fn(o,r,d,u,f,p,T){let{angle:O=540,radius:x=kn(r),origin:A}=u,b=Ut(A),w=O*Math.PI/180,C=d==="in"?[w,0]:[0,w],P=new filters.filters.TwistFilter({radius:x,angle:C[0],offset:{x:0,y:0}}),{width:_,height:z}=r.getBounds();return P.padding=Math.max(P.padding,On({x:b.x*_,y:b.y*z},x,_,z)),[ce(o,r,P,{angle:C},{...f,aliasToRemoveAfter:p},T,()=>{let{x:ee,y:te}=it(r,b);P.offsetX=ee,P.offsetY=te;})]}async function Fr(o,r,d={},u){return rt(o,r,"twist",d,true,u,(f,p,T)=>Fn(o,f,"in",d,p,T,u),f=>yi(f,{...c(d),angle:-(d.angle??540)},u))}Nr.twistIn=Fr;function yi(o,r={},d){return st(o,r,true,d,(u,f,p)=>Fn(o,u,"out",r,f,p,d))}Nr.twistOut=yi;function Ln(o,r,d,u,f,p,T){let{strength:O=.6,origin:x}=u,A=Ut(x),b=d==="in"?[O,0]:[0,O],w=new filters.filters.ZoomBlurFilter({center:{x:0,y:0},strength:b[0]}),{width:C,height:P}=r.getBounds();return w.padding=rn({x:A.x*C,y:A.y*P},O,C,P),[ce(o,r,w,{strength:b},{...f,aliasToRemoveAfter:p},T,()=>{let{x:z,y:N}=it(r,A);w.center={x:z,y:N};})]}async function Lr(o,r,d={},u){return rt(o,r,"warp",d,true,u,(f,p,T)=>Ln(o,f,"in",d,p,T,u),f=>xi(f,c(d),u),true)}Nr.warpIn=Lr;function xi(o,r={},d){return st(o,r,true,d,(u,f,p)=>Ln(o,u,"out",r,f,p,d))}Nr.warpOut=xi;function zn(o,r,d,u,f,p){let{origin:T,amplitude:O=30,wavelength:x=160,speed:A=500}=d,b=Ut(T),{width:w,height:C}=r.getBounds(),P=new filters.filters.ShockwaveFilter({center:{x:0,y:0},amplitude:O,wavelength:x,speed:A,time:0});P.padding=Math.ceil(Math.abs(O)*1.25);let _=sn({x:b.x*w,y:b.y*C},{width:w,height:C},x,-1)/A;return [ce(o,r,P,{time:[0,_]},{...u,aliasToRemoveAfter:f},p,()=>{let{x:N,y:ee}=it(r,b);P.center={x:N,y:ee};})]}async function zr(o,r,d={},u){return rt(o,r,"ripple",d,true,u,(f,p,T)=>zn(o,f,d,p,T,u),f=>S(f,{duration:d.duration,delay:d.delay,ease:d.ease,completeOnContinue:d.completeOnContinue},u))}Nr.rippleIn=zr;function Yr(o,r={},d){return st(o,r,true,d,(u,f,p)=>zn(o,u,r,f,p,d))}Nr.rippleOut=Yr;function Yn(o,r,d,u,f,p,T){let{edge:O="hard",noiseScale:x=8,seed:A=Math.random()*1e3}=u,[b,w]=O==="hard"?[.25,.75]:[0,1],C=d==="in"?[b,w]:[w,b],P=new filters.filters.SimplexNoiseFilter({strength:C[0],noiseScale:x,offsetZ:A,step:O==="hard"?.5:0});return [ce(o,r,P,{strength:C},{...f,aliasToRemoveAfter:p},T)]}async function Ur(o,r,d={},u){return rt(o,r,"noise",d,false,u,(f,p,T)=>Yn(o,f,"in",d,p,T,u),f=>Pi(f,c(d),u))}Nr.noiseDissolveIn=Ur;function Pi(o,r={},d){return st(o,r,false,d,(u,f,p)=>Yn(o,u,"out",r,f,p,d))}Nr.noiseDissolveOut=Pi;function Un(o,r,d,u,f,p,T){let{lineThickness:O=.02,brightness:x=3,scanlines:A=true}=u,b=r.scale.x,w=r.scale.y,C=w*O,P=d==="in"?[0,.45,1]:[0,.55,1],_=d==="in"?[0,b,b]:[b,b,0],z=d==="in"?[C,C,w]:[w,C,C],N=d==="in"?[x,x,1]:[1,x,x];d==="in"&&r.scale.set(0,C);let ee=[g.animate(o,{scaleX:_,scaleY:z},{duration:f.duration,delay:f.delay,ease:f.ease,times:P,completeOnContinue:f.completeOnContinue,aliasToRemoveAfter:p},T),ce(o,r,new filters.filters.AdjustmentFilter({brightness:N[0]}),{brightness:N},{...f,times:P},T)];if(A){let te=d==="in"?[.5,.5,0]:[0,.5,.5];ee.push(ce(o,r,new filters.filters.CRTFilter({curvature:0,vignettingAlpha:0,lineWidth:3,lineContrast:te[0],noise:te[0]}),{lineContrast:te,noise:te},{...f,times:P},T));}return ee}async function Wr(o,r,d={},u){return rt(o,r,"tv",d,false,u,(f,p,T)=>Un(o,f,"in",d,p,T,u),f=>vi(f,c(d),u),true)}Nr.tvIn=Wr;function vi(o,r={},d){return st(o,r,false,d,(u,f,p)=>Un(o,u,"out",r,f,p,d))}Nr.tvOut=vi;function Wn(o,r,d,u,f,p,T){let{strength:O=1,mode:x="pinch",radius:A=kn(r),origin:b}=u,w=(x==="bulge"?1:-1)*O,C=Ut(b),P=d==="in"?[w,0]:[0,w],_=new filters.filters.BulgePinchFilter({center:C,radius:A,strength:P[0]});if(x==="bulge"){let{width:N,height:ee}=r.getBounds();_.padding=On({x:C.x*N,y:C.y*ee},A,N,ee);}return [ce(o,r,_,{strength:P},{...f,aliasToRemoveAfter:p},T,()=>{let{x:N,y:ee,area:te}=it(r,C);_.center={x:N/te.width,y:ee/te.height};})]}async function Hr(o,r,d={},u){return rt(o,r,"pinch",d,true,u,(f,p,T)=>Wn(o,f,"in",d,p,T,u),f=>S(f,{duration:d.duration,delay:d.delay,ease:d.ease,completeOnContinue:d.completeOnContinue},u))}Nr.pinchIn=Hr;function Gr(o,r={},d){return st(o,r,true,d,(u,f,p)=>Wn(o,u,"out",r,f,p,d))}Nr.pinchOut=Gr;})(exports.transitions||={});var zt=class extends qe{constructor(n){super(n);this._memory=n;this.pixivnId=n.pixivnId;}_memory;pixivnId;get memory(){return {...this._memory,...super.memory,elements:[],pixivnId:this.pixivnId}}};function _r(){return async(e,n)=>{try{let i=e.canvasElementInfo;if(i){let s=new zt(i),c=i.zIndex;s.groupColor=16711680;let l=new dt__default.default.Graphics;l.rect(0,0,300,100).fill({color:16711680,alpha:.5}),s.addChild(l);let v=new dt__default.default.Text({text:`Error: ${i.label}`,x:10,y:10});s.addChild(v);let m=e.parent;if(m&&"addChild"in m)c!==void 0?m.addChildAt(s,c):m.addChild(s);else {let h=i.parentLabel?g.find(i.parentLabel):void 0;if(h)c!==void 0?h.addChildAt(s,c):h.addChild(s);else {let y=i.label??i.pixivnId;g.add(y,s,{zIndex:c});}}}}catch{}}}function Mr(t,e,n){let i={...g.find(t)?.memory,...n},s=new pt({text:e,...n});return i&&g.copyCanvasElementProperty(i,s),g.add(t,s,{ignoreOldStyle:true,zIndex:n?.zIndex}),s}var {Assets:oc,Color:ac,Rectangle:cc,TextStyle:lc,Texture:dc,UPDATE_PRIORITY:uc}=dt__default.default,g=new kt;ve.init({getScreen:()=>g.screen});core.GameUnifier.addOnPreContinue(async()=>{try{let{tikersIds:t,stepAlias:e}=tickers.drainCompleteOnStepEndQueue(),n=(async()=>{for(;t.length;){let{id:s}=t.pop()||{};s&&await tickers.tickers.forceCompletion(s);}})(),i=(async()=>{for(;e.length;){let{alias:s,id:c}=e.pop()||{};s&&c&&await tickers.tickers.forceCompletion(c,s);}})();await Promise.all([n,i]);}catch{}});
2
+ exports.Assets=oc;exports.CanvasBaseItem=nn;exports.CanvasManagerStatic=fe;exports.Color=ac;exports.Container=qe;exports.ImageContainer=ae;exports.ImageSprite=se;exports.Rectangle=cc;exports.RegisteredCanvasComponents=Ce;exports.RegisteredEvents=In;exports.Sprite=ht;exports.Text=pt;exports.TextStyle=lc;exports.Texture=dc;exports.UPDATE_PRIORITY=uc;exports.VideoSprite=$e;exports.addImage=cn;exports.addImageCointainer=an;exports.addListenerHandler=lt;exports.addVideo=ln;exports.analizePositionsExtensionProps=Ne;exports.canvas=g;exports.canvasComponentDecorator=Mi;exports.createFilterTransitionApplier=Dn;exports.drawCanvasErrorHandler=_r;exports.eventDecorator=Oi;exports.getTexture=Bt;exports.moveIn=br;exports.moveOut=wr;exports.pushIn=Er;exports.pushOut=Or;exports.removeWithDissolve=Tr;exports.removeWithFade=Cr;exports.setMemoryContainer=De;exports.shakeEffect=cr;exports.showImage=xr;exports.showImageContainer=yr;exports.showText=Mr;exports.showVideo=Pr;exports.showWithDissolve=vr;exports.showWithFade=Ir;exports.zoomIn=Sr;exports.zoomOut=Ar;Object.keys(tickers).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return tickers[k]}})});