@drincs/pixi-vn 1.1.2 → 1.2.0
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.
- package/dist/canvas/CanvasManager.cjs +1 -1
- package/dist/canvas/CanvasManager.js +1 -1
- package/dist/canvas/CanvasManagerStatic.cjs +1 -1
- package/dist/canvas/CanvasManagerStatic.js +1 -1
- package/dist/canvas/components/Container.cjs +1 -1
- package/dist/canvas/components/Container.js +1 -1
- package/dist/canvas/components/ImageContainer.cjs +1 -1
- package/dist/canvas/components/ImageContainer.js +1 -1
- package/dist/canvas/components/ImageSprite.cjs +2 -2
- package/dist/canvas/components/ImageSprite.js +2 -2
- package/dist/canvas/components/Sprite.cjs +1 -1
- package/dist/canvas/components/Sprite.js +1 -1
- package/dist/canvas/components/Text.cjs +1 -1
- package/dist/canvas/components/Text.js +1 -1
- package/dist/canvas/components/VideoSprite.cjs +2 -2
- package/dist/canvas/components/VideoSprite.js +2 -2
- package/dist/canvas/decorators/canvas-element-decorator.cjs +1 -1
- package/dist/canvas/decorators/canvas-element-decorator.js +1 -1
- package/dist/canvas/decorators/event-decorator.cjs +1 -1
- package/dist/canvas/decorators/event-decorator.js +1 -1
- package/dist/canvas/functions/canvas-effect.cjs +1 -1
- package/dist/canvas/functions/canvas-effect.js +1 -1
- package/dist/canvas/functions/canvas-import-utility.cjs +1 -1
- package/dist/canvas/functions/canvas-import-utility.js +1 -1
- package/dist/canvas/functions/canvas-transition.cjs +1 -1
- package/dist/canvas/functions/canvas-transition.js +1 -1
- package/dist/canvas/functions/image-container-utility.cjs +1 -1
- package/dist/canvas/functions/image-container-utility.js +1 -1
- package/dist/canvas/functions/image-utility.cjs +1 -1
- package/dist/canvas/functions/image-utility.js +1 -1
- package/dist/canvas/functions/video-utility.cjs +1 -1
- package/dist/canvas/functions/video-utility.js +1 -1
- package/dist/canvas/index.cjs +1 -1
- package/dist/canvas/index.js +1 -1
- package/dist/canvas/tickers/classes/TickerBase.cjs +1 -1
- package/dist/canvas/tickers/classes/TickerBase.js +1 -1
- package/dist/canvas/tickers/components/FadeAlphaTicker.cjs +1 -1
- package/dist/canvas/tickers/components/FadeAlphaTicker.js +1 -1
- package/dist/canvas/tickers/components/MoveTicker.cjs +1 -1
- package/dist/canvas/tickers/components/MoveTicker.js +1 -1
- package/dist/canvas/tickers/components/RotateTicker.cjs +1 -1
- package/dist/canvas/tickers/components/RotateTicker.js +1 -1
- package/dist/canvas/tickers/components/ZoomTicker.cjs +1 -1
- package/dist/canvas/tickers/components/ZoomTicker.js +1 -1
- package/dist/canvas/tickers/decorators/ticker-decorator.cjs +1 -1
- package/dist/canvas/tickers/decorators/ticker-decorator.js +1 -1
- package/dist/canvas/tickers/functions/ticker-texture-utility.cjs +1 -1
- package/dist/canvas/tickers/functions/ticker-texture-utility.js +1 -1
- package/dist/canvas/tickers/index.cjs +1 -1
- package/dist/canvas/tickers/index.js +1 -1
- package/dist/character/classes/CharacterBaseModel.cjs +17 -17
- package/dist/character/classes/CharacterBaseModel.js +17 -17
- package/dist/character/classes/CharacterStoredClass.cjs +16 -16
- package/dist/character/classes/CharacterStoredClass.js +16 -16
- package/dist/character/decorators/character-decorator.cjs +1 -1
- package/dist/character/decorators/character-decorator.js +1 -1
- package/dist/character/index.cjs +16 -16
- package/dist/character/index.js +16 -16
- package/dist/classes/CachedMap.cjs +1 -1
- package/dist/classes/CachedMap.d.cts +1 -1
- package/dist/classes/CachedMap.d.ts +1 -1
- package/dist/classes/CachedMap.js +1 -1
- package/dist/classes/index.cjs +1 -1
- package/dist/classes/index.js +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.d.cts +5 -1
- package/dist/constants.d.ts +5 -1
- package/dist/constants.js +1 -1
- package/dist/history/HistoryManager.cjs +2 -2
- package/dist/history/HistoryManager.d.cts +24 -13
- package/dist/history/HistoryManager.d.ts +24 -13
- package/dist/history/HistoryManager.js +2 -2
- package/dist/history/HistoryManagerStatic.cjs +1 -1
- package/dist/history/HistoryManagerStatic.d.cts +9 -8
- package/dist/history/HistoryManagerStatic.d.ts +9 -8
- package/dist/history/HistoryManagerStatic.js +1 -1
- package/dist/history/index.cjs +2 -2
- package/dist/history/index.d.cts +4 -2
- package/dist/history/index.d.ts +4 -2
- package/dist/history/index.js +2 -2
- package/dist/history/interfaces/HistoryManagerInterface.d.cts +54 -11
- package/dist/history/interfaces/HistoryManagerInterface.d.ts +54 -11
- package/dist/{index-CWhYJ7yq.d.ts → index-CvpVN1rC.d.ts} +3 -3
- package/dist/{index-CVn6zVij.d.cts → index-DCnX_VPi.d.cts} +3 -3
- package/dist/index.cjs +73 -73
- package/dist/index.d.cts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +73 -73
- package/dist/narration/NarrationManager.cjs +16 -16
- package/dist/narration/NarrationManager.d.cts +1 -1
- package/dist/narration/NarrationManager.d.ts +1 -1
- package/dist/narration/NarrationManager.js +16 -16
- package/dist/narration/NarrationManagerStatic.cjs +1 -1
- package/dist/narration/NarrationManagerStatic.js +1 -1
- package/dist/narration/classes/ChoiceMenuOption.cjs +1 -1
- package/dist/narration/classes/ChoiceMenuOption.js +1 -1
- package/dist/narration/decorators/RegisteredLabels.cjs +1 -1
- package/dist/narration/decorators/RegisteredLabels.js +1 -1
- package/dist/narration/decorators/newLabel.cjs +1 -1
- package/dist/narration/decorators/newLabel.js +1 -1
- package/dist/narration/index.cjs +17 -17
- package/dist/narration/index.d.cts +2 -2
- package/dist/narration/index.d.ts +2 -2
- package/dist/narration/index.js +17 -17
- package/dist/narration/interfaces/HistoryStep.d.cts +5 -5
- package/dist/narration/interfaces/HistoryStep.d.ts +5 -5
- package/dist/narration/interfaces/{NarrativeHistory.d.cts → NarrationHistory.d.cts} +2 -2
- package/dist/narration/interfaces/{NarrativeHistory.d.ts → NarrationHistory.d.ts} +2 -2
- package/dist/narration/interfaces/NarrationManagerInterface.d.cts +1 -1
- package/dist/narration/interfaces/NarrationManagerInterface.d.ts +1 -1
- package/dist/pixi-devtools/additionalPositionsProperties.cjs +1 -1
- package/dist/pixi-devtools/additionalPositionsProperties.js +1 -1
- package/dist/pixi-vn.d.d.cts +44 -1
- package/dist/pixi-vn.d.d.ts +44 -1
- package/dist/storage/StorageManager.cjs +1 -1
- package/dist/storage/StorageManager.js +1 -1
- package/dist/storage/StorageManagerStatic.cjs +1 -1
- package/dist/storage/StorageManagerStatic.js +1 -1
- package/dist/storage/classes/StoredClassModel.cjs +1 -1
- package/dist/storage/classes/StoredClassModel.js +1 -1
- package/dist/storage/index.cjs +1 -1
- package/dist/storage/index.js +1 -1
- package/dist/utils/diff-utility.d.cts +2 -2
- package/dist/utils/diff-utility.d.ts +2 -2
- package/package.json +3 -3
- /package/dist/narration/interfaces/{NarrativeHistory.cjs → NarrationHistory.cjs} +0 -0
- /package/dist/narration/interfaces/{NarrativeHistory.js → NarrationHistory.js} +0 -0
|
@@ -3307,4 +3307,4 @@ fn setSaturation(c: vec3<f32>, s: f32) -> vec3<f32> {
|
|
|
3307
3307
|
u32v[offset + stride] = c;
|
|
3308
3308
|
u32v[offset + (stride * 2)] = c;
|
|
3309
3309
|
u32v[offset + (stride * 3)] = c;
|
|
3310
|
-
`,dynamic:false}};});var sk,q3,K3,Z3=f(()=>{nt();br();YS();sk=new ae(0,0,0,0),q3=class $S extends Ge{constructor(e={}){e={...$S.defaultOptions,...e,dynamicProperties:{...$S.defaultOptions.dynamicProperties,...e?.dynamicProperties}};let{dynamicProperties:t,shader:i,roundPixels:s,texture:n,particles:o,...a}=e;super({label:"ParticleContainer",...a}),this.renderPipeId="particle",this.batched=false,this._childrenDirty=false,this.texture=n||null,this.shader=i,this._properties={};for(let u in Bh){let l=Bh[u],c=t[u];this._properties[u]={...l,dynamic:c};}this.allowChildren=true,this.roundPixels=s??false,this.particleChildren=o??[];}addParticle(...e){for(let t=0;t<e.length;t++)this.particleChildren.push(e[t]);return this.onViewUpdate(),e[0]}removeParticle(...e){let t=false;for(let i=0;i<e.length;i++){let s=this.particleChildren.indexOf(e[i]);s>-1&&(this.particleChildren.splice(s,1),t=true);}return t&&this.onViewUpdate(),e[0]}update(){this._childrenDirty=true;}onViewUpdate(){this._childrenDirty=true,super.onViewUpdate();}get bounds(){return sk}updateBounds(){}destroy(e=false){if(super.destroy(e),typeof e=="boolean"?e:e?.texture){let i=typeof e=="boolean"?e:e?.textureSource,s=this.texture??this.particleChildren[0]?.texture;s&&s.destroy(i);}this.texture=null,this.shader?.destroy();}removeParticles(e,t){let i=this.particleChildren.splice(e,t);return this.onViewUpdate(),i}removeParticleAt(e){let t=this.particleChildren.splice(e,1);return this.onViewUpdate(),t[0]}addParticleAt(e,t){return this.particleChildren.splice(t,0,e),this.onViewUpdate(),e}addChild(...e){throw new Error("ParticleContainer.addChild() is not available. Please use ParticleContainer.addParticle()")}removeChild(...e){throw new Error("ParticleContainer.removeChild() is not available. Please use ParticleContainer.removeParticle()")}removeChildren(e,t){throw new Error("ParticleContainer.removeChildren() is not available. Please use ParticleContainer.removeParticles()")}removeChildAt(e){throw new Error("ParticleContainer.removeChildAt() is not available. Please use ParticleContainer.removeParticleAt()")}getChildAt(e){throw new Error("ParticleContainer.getChildAt() is not available. Please use ParticleContainer.getParticleAt()")}setChildIndex(e,t){throw new Error("ParticleContainer.setChildIndex() is not available. Please use ParticleContainer.setParticleIndex()")}getChildIndex(e){throw new Error("ParticleContainer.getChildIndex() is not available. Please use ParticleContainer.getParticleIndex()")}addChildAt(e,t){throw new Error("ParticleContainer.addChildAt() is not available. Please use ParticleContainer.addParticleAt()")}swapChildren(e,t){throw new Error("ParticleContainer.swapChildren() is not available. Please use ParticleContainer.swapParticles()")}reparentChild(...e){throw new Error("ParticleContainer.reparentChild() is not available with the particle container")}reparentChildAt(e,t){throw new Error("ParticleContainer.reparentChildAt() is not available with the particle container")}};q3.defaultOptions={dynamicProperties:{vertex:false,position:true,rotation:false,uvs:false,color:false},roundPixels:false};K3=q3;});var Q3,jS,Nx,eB=f(()=>{Ai();ie();le();br();Yp();Q3=class J3 extends Ge{constructor(e){e instanceof A&&(e={texture:e});let{width:t,height:i,anchor:s,leftWidth:n,rightWidth:o,topHeight:a,bottomHeight:u,texture:l,roundPixels:c,...h}=e;super({label:"NineSliceSprite",...h}),this.renderPipeId="nineSliceSprite",this.batched=true,this._leftWidth=n??l?.defaultBorders?.left??wr.defaultOptions.leftWidth,this._topHeight=a??l?.defaultBorders?.top??wr.defaultOptions.topHeight,this._rightWidth=o??l?.defaultBorders?.right??wr.defaultOptions.rightWidth,this._bottomHeight=u??l?.defaultBorders?.bottom??wr.defaultOptions.bottomHeight,this._width=t??l.width??wr.defaultOptions.width,this._height=i??l.height??wr.defaultOptions.height,this.allowChildren=false,this.texture=l??J3.defaultOptions.texture,this.roundPixels=c??false,this._anchor=new be({_onUpdate:()=>{this.onViewUpdate();}}),s?this.anchor=s:this.texture.defaultAnchor&&(this.anchor=this.texture.defaultAnchor);}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e);}get width(){return this._width}set width(e){this._width=e,this.onViewUpdate();}get height(){return this._height}set height(e){this._height=e,this.onViewUpdate();}setSize(e,t){typeof e=="object"&&(t=e.height??e.width,e=e.width),this._width=e,this._height=t??e,this.onViewUpdate();}getSize(e){return e||(e={}),e.width=this._width,e.height=this._height,e}get leftWidth(){return this._leftWidth}set leftWidth(e){this._leftWidth=e,this.onViewUpdate();}get topHeight(){return this._topHeight}set topHeight(e){this._topHeight=e,this.onViewUpdate();}get rightWidth(){return this._rightWidth}set rightWidth(e){this._rightWidth=e,this.onViewUpdate();}get bottomHeight(){return this._bottomHeight}set bottomHeight(e){this._bottomHeight=e,this.onViewUpdate();}get texture(){return this._texture}set texture(e){e||(e=A.EMPTY);let t=this._texture;t!==e&&(t&&t.dynamic&&t.off("update",this.onViewUpdate,this),e.dynamic&&e.on("update",this.onViewUpdate,this),this._texture=e,this.onViewUpdate());}get originalWidth(){return this._texture.width}get originalHeight(){return this._texture.height}destroy(e){if(super.destroy(e),typeof e=="boolean"?e:e?.texture){let i=typeof e=="boolean"?e:e?.textureSource;this._texture.destroy(i);}this._texture=null;}updateBounds(){let e=this._bounds,t=this._anchor,i=this._width,s=this._height;e.minX=-t._x*i,e.maxX=e.minX+i,e.minY=-t._y*s,e.maxY=e.minY+s;}};Q3.defaultOptions={texture:A.EMPTY};jS=Q3,Nx=class extends jS{constructor(...e){let t=e[0];t instanceof A&&(R(G,"NineSlicePlane now uses the options object {texture, leftWidth, rightWidth, topHeight, bottomHeight}"),t={texture:t,leftWidth:e[1],topHeight:e[2],rightWidth:e[3],bottomHeight:e[4]}),R(G,"NineSlicePlane is deprecated. Use NineSliceSprite instead."),super(t);}};});function tB(r,e){return e instanceof Ve||e instanceof Pr?e:r==="html"?new Pr(e):new Ve(e)}var rB=f(()=>{tc();ci();});async function iB(r,e,t=200){let i=await e.extract.base64(r);await e.encoder.commandFinished;let s=t;console.log(`logging texture ${r.source.width}px ${r.source.height}px`);let n=["font-size: 1px;",`padding: ${s}px 300px;`,`background: url(${i}) no-repeat;`,"background-size: contain;"].join(" ");console.log("%c ",n);}var sB=f(()=>{});function qS(r,e=0,t={color:"#000000"}){r.renderGroup&&(t.color=nk[ok++]);let i="";for(let o=0;o<e;o++)i+=" ";let s=r.label;!s&&r instanceof me&&(s=`sprite:${r.texture.label}`);let n=`%c ${i}|- ${s} (worldX:${r.worldTransform.tx}, relativeRenderX:${r.relativeGroupTransform.tx}, renderX:${r.groupTransform.tx}, localX:${r.x})`;r.renderGroup&&(n+=" (RenderGroup)"),r.filters&&(n+="(*filters)"),console.log(n,`color:${t.color}; font-weight:bold;`),e++;for(let o=0;o<r.children.length;o++){let a=r.children[o];qS(a,e,{...t});}}function KS(r,e=0,t={index:0,color:"#000000"}){let i="";for(let n=0;n<e;n++)i+=" ";let s=`%c ${i}- ${t.index}: ${r.root.label} worldX:${r.worldTransform.tx}`;console.log(s,`color:${t.color}; font-weight:bold;`),e++;for(let n=0;n<r.renderGroupChildren.length;n++){let o=r.renderGroupChildren[n];KS(o,e,{...t,index:n});}}var nk,ok,nB=f(()=>{Gi();nk=["#000080","#228B22","#8B0000","#4169E1","#008080","#800000","#9400D3","#FF8C00","#556B2F","#8B008B"],ok=0;});var oB={};Wh(oB,{AbstractBitmapFont:()=>os,AbstractRenderer:()=>Lr,AbstractText:()=>Yr,AccessibilitySystem:()=>Pd,AlphaFilter:()=>Tw,AlphaMask:()=>js,AlphaMaskPipe:()=>On,AnimatedSprite:()=>ku,Application:()=>Wc,ApplicationInitHook:()=>kn,Assets:()=>ct,AssetsClass:()=>Zc,BLEND_TO_NPM:()=>Zd,BUFFER_TYPE:()=>oo,BackgroundLoader:()=>au,BackgroundSystem:()=>fm,Batch:()=>Pl,BatchGeometry:()=>Zo,BatchTextureArray:()=>Ko,BatchableGraphics:()=>li,BatchableMesh:()=>Or,BatchableSprite:()=>ar,Batcher:()=>Jd,BatcherPipe:()=>Rc,BigPool:()=>W,BindGroup:()=>Ye,BindGroupSystem:()=>Wn,BitmapFont:()=>_o,BitmapFontManager:()=>di,BitmapText:()=>Gu,BitmapTextPipe:()=>xn,BlendModeFilter:()=>q,BlendModePipe:()=>Ln,BlurFilter:()=>yh,BlurFilterPass:()=>Iu,Bounds:()=>ae,BrowserAdapter:()=>Fd,Buffer:()=>Ee,BufferImageSource:()=>ii,BufferResource:()=>Vr,BufferUsage:()=>j,CLEAR:()=>$e,Cache:()=>ne,CanvasPool:()=>_t,CanvasPoolClass:()=>Wl,CanvasSource:()=>Ke,CanvasTextMetrics:()=>kt,CanvasTextPipe:()=>dn,CanvasTextSystem:()=>gn,Circle:()=>ga,Color:()=>z,ColorBlend:()=>oc,ColorBurnBlend:()=>ac,ColorDodgeBlend:()=>uc,ColorMask:()=>qs,ColorMaskPipe:()=>Gn,ColorMatrixFilter:()=>vx,CompressedSource:()=>cr,Container:()=>K,Culler:()=>rx,CullerPlugin:()=>nh,CustomRenderPipe:()=>wn,D3D10_RESOURCE_DIMENSION:()=>jg,D3DFMT:()=>Bt,DATA_URI:()=>aC,DDS:()=>Y,DEG_TO_RAD:()=>Kh,DEPRECATED_SCALE_MODES:()=>wh,DEPRECATED_WRAP_MODES:()=>Ph,DOMAdapter:()=>L,DOMContainer:()=>kd,DOMPipe:()=>Ys,DRAW_MODES:()=>e3,DXGI_FORMAT:()=>$g,DXGI_TO_TEXTURE_FORMAT:()=>vt,DarkenBlend:()=>lc,DefaultBatcher:()=>en,DefaultShader:()=>ra,DifferenceBlend:()=>cc,DisplacementFilter:()=>Ex,DivideBlend:()=>hc,DynamicBitmapFont:()=>Jl,Ellipse:()=>xa,EventBoundary:()=>Vo,EventEmitter:()=>te,EventSystem:()=>zo,EventsTicker:()=>Zt,ExclusionBlend:()=>dc,ExtensionType:()=>m,ExtractSystem:()=>pm,FOURCC_TO_TEXTURE_FORMAT:()=>rh,FederatedContainer:()=>Id,FederatedEvent:()=>Ir,FederatedMouseEvent:()=>_r,FederatedPointerEvent:()=>ot,FederatedWheelEvent:()=>Qt,FillGradient:()=>xt,FillPattern:()=>Er,Filter:()=>rt,FilterEffect:()=>mr,FilterPipe:()=>Tn,FilterSystem:()=>Sn,FontStylePromiseCache:()=>Ba,GAUSSIAN_VALUES:()=>Du,GL_FORMATS:()=>Qa,GL_INTERNAL_FORMAT:()=>zT,GL_TARGETS:()=>Gc,GL_TYPES:()=>oe,GL_WRAP_MODES:()=>b2,GenerateTextureSystem:()=>Nn,Geometry:()=>mt,GlBackBufferSystem:()=>Xm,GlBatchAdaptor:()=>no,GlBuffer:()=>Za,GlBufferSystem:()=>ao,GlColorMaskSystem:()=>lo,GlContextSystem:()=>Vm,GlEncoderSystem:()=>co,GlGeometrySystem:()=>uo,GlGraphicsAdaptor:()=>io,GlMeshAdaptor:()=>so,GlParticleContainerAdaptor:()=>ha,GlParticleContainerPipe:()=>ln,GlProgram:()=>Ae,GlProgramData:()=>tu,GlRenderTarget:()=>Ja,GlRenderTargetAdaptor:()=>eu,GlRenderTargetSystem:()=>po,GlShaderSystem:()=>mo,GlStateSystem:()=>dg,GlStencilSystem:()=>ho,GlTexture:()=>iu,GlTextureSystem:()=>xo,GlUboSystem:()=>fo,GlUniformGroupSystem:()=>go,GlobalUniformSystem:()=>Hn,GpuBatchAdaptor:()=>Pn,GpuBlendModesToPixi:()=>lt,GpuBufferSystem:()=>Xn,GpuColorMaskSystem:()=>Yn,GpuDeviceSystem:()=>gs,GpuEncoderSystem:()=>$n,GpuGraphicsAdaptor:()=>An,GpuGraphicsContext:()=>Ul,GpuMeshAdapter:()=>Cn,GpuMipmapGenerator:()=>Ka,GpuParticleContainerAdaptor:()=>pa,GpuParticleContainerPipe:()=>cn,GpuProgram:()=>Ce,GpuReadBuffer:()=>Zw,GpuRenderTarget:()=>$a,GpuRenderTargetAdaptor:()=>ja,GpuRenderTargetSystem:()=>Jn,GpuShaderSystem:()=>eo,GpuStateSystem:()=>to,GpuStencilModesToPixi:()=>lr,GpuStencilSystem:()=>jn,GpuTextureSystem:()=>ro,GpuUboSystem:()=>Kn,GpuUniformBatchPipe:()=>Zn,Graphics:()=>ns,GraphicsContext:()=>He,GraphicsContextRenderData:()=>Ll,GraphicsContextSystem:()=>Ji,GraphicsPath:()=>ur,GraphicsPipe:()=>an,HTMLText:()=>Uu,HTMLTextPipe:()=>_n,HTMLTextRenderData:()=>as,HTMLTextStyle:()=>Pr,HTMLTextSystem:()=>us,HardLightBlend:()=>fc,HardMixBlend:()=>pc,HelloSystem:()=>ms,IGLUniformData:()=>Zm,ImageSource:()=>pt,InstructionSet:()=>Bi,KTX:()=>De,LightenBlend:()=>mc,LinearBurnBlend:()=>gc,LinearDodgeBlend:()=>xc,LinearLightBlend:()=>_c,Loader:()=>lu,LoaderParserPriority:()=>ve,LuminosityBlend:()=>bc,MSAA_QUALITY:()=>LS,MaskEffectManager:()=>ko,MaskEffectManagerClass:()=>ll,MaskFilter:()=>Ga,Matrix:()=>B,Mesh:()=>Lt,MeshGeometry:()=>bt,MeshPipe:()=>un,MeshPlane:()=>Gx,MeshRope:()=>H3,MeshSimple:()=>Lx,NOOP:()=>fl,NegationBlend:()=>yc,NineSliceGeometry:()=>wr,NineSlicePlane:()=>Nx,NineSliceSprite:()=>jS,NineSliceSpritePipe:()=>vn,NoiseFilter:()=>Mw,ObservablePoint:()=>be,OverlayBlend:()=>vc,PI_2:()=>jh,Particle:()=>$3,ParticleBuffer:()=>da,ParticleContainer:()=>K3,ParticleContainerPipe:()=>es,ParticleShader:()=>fa,PerspectiveMesh:()=>k3,PerspectivePlaneGeometry:()=>Nu,PinLightBlend:()=>Tc,PipelineSystem:()=>Qn,PlaneGeometry:()=>cs,Point:()=>Z,Polygon:()=>rs,Pool:()=>ti,PoolGroupClass:()=>al,PrepareBase:()=>Px,PrepareQueue:()=>Ou,PrepareSystem:()=>Ch,PrepareUpload:()=>Lu,QuadGeometry:()=>Da,RAD_TO_DEG:()=>qh,Rectangle:()=>X,RenderContainer:()=>Ix,RenderGroup:()=>Lo,RenderGroupPipe:()=>Rn,RenderGroupSystem:()=>Dn,RenderLayer:()=>P3,RenderLayerClass:()=>NS,RenderTarget:()=>zn,RenderTargetSystem:()=>bs,RenderTexture:()=>Ua,RenderableGCSystem:()=>_m,RendererInitHook:()=>Fn,RendererType:()=>Pe,ResizePlugin:()=>zs,Resolver:()=>ut,RopeGeometry:()=>Ux,RoundedRectangle:()=>_a,SCALE_MODES:()=>n3,STENCIL_MODES:()=>ye,SVGParser:()=>fp,SaturationBlend:()=>Sc,SchedulerSystem:()=>Vn,ScissorMask:()=>Mx,SdfShader:()=>Ca,Shader:()=>Re,ShaderStage:()=>Yi,ShapePath:()=>Ta,SharedRenderPipes:()=>Va,SharedSystems:()=>Ha,SoftLightBlend:()=>Ec,Sprite:()=>me,SpritePipe:()=>In,Spritesheet:()=>Tl,State:()=>Be,StencilMask:()=>Ks,StencilMaskPipe:()=>Un,SubtractBlend:()=>Ac,SystemRunner:()=>fs,TEXTURE_FORMAT_BLOCK_SIZE:()=>qg,Text:()=>hr,TextStyle:()=>Ve,Texture:()=>A,TextureGCSystem:()=>bm,TextureMatrix:()=>Mi,TexturePool:()=>he,TexturePoolClass:()=>pl,TextureSource:()=>re,TextureStyle:()=>Uo,TextureUvs:()=>Dx,Ticker:()=>de,TickerListener:()=>Ii,TickerPlugin:()=>Xs,TilingSprite:()=>Bx,TilingSpritePipe:()=>yn,TilingSpriteShader:()=>Ma,Transform:()=>Fu,Triangle:()=>Cx,UNIFORM_TO_ARRAY_SETTERS:()=>lg,UNIFORM_TO_SINGLE_SETTERS:()=>ug,UNIFORM_TYPES_MAP:()=>Tf,UNIFORM_TYPES_VALUES:()=>Il,UPDATE_BLEND:()=>No,UPDATE_COLOR:()=>Vs,UPDATE_PRIORITY:()=>wt,UPDATE_TRANSFORM:()=>Y1,UPDATE_VISIBLE:()=>Di,UboBatch:()=>Xa,UboSystem:()=>xs,UniformGroup:()=>J,VERSION:()=>ps,VideoSource:()=>Ni,ViewContainer:()=>Ge,ViewSystem:()=>Tm,ViewableBuffer:()=>Jt,VividLightBlend:()=>Cc,WGSL_ALIGN_SIZE_DATA:()=>qn,WGSL_TO_STD40_SIZE:()=>Uc,WRAP_MODES:()=>s3,WebGLRenderer:()=>zc,WebGPURenderer:()=>Oc,WebWorkerAdapter:()=>_w,WorkerManager:()=>Kc,_getGlobalBounds:()=>ud,accessibilityTarget:()=>wd,addBits:()=>Bl,addMaskBounds:()=>Ui,addMaskLocalBounds:()=>Li,addProgramDefines:()=>sf,alphaFrag:()=>fx,alphaWgsl:()=>bh,applyMatrix:()=>zp,applyProjectiveTransformationToPlane:()=>kx,applyStyleParams:()=>Vc,assignWithIgnore:()=>Hs,autoDetectEnvironment:()=>rC,autoDetectRenderer:()=>Tg,autoDetectSource:()=>_E,basisTranscoderUrls:()=>bu,bgr2rgb:()=>ri,bitmapFontCachePlugin:()=>Sg,bitmapFontTextParser:()=>ou,bitmapFontXMLParser:()=>Xc,bitmapFontXMLStringParser:()=>Yc,blendTemplateFrag:()=>jp,blendTemplateVert:()=>qp,blendTemplateWgsl:()=>Kp,blockDataMap:()=>Fc,blurTemplateWgsl:()=>_x,boundsPool:()=>Pt,browserExt:()=>Y0,buildAdaptiveBezier:()=>ya,buildAdaptiveQuadratic:()=>ip,buildArc:()=>va,buildArcTo:()=>np,buildArcToSvg:()=>op,buildCircle:()=>nr,buildContextBatches:()=>Xf,buildEllipse:()=>wf,buildGeometryFromPath:()=>S3,buildLine:()=>kf,buildPixelLine:()=>Ff,buildPolygon:()=>aa,buildRectangle:()=>ua,buildRoundedRectangle:()=>Bf,buildSimpleUvs:()=>sa,buildTriangle:()=>la,buildUvs:()=>ia,cacheAsTextureMixin:()=>ed,cacheTextureArray:()=>Ag,calculateProjection:()=>Fm,checkChildrenDidChange:()=>hl,checkDataUrl:()=>Ft,checkExtension:()=>Me,checkMaxIfStatementsInShader:()=>jd,childrenHelperMixin:()=>rd,cleanArray:()=>xm,cleanHash:()=>gm,clearList:()=>Mn,closePointEps:()=>Mf,collectAllRenderables:()=>m3,collectRenderablesMixin:()=>id,color32BitToUniform:()=>or,colorBit:()=>ji,colorBitGl:()=>qi,colorMatrixFilterFrag:()=>yx,colorMatrixFilterWgsl:()=>vh,colorToUniform:()=>KE,compareModeToGlCompare:()=>_g,compileHighShader:()=>pf,compileHighShaderGl:()=>mf,compileHighShaderGlProgram:()=>tr,compileHighShaderGpuProgram:()=>er,compileHooks:()=>Rl,compileInputs:()=>Ml,compileOutputs:()=>ff,compileShader:()=>Lc,compute2DProjection:()=>Ox,convertFormatIfRequired:()=>hP,convertToList:()=>at,copySearchParams:()=>$s,createIdFromString:()=>Sr,createIndicesForQuads:()=>Vl,createLevelBuffers:()=>ZC,createLevelBuffersFromKTX:()=>fP,createStringVariations:()=>Od,createTexture:()=>yt,createUboElementsSTD40:()=>Ym,createUboElementsWGSL:()=>Am,createUboSyncFunction:()=>za,createUboSyncFunctionSTD40:()=>qm,createUboSyncFunctionWGSL:()=>Dm,crossOrigin:()=>MT,cullingMixin:()=>$h,curveEps:()=>Df,defaultFilterVert:()=>As,defaultValue:()=>ru,definedProps:()=>et,deprecation:()=>R,detectAvif:()=>Pg,detectBasis:()=>WC,detectCompressed:()=>yP,detectDefaults:()=>wg,detectMp4:()=>Bg,detectOgv:()=>Rg,detectVideoAlphaMode:()=>Yo,detectWebm:()=>Mg,detectWebp:()=>Dg,determineCrossOrigin:()=>IT,displacementFrag:()=>Tx,displacementVert:()=>Sx,displacementWgsl:()=>Th,earcut:()=>aB.default,effectsMixin:()=>sd,ensureAttributes:()=>Ya,ensureIsBuffer:()=>wl,ensurePrecision:()=>nf,ensureTextOptions:()=>Cs,ensureTextStyle:()=>tB,executeInstructions:()=>Bn,extensions:()=>F,extractAttributesFromGlProgram:()=>rg,extractAttributesFromGpuProgram:()=>lf,extractFontFamilies:()=>Dp,extractStructAndGroups:()=>Jo,extractSvgUrlId:()=>ql,fastCopy:()=>Js,findHooksRx:()=>Lb,findMixin:()=>nd,fontStringFromTextStyle:()=>hi,formatShader:()=>Ww,fragmentGPUTemplate:()=>xf,fragmentGlTemplate:()=>bf,generateArraySyncSTD40:()=>jm,generateArraySyncWGSL:()=>Mm,generateBlurFragSource:()=>mx,generateBlurGlProgram:()=>xx,generateBlurProgram:()=>bx,generateBlurVertSource:()=>gx,generateGPULayout:()=>Nw,generateGpuLayoutGroups:()=>cf,generateLayout:()=>Vw,generateLayoutHash:()=>hf,generateParticleUpdateFunction:()=>Yf,generateProgram:()=>og,generateShaderSyncCode:()=>Km,generateTextStyleKey:()=>Sa,generateTextureBatchBit:()=>Ki,generateTextureBatchBitGl:()=>Zi,generateTextureMatrix:()=>Wf,generateUID:()=>u3,generateUniformsSync:()=>cg,getAdjustedBlendModeBlend:()=>vr,getAttributeInfoFromFormat:()=>gt,getBatchSamplersUniformGroup:()=>Qi,getBitmapTextLayout:()=>wa,getCanvasBoundingBox:()=>Zf,getCanvasFillStyle:()=>ss,getCanvasTexture:()=>Na,getDefaultUniformValue:()=>Sf,getFastGlobalBounds:()=>d3,getFastGlobalBoundsMixin:()=>ad,getFontCss:()=>kp,getFontFamilyName:()=>ET,getGeometryBounds:()=>ef,getGlTypeFromFormat:()=>Wm,getGlobalBounds:()=>Dr,getGlobalMixin:()=>hd,getGlobalRenderableBounds:()=>$p,getLocalBounds:()=>wi,getMatrixRelativeToParent:()=>Hd,getMaxFragmentPrecision:()=>rf,getMaxTexturesPerBatch:()=>Dt,getOrientationOfPoints:()=>If,getParent:()=>S_,getPo2TextureFromSource:()=>Aa,getResolutionOfUrl:()=>Ts,getSVGUrl:()=>Fp,getSupportedCompressedTextureFormats:()=>gu,getSupportedGPUCompressedTextureFormats:()=>Jc,getSupportedGlCompressedTextureFormats:()=>Qc,getSupportedTextureFormats:()=>zr,getTemporaryCanvasFromImage:()=>Op,getTestContext:()=>$o,getTextureBatchBindGroup:()=>Vi,getTextureDefaultMatrix:()=>W3,getTextureFormatFromKTXTexture:()=>mP,getUboData:()=>ig,getUniformData:()=>sg,getUrlExtension:()=>eb,glFormatToGPUFormat:()=>Jg,glUploadBufferImageResource:()=>fg,glUploadCompressedTextureResource:()=>pg,glUploadImageResource:()=>su,glUploadVideoResource:()=>gg,globalUniformsBit:()=>yf,globalUniformsBitGl:()=>vf,globalUniformsUBOBitGl:()=>ME,gpuFormatToBasisTranscoderFormat:()=>JC,gpuFormatToKTXBasisTranscoderFormat:()=>xP,gpuUploadBufferImageResource:()=>Um,gpuUploadCompressedTextureResource:()=>Lm,gpuUploadImageResource:()=>qa,gpuUploadVideoResource:()=>Hm,groupD8:()=>ee,hasCachedCanvasTexture:()=>gC,hslWgsl:()=>Iw,hslgl:()=>hs,hslgpu:()=>ds,injectBits:()=>Dl,insertVersion:()=>of,isMobile:()=>Ad,isPow2:()=>dl,isRenderingToScreen:()=>Om,isSafari:()=>Pp,isSingleItem:()=>ni,isWebGLSupported:()=>Nr,isWebGPUSupported:()=>Hr,ktxTranscoderUrls:()=>vu,loadBasis:()=>qC,loadBasisOnWorker:()=>Yg,loadBitmapFont:()=>Eg,loadDDS:()=>tP,loadEnvironmentExtensions:()=>Pc,loadFontAsBase64:()=>Ip,loadFontCSS:()=>rc,loadImageBitmap:()=>RT,loadJson:()=>Ig,loadKTX:()=>iP,loadKTX2:()=>uP,loadKTX2onWorker:()=>Qg,loadSVGImage:()=>Gp,loadSvg:()=>Og,loadTextures:()=>fu,loadTxt:()=>kg,loadVideoTextures:()=>Ug,loadWebFont:()=>Fg,localUniformBit:()=>pi,localUniformBitGl:()=>ls,localUniformBitGroup2:()=>Lp,localUniformMSDFBit:()=>bp,localUniformMSDFBitGl:()=>yp,log2:()=>U1,logDebugTexture:()=>iB,logProgramError:()=>ng,logRenderGroupScene:()=>KS,logScene:()=>qS,mSDFBit:()=>vp,mSDFBitGl:()=>Tp,mapFormatToGlFormat:()=>bg,mapFormatToGlInternalFormat:()=>yg,mapFormatToGlType:()=>vg,mapGlToVertexFormat:()=>eg,mapSize:()=>qw,mapType:()=>Nc,mapWebGLBlendModesToPixi:()=>hg,maskFrag:()=>hm,maskVert:()=>dm,maskWgsl:()=>Mc,matrixPool:()=>Oe,measureHtmlText:()=>Ra,measureMixin:()=>fd,migrateFragmentFromV7toV8:()=>$w,mipmapScaleModeToGlFilter:()=>xg,mixHexColors:()=>x3,multiplyColors:()=>Pi,multiplyHexColors:()=>Oo,nextPow2:()=>gr,noiseFrag:()=>Ax,noiseWgsl:()=>Sh,nonCompressedFormats:()=>UT,normalizeExtensionPriority:()=>Mo,nssvg:()=>wp,nsxhtml:()=>Bp,onRenderMixin:()=>pd,parseAttribute:()=>dp,parseDDS:()=>Kg,parseFunctionBody:()=>c3,parseKTX:()=>Zg,parseSVGDefinitions:()=>cp,parseSVGFloatAttribute:()=>we,parseSVGPath:()=>Qf,parseSVGStyle:()=>Kl,particleData:()=>Bh,particlesFrag:()=>$f,particlesVert:()=>jf,particlesWgsl:()=>zl,path:()=>Te,pointInTriangle:()=>Eh,preloadVideo:()=>DT,removeItems:()=>Io,removeStructAndGroupDuplicates:()=>df,resetUids:()=>D1,resolveCharacters:()=>Pa,resolveCompressedTextureUrl:()=>bP,resolveJsonUrl:()=>Ng,resolveTextureUrl:()=>pu,resourceToTexture:()=>cb,roundPixelsBit:()=>rr,roundPixelsBitGl:()=>ir,roundedShapeArc:()=>ap,roundedShapeQuadraticCurve:()=>up,sayHello:()=>mm,scaleModeToGlFilter:()=>Hc,setBasisTranscoderPath:()=>$C,setKTXTranscoderPath:()=>oP,setPositions:()=>Vp,setProgramName:()=>af,setUvs:()=>Wp,shapeBuilders:()=>ca,sortMixin:()=>md,spritesheetAsset:()=>Ud,squaredDistanceToLineSegment:()=>ts,stripVersion:()=>uf,styleAttributes:()=>hp,testImageFormat:()=>uu,testVideoFormat:()=>ys,textStyleToCSS:()=>Mp,textureBit:()=>tm,textureBitGl:()=>rm,textureFrom:()=>hb,tilingBit:()=>Np,tilingBitGl:()=>Hp,toFillStyle:()=>Ar,toLocalGlobalMixin:()=>gd,toStrokeStyle:()=>is,transformVertices:()=>tn,triangulateWithHoles:()=>oa,uboSyncFunctionsSTD40:()=>Ic,uboSyncFunctionsWGSL:()=>Bm,uid:()=>Q,uniformParsers:()=>Br,unpremultiplyAlpha:()=>wC,unsafeEvalSupported:()=>Ia,updateLocalTransform:()=>b3,updateQuadBounds:()=>Xo,updateRenderGroupTransform:()=>nv,updateRenderGroupTransforms:()=>Bc,updateTextBounds:()=>hn,updateTransformAndChildren:()=>am,updateTransformBackwards:()=>Fo,updateWorldTransform:()=>v3,v8_0_0:()=>G,v8_3_4:()=>Qh,validFormats:()=>Tu,validateRenderables:()=>um,vertexGPUTemplate:()=>gf,vertexGlTemplate:()=>_f,viewportFromFrame:()=>r3,vkFormatToGPUFormat:()=>ex,warn:()=>D,webworkerExt:()=>$0,wrapModeToGlAddress:()=>nu});var aB,_e=f(()=>{RA();DA();S();S();Xd();Ld();N_();H_();FA();OA();GA();UA();LA();NA();HA();VA();zA();WA();XA();YA();$A();jA();qA();KA();ZA();QA();JA();eC();tC();OC();V_();W_();zC();fT();kr();pT();mT();gT();xT();_T();bT();yT();Cg();$c();vT();Wt();TT();ST();AT();CT();Gg();kT();mi();BT();FT();Lg();Oi();vs();jt();Wo();Gd();J_();yl();Xe();XC();KC();QC();eP();LT();NT();HT();rP();VT();sP();XT();WT();lP();dP();pP();gP();qT();_P();YT();KT();$T();vP();ZT();JT();TP();f_();hE();Z_();ge();J0();Q_();bw();$_();Dd();Bd();ml();K_();xl();Rd();Md();q0();K0();Z0();kw();mS();gS();yS();SS();ES();_h();AS();CS();PS();wS();BS();dv();fv();pv();Fe();sc();nc();Sw();Cw();TS();px();xS();bS();_S();vS();Pw();ww();Dw();Ur();ul();V0();W0();mv();yd();se();Zh();Go();Jf();Ai();Ct();RS();Ny();Hy();Vy();Le();zy();Fw();MS();FS();Lw();US();f2();fb();Hi();Hw();zw();Al();rv();xb();hv();yb();mb();Ef();Qb();ai();Xb();Ub();Nb();Hb();Vb();Xw();zb();Yb();ea();ta();$b();bn();ui();im();ib();xv();sb();_v();__();Yw();nb();bv();Sl();El();oT();p2();m2();g2();En();_2();v2();y2();S2();E2();A2();R2();C2();B2();M2();D2();I2();kl();It();k2();V2();X2();jw();F2();Qm();Im();G2();H2();Tb();$d();U2();L2();N2();Kw();tg();Sb();Eb();Ab();Cb();Pb();$m();w2();P2();W2();z2();j2();Y2();zm();q2();sT();K2();Z2();mg();Q2();eT();OT();tT();rT();iT();J2();BC();nT();Lv();Nv();Qw();jv();Hv();Vv();zv();Wv();$v();qv();Kv();Zv();Jv();e2();t2();oi();Xt();r2();Cm();Yv();Mb();Db();Xv();kb();Fb();Ob();i2();s2();km();l2();n2();o2();Nm();a2();GT();u2();c2();vv();Tv();Fr();kc();Tr();Kd();Av();Pv();t3();Wi();Af();_b();Xi();bb();Cf();xd();wv();Qv();ym();Gm();i3();Bv();Ib();sr();Kb();Em();Ne();wm();Zb();Rm();Pm();Mv();zi();qo();$t();ka();Sm();Qp();fn();o3();kv();Cv();vd();Zs();mu();Qs();tt();Wd();ie();Ov();Td();xr();_d();a3();l3();vm();Wg();xu();db();Qo();h3();Uv();Yt();wy();By();Ry();nt();f3();Os();cl();z0();Ci();m_();g_();x_();b_();y_();v_();dd();A_();C_();P_();w_();Mt();iv();p3();M_();sv();uv();Sd();E_();om();g3();Ri();nm();_3();cd();ld();y3();ov();T3();av();h2();on();ev();Pf();rp();$y();sp();jy();Zy();Rf();ey();ty();Hf();Vf();zf();UE();nn();Xl();_p();mn();Nl();yy();jl();Qy();Jy();e0();lp();Ly();r0();i0();t0();cy();E3();pp();ly();Jb();Nf();w3();F3();zS();HS();VS();O3();ic();V3();z3();WS();d2();tv();Hl();X3();yo();fi();Ty();Ey();Iy();Dy();ky();j3();Py();Z3();qf();YS();My();Ay();Cy();DS();Yp();eB();N0();R0();I0();kS();U0();O0();k0();F0();G0();ma();Gi();lv();Sp();lT();cT();hT();dT();uT();ec();OS();g0();p0();Ap();Ep();GS();_0();Rp();tc();w0();v0();E0();A0();C0();T0();S0();P0();Up();y0();Ah();Ql();Oy();a0();Zl();xp();f0();l0();c0();Rx();ci();rB();mp();gp();Kf();br();tb();rb();Ws();ki();z_();Vd();U_();b0();Fa();Oa();Zp();Gy();lm();dt();Dv();td();Je();Nd();qd();cm();le();sB();nB();ue();R_();IS();jc();Fi();Jh();ft();Rv();aB=Ro(oy());F.add(Y0,$0);});var xB=fr((Zx,gB)=>{(function(r,e){typeof Zx=="object"?gB.exports=Zx=e():typeof define=="function"&&define.amd?define([],e):r.CryptoJS=e();})(Zx,function(){var r=r||function(e,t){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof global<"u"&&global.crypto&&(i=global.crypto),!i&&typeof n_=="function")try{i=n_("crypto");}catch{}var s=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function x(){}return function(y){var T;return x.prototype=y,T=new x,x.prototype=null,T}}(),o={},a=o.lib={},u=a.Base=function(){return {extend:function(x){var y=n(this);return x&&y.mixIn(x),(!y.hasOwnProperty("init")||this.init===y.init)&&(y.init=function(){y.$super.init.apply(this,arguments);}),y.init.prototype=y,y.$super=this,y},create:function(){var x=this.extend();return x.init.apply(x,arguments),x},init:function(){},mixIn:function(x){for(var y in x)x.hasOwnProperty(y)&&(this[y]=x[y]);x.hasOwnProperty("toString")&&(this.toString=x.toString);},clone:function(){return this.init.prototype.extend(this)}}}(),l=a.WordArray=u.extend({init:function(x,y){x=this.words=x||[],y!=t?this.sigBytes=y:this.sigBytes=x.length*4;},toString:function(x){return (x||h).stringify(this)},concat:function(x){var y=this.words,T=x.words,v=this.sigBytes,w=x.sigBytes;if(this.clamp(),v%4)for(var E=0;E<w;E++){var C=T[E>>>2]>>>24-E%4*8&255;y[v+E>>>2]|=C<<24-(v+E)%4*8;}else for(var I=0;I<w;I+=4)y[v+I>>>2]=T[I>>>2];return this.sigBytes+=w,this},clamp:function(){var x=this.words,y=this.sigBytes;x[y>>>2]&=4294967295<<32-y%4*8,x.length=e.ceil(y/4);},clone:function(){var x=u.clone.call(this);return x.words=this.words.slice(0),x},random:function(x){for(var y=[],T=0;T<x;T+=4)y.push(s());return new l.init(y,x)}}),c=o.enc={},h=c.Hex={stringify:function(x){for(var y=x.words,T=x.sigBytes,v=[],w=0;w<T;w++){var E=y[w>>>2]>>>24-w%4*8&255;v.push((E>>>4).toString(16)),v.push((E&15).toString(16));}return v.join("")},parse:function(x){for(var y=x.length,T=[],v=0;v<y;v+=2)T[v>>>3]|=parseInt(x.substr(v,2),16)<<24-v%8*4;return new l.init(T,y/2)}},d=c.Latin1={stringify:function(x){for(var y=x.words,T=x.sigBytes,v=[],w=0;w<T;w++){var E=y[w>>>2]>>>24-w%4*8&255;v.push(String.fromCharCode(E));}return v.join("")},parse:function(x){for(var y=x.length,T=[],v=0;v<y;v++)T[v>>>2]|=(x.charCodeAt(v)&255)<<24-v%4*8;return new l.init(T,y)}},p=c.Utf8={stringify:function(x){try{return decodeURIComponent(escape(d.stringify(x)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(x){return d.parse(unescape(encodeURIComponent(x)))}},g=a.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new l.init,this._nDataBytes=0;},_append:function(x){typeof x=="string"&&(x=p.parse(x)),this._data.concat(x),this._nDataBytes+=x.sigBytes;},_process:function(x){var y,T=this._data,v=T.words,w=T.sigBytes,E=this.blockSize,C=E*4,I=w/C;x?I=e.ceil(I):I=e.max((I|0)-this._minBufferSize,0);var k=I*E,O=e.min(k*4,w);if(k){for(var M=0;M<k;M+=E)this._doProcessBlock(v,M);y=v.splice(0,k),T.sigBytes-=O;}return new l.init(y,O)},clone:function(){var x=u.clone.call(this);return x._data=this._data.clone(),x},_minBufferSize:0});a.Hasher=g.extend({cfg:u.extend(),init:function(x){this.cfg=this.cfg.extend(x),this.reset();},reset:function(){g.reset.call(this),this._doReset();},update:function(x){return this._append(x),this._process(),this},finalize:function(x){x&&this._append(x);var y=this._doFinalize();return y},blockSize:512/32,_createHelper:function(x){return function(y,T){return new x.init(T).finalize(y)}},_createHmacHelper:function(x){return function(y,T){return new _.HMAC.init(x,T).finalize(y)}}});var _=o.algo={};return o}(Math);return r});});var bB=fr((Qx,_B)=>{(function(r,e){typeof Qx=="object"?_B.exports=Qx=e(xB()):typeof define=="function"&&define.amd?define(["./core"],e):e(r.CryptoJS);})(Qx,function(r){return function(){var e=r,t=e.lib,i=t.WordArray,s=t.Hasher,n=e.algo,o=[],a=n.SHA1=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(u,l){for(var c=this._hash.words,h=c[0],d=c[1],p=c[2],g=c[3],b=c[4],_=0;_<80;_++){if(_<16)o[_]=u[l+_]|0;else {var x=o[_-3]^o[_-8]^o[_-14]^o[_-16];o[_]=x<<1|x>>>31;}var y=(h<<5|h>>>27)+b+o[_];_<20?y+=(d&p|~d&g)+1518500249:_<40?y+=(d^p^g)+1859775393:_<60?y+=(d&p|d&g|p&g)-1894007588:y+=(d^p^g)-899497514,b=g,g=p,p=d<<30|d>>>2,d=h,h=y;}c[0]=c[0]+h|0,c[1]=c[1]+d|0,c[2]=c[2]+p|0,c[3]=c[3]+g|0,c[4]=c[4]+b|0;},_doFinalize:function(){var u=this._data,l=u.words,c=this._nDataBytes*8,h=u.sigBytes*8;return l[h>>>5]|=128<<24-h%32,l[(h+64>>>9<<4)+14]=Math.floor(c/4294967296),l[(h+64>>>9<<4)+15]=c,u.sigBytes=l.length*4,this._process(),this._hash},clone:function(){var u=s.clone.call(this);return u._hash=this._hash.clone(),u}});e.SHA1=s._createHelper(a),e.HmacSHA1=s._createHmacHelper(a);}(),r.SHA1});});_e();var $r={};Wh($r,{DistortionFilter:()=>Hx,EqualizerFilter:()=>dr,Filter:()=>Ze,MonoFilter:()=>Vx,ReverbFilter:()=>zx,StereoFilter:()=>Wx,StreamFilter:()=>Xx,TelephoneFilter:()=>Yx});var uB;function lB(r){return uB=r,r}function fe(){return uB}var Ze=class{constructor(e,t){this.init(e,t);}init(e,t){this.destination=e,this.source=t||e;}connect(e){this.source?.connect(e);}disconnect(){this.source?.disconnect();}destroy(){this.disconnect(),this.destination=null,this.source=null;}};var Hx=class extends Ze{constructor(e=0){let t;if(!fe().useLegacy){let{audioContext:i}=fe().context;t=i.createWaveShaper();}super(t),this._distortion=t,this.amount=e;}set amount(e){if(this._amount=e,fe().useLegacy)return;let t=e*1e3,i=44100,s=new Float32Array(i),n=Math.PI/180,o=0,a;for(;o<i;++o)a=o*2/i-1,s[o]=(3+t)*a*20*n/(Math.PI+t*Math.abs(a));this._distortion.curve=s,this._distortion.oversample="4x";}get amount(){return this._amount}destroy(){this._distortion=null,super.destroy();}};var je=class{static setParamValue(e,t){if(e.setValueAtTime){let i=fe().context;e.setValueAtTime(t,i.audioContext.currentTime);}else e.value=t;return t}};var pe=class extends Ze{constructor(r=0,e=0,t=0,i=0,s=0,n=0,o=0,a=0,u=0,l=0){let c=[],h=[{f:pe.F32,type:"lowshelf",gain:r},{f:pe.F64,type:"peaking",gain:e},{f:pe.F125,type:"peaking",gain:t},{f:pe.F250,type:"peaking",gain:i},{f:pe.F500,type:"peaking",gain:s},{f:pe.F1K,type:"peaking",gain:n},{f:pe.F2K,type:"peaking",gain:o},{f:pe.F4K,type:"peaking",gain:a},{f:pe.F8K,type:"peaking",gain:u},{f:pe.F16K,type:"highshelf",gain:l}];fe().useLegacy||(c=h.map(d=>{let p=fe().context.audioContext.createBiquadFilter();return p.type=d.type,je.setParamValue(p.Q,1),p.frequency.value=d.f,je.setParamValue(p.gain,d.gain),p})),super(c[0],c[c.length-1]),this.bands=c,this.bandsMap={};for(let d=0;d<this.bands.length;d++){let p=this.bands[d];d>0&&this.bands[d-1].connect(p),this.bandsMap[p.frequency.value]=p;}}setGain(r,e=0){if(!this.bandsMap[r])throw new Error(`No band found for frequency ${r}`);je.setParamValue(this.bandsMap[r].gain,e);}getGain(r){if(!this.bandsMap[r])throw new Error(`No band found for frequency ${r}`);return this.bandsMap[r].gain.value}set f32(r){this.setGain(pe.F32,r);}get f32(){return this.getGain(pe.F32)}set f64(r){this.setGain(pe.F64,r);}get f64(){return this.getGain(pe.F64)}set f125(r){this.setGain(pe.F125,r);}get f125(){return this.getGain(pe.F125)}set f250(r){this.setGain(pe.F250,r);}get f250(){return this.getGain(pe.F250)}set f500(r){this.setGain(pe.F500,r);}get f500(){return this.getGain(pe.F500)}set f1k(r){this.setGain(pe.F1K,r);}get f1k(){return this.getGain(pe.F1K)}set f2k(r){this.setGain(pe.F2K,r);}get f2k(){return this.getGain(pe.F2K)}set f4k(r){this.setGain(pe.F4K,r);}get f4k(){return this.getGain(pe.F4K)}set f8k(r){this.setGain(pe.F8K,r);}get f8k(){return this.getGain(pe.F8K)}set f16k(r){this.setGain(pe.F16K,r);}get f16k(){return this.getGain(pe.F16K)}reset(){this.bands.forEach(r=>{je.setParamValue(r.gain,0);});}destroy(){this.bands.forEach(r=>{r.disconnect();}),this.bands=null,this.bandsMap=null;}},dr=pe;dr.F32=32;dr.F64=64;dr.F125=125;dr.F250=250;dr.F500=500;dr.F1K=1e3;dr.F2K=2e3;dr.F4K=4e3;dr.F8K=8e3;dr.F16K=16e3;var Vx=class extends Ze{constructor(){let e,t;if(!fe().useLegacy){let{audioContext:i}=fe().context;t=i.createChannelSplitter(),e=i.createChannelMerger(),e.connect(t);}super(e,t),this._merger=e;}destroy(){this._merger?.disconnect(),this._merger=null,super.destroy();}};var zx=class extends Ze{constructor(e=3,t=2,i=false){super(null),this._seconds=this._clamp(e,1,50),this._decay=this._clamp(t,0,100),this._reverse=i,this._rebuild();}_clamp(e,t,i){return Math.min(i,Math.max(t,e))}get seconds(){return this._seconds}set seconds(e){this._seconds=this._clamp(e,1,50),this._rebuild();}get decay(){return this._decay}set decay(e){this._decay=this._clamp(e,0,100),this._rebuild();}get reverse(){return this._reverse}set reverse(e){this._reverse=e,this._rebuild();}_rebuild(){if(fe().useLegacy)return;let{audioContext:e}=fe().context,t=e.sampleRate,i=t*this._seconds,s=e.createBuffer(2,i,t),n=s.getChannelData(0),o=s.getChannelData(1),a;for(let l=0;l<i;l++)a=this._reverse?i-l:l,n[l]=(Math.random()*2-1)*Math.pow(1-a/i,this._decay),o[l]=(Math.random()*2-1)*Math.pow(1-a/i,this._decay);let u=e.createConvolver();u.buffer=s,this.init(u);}};var Wx=class extends Ze{constructor(e=0){let t,i,s;if(!fe().useLegacy){let{audioContext:n}=fe().context;n.createStereoPanner?(t=n.createStereoPanner(),s=t):(i=n.createPanner(),i.panningModel="equalpower",s=i);}super(s),this._stereo=t,this._panner=i,this.pan=e;}set pan(e){this._pan=e,this._stereo?je.setParamValue(this._stereo.pan,e):this._panner&&this._panner.setPosition(e,0,1-Math.abs(e));}get pan(){return this._pan}destroy(){super.destroy(),this._stereo=null,this._panner=null;}};var Xx=class extends Ze{constructor(){let e,t;if(!fe().useLegacy){let{audioContext:i}=fe().context;e=i.createMediaStreamDestination(),t=i.createMediaStreamSource(e.stream);}super(e,t),this._stream=e?.stream;}get stream(){return this._stream}destroy(){this._stream=null,super.destroy();}};var Yx=class extends Ze{constructor(){let e,t;if(!fe().useLegacy){let{audioContext:i}=fe().context,s=i.createBiquadFilter(),n=i.createBiquadFilter(),o=i.createBiquadFilter(),a=i.createBiquadFilter();s.type="lowpass",je.setParamValue(s.frequency,2e3),n.type="lowpass",je.setParamValue(n.frequency,2e3),o.type="highpass",je.setParamValue(o.frequency,500),a.type="highpass",je.setParamValue(a.frequency,500),s.connect(n),n.connect(o),o.connect(a),e=s,t=a;}super(e,t);}};_e();var Rh=class extends te{constructor(){super(...arguments),this.speed=1,this.muted=false,this.volume=1,this.paused=false;}refresh(){this.emit("refresh");}refreshPaused(){this.emit("refreshPaused");}get filters(){return console.warn("HTML Audio does not support filters"),null}set filters(e){console.warn("HTML Audio does not support filters");}get audioContext(){return console.warn("HTML Audio does not support audioContext"),null}toggleMute(){return this.muted=!this.muted,this.refresh(),this.muted}togglePause(){return this.paused=!this.paused,this.refreshPaused(),this.paused}destroy(){this.removeAllListeners();}};_e();var ak=0,ZS=class extends te{constructor(r){super(),this.id=ak++,this.init(r);}set(r,e){if(this[r]===void 0)throw new Error(`Property with name ${r} does not exist.`);switch(r){case "speed":this.speed=e;break;case "volume":this.volume=e;break;case "paused":this.paused=e;break;case "loop":this.loop=e;break;case "muted":this.muted=e;break}return this}get progress(){let{currentTime:r}=this._source;return r/this._duration}get paused(){return this._paused}set paused(r){this._paused=r,this.refreshPaused();}_onPlay(){this._playing=true;}_onPause(){this._playing=false;}init(r){this._playing=false,this._duration=r.source.duration;let e=this._source=r.source.cloneNode(false);e.src=r.parent.url,e.onplay=this._onPlay.bind(this),e.onpause=this._onPause.bind(this),r.context.on("refresh",this.refresh,this),r.context.on("refreshPaused",this.refreshPaused,this),this._media=r;}_internalStop(){this._source&&this._playing&&(this._source.onended=null,this._source.pause());}stop(){this._internalStop(),this._source&&this.emit("stop");}get speed(){return this._speed}set speed(r){this._speed=r,this.refresh();}get volume(){return this._volume}set volume(r){this._volume=r,this.refresh();}get loop(){return this._loop}set loop(r){this._loop=r,this.refresh();}get muted(){return this._muted}set muted(r){this._muted=r,this.refresh();}get filters(){return console.warn("HTML Audio does not support filters"),null}set filters(r){console.warn("HTML Audio does not support filters");}refresh(){let r=this._media.context,e=this._media.parent;this._source.loop=this._loop||e.loop;let t=r.volume*(r.muted?0:1),i=e.volume*(e.muted?0:1),s=this._volume*(this._muted?0:1);this._source.volume=s*t*i,this._source.playbackRate=this._speed*r.speed*e.speed;}refreshPaused(){let r=this._media.context,e=this._media.parent,t=this._paused||e.paused||r.paused;t!==this._pausedReal&&(this._pausedReal=t,t?(this._internalStop(),this.emit("paused")):(this.emit("resumed"),this.play({start:this._source.currentTime,end:this._end,volume:this._volume,speed:this._speed,loop:this._loop})),this.emit("pause",t));}play(r){let{start:e,end:t,speed:i,loop:s,volume:n,muted:o}=r;t&&console.assert(t>e,"End time is before start time"),this._speed=i,this._volume=n,this._loop=!!s,this._muted=o,this.refresh(),this.loop&&t!==null&&(console.warn('Looping not support when specifying an "end" time'),this.loop=false),this._start=e,this._end=t||this._duration,this._start=Math.max(0,this._start-ZS.PADDING),this._end=Math.min(this._end+ZS.PADDING,this._duration),this._source.onloadedmetadata=()=>{this._source&&(this._source.currentTime=e,this._source.onloadedmetadata=null,this.emit("progress",e/this._duration,this._duration),de.shared.add(this._onUpdate,this));},this._source.onended=this._onComplete.bind(this),this._source.play(),this.emit("start");}_onUpdate(){this.emit("progress",this.progress,this._duration),this._source.currentTime>=this._end&&!this._source.loop&&this._onComplete();}_onComplete(){de.shared.remove(this._onUpdate,this),this._internalStop(),this.emit("progress",1,this._duration),this.emit("end",this);}destroy(){de.shared.remove(this._onUpdate,this),this.removeAllListeners();let r=this._source;r&&(r.onended=null,r.onplay=null,r.onpause=null,this._internalStop()),this._source=null,this._speed=1,this._volume=1,this._loop=false,this._end=null,this._start=0,this._duration=0,this._playing=false,this._pausedReal=false,this._paused=false,this._muted=false,this._media&&(this._media.context.off("refresh",this.refresh,this),this._media.context.off("refreshPaused",this.refreshPaused,this),this._media=null);}toString(){return `[HTMLAudioInstance id=${this.id}]`}},$x=ZS;$x.PADDING=.1;_e();var Mh=class extends te{init(e){this.parent=e,this._source=e.options.source||new Audio,e.url&&(this._source.src=e.url);}create(){return new $x(this)}get isPlayable(){return !!this._source&&this._source.readyState===4}get duration(){return this._source.duration}get context(){return this.parent.context}get filters(){return null}set filters(e){console.warn("HTML Audio does not support filters");}destroy(){this.removeAllListeners(),this.parent=null,this._source&&(this._source.src="",this._source.load(),this._source=null);}get source(){return this._source}load(e){let t=this._source,i=this.parent;if(t.readyState===4){i.isLoaded=true;let u=i.autoPlayStart();e&&setTimeout(()=>{e(null,i,u);},0);return}if(!i.url){e(new Error("sound.url or sound.source must be set"));return}t.src=i.url;let s=()=>{a(),i.isLoaded=true;let u=i.autoPlayStart();e&&e(null,i,u);},n=()=>{a(),e&&e(new Error("Sound loading has been aborted"));},o=()=>{a();let u=`Failed to load audio element (code: ${t.error.code})`;e?e(new Error(u)):console.error(u);},a=()=>{t.removeEventListener("canplaythrough",s),t.removeEventListener("load",s),t.removeEventListener("abort",n),t.removeEventListener("error",o);};t.addEventListener("canplaythrough",s,false),t.addEventListener("load",s,false),t.addEventListener("abort",n,false),t.addEventListener("error",o,false),t.load();}};_e();var Dh=class{constructor(e,t){this.parent=e,Object.assign(this,t),this.duration=this.end-this.start,console.assert(this.duration>0,"End time must be after start time");}play(e){return this.parent.play({complete:e,speed:this.speed||this.parent.speed,end:this.end,start:this.start,loop:this.loop})}destroy(){this.parent=null;}};var vo=["ogg","oga","opus","m4a","mp3","mpeg","wav","aiff","wma","mid","caf"],QS=["audio/mpeg","audio/ogg"],To={};function cB(r){let e={m4a:"audio/mp4",oga:"audio/ogg",opus:'audio/ogg; codecs="opus"',caf:'audio/x-caf; codecs="opus"',...{}},t=document.createElement("audio"),i={},s=/^no$/;vo.forEach(n=>{let o=t.canPlayType(`audio/${n}`).replace(s,""),a=e[n]?t.canPlayType(e[n]).replace(s,""):"";i[n]=!!o||!!a;}),Object.assign(To,i);}cB();_e();_e();var lk=0,Ih=class extends te{constructor(e){super(),this.id=lk++,this._media=null,this._paused=false,this._muted=false,this._elapsed=0,this.init(e);}set(e,t){if(this[e]===void 0)throw new Error(`Property with name ${e} does not exist.`);switch(e){case "speed":this.speed=t;break;case "volume":this.volume=t;break;case "muted":this.muted=t;break;case "loop":this.loop=t;break;case "paused":this.paused=t;break}return this}stop(){this._source&&(this._internalStop(),this.emit("stop"));}get speed(){return this._speed}set speed(e){this._speed=e,this.refresh(),this._update(true);}get volume(){return this._volume}set volume(e){this._volume=e,this.refresh();}get muted(){return this._muted}set muted(e){this._muted=e,this.refresh();}get loop(){return this._loop}set loop(e){this._loop=e,this.refresh();}get filters(){return this._filters}set filters(e){this._filters&&(this._filters?.filter(t=>t).forEach(t=>t.disconnect()),this._filters=null,this._source.connect(this._gain)),this._filters=e?.length?e.slice(0):null,this.refresh();}refresh(){if(!this._source)return;let e=this._media.context,t=this._media.parent;this._source.loop=this._loop||t.loop;let i=e.volume*(e.muted?0:1),s=t.volume*(t.muted?0:1),n=this._volume*(this._muted?0:1);je.setParamValue(this._gain.gain,n*s*i),je.setParamValue(this._source.playbackRate,this._speed*t.speed*e.speed),this.applyFilters();}applyFilters(){if(this._filters?.length){this._source.disconnect();let e=this._source;this._filters.forEach(t=>{e.connect(t.destination),e=t;}),e.connect(this._gain);}}refreshPaused(){let e=this._media.context,t=this._media.parent,i=this._paused||t.paused||e.paused;i!==this._pausedReal&&(this._pausedReal=i,i?(this._internalStop(),this.emit("paused")):(this.emit("resumed"),this.play({start:this._elapsed%this._duration,end:this._end,speed:this._speed,loop:this._loop,volume:this._volume})),this.emit("pause",i));}play(e){let{start:t,end:i,speed:s,loop:n,volume:o,muted:a,filters:u}=e;i&&console.assert(i>t,"End time is before start time"),this._paused=false;let{source:l,gain:c}=this._media.nodes.cloneBufferSource();this._source=l,this._gain=c,this._speed=s,this._volume=o,this._loop=!!n,this._muted=a,this._filters=u,this.refresh();let h=this._source.buffer.duration;this._duration=h,this._end=i,this._lastUpdate=this._now(),this._elapsed=t,this._source.onended=this._onComplete.bind(this),this._loop?(this._source.loopEnd=i,this._source.loopStart=t,this._source.start(0,t)):i?this._source.start(0,t,i-t):this._source.start(0,t),this.emit("start"),this._update(true),this.enableTicker(true);}enableTicker(e){de.shared.remove(this._updateListener,this),e&&de.shared.add(this._updateListener,this);}get progress(){return this._progress}get paused(){return this._paused}set paused(e){this._paused=e,this.refreshPaused();}destroy(){this.removeAllListeners(),this._internalStop(),this._gain&&(this._gain.disconnect(),this._gain=null),this._media&&(this._media.context.events.off("refresh",this.refresh,this),this._media.context.events.off("refreshPaused",this.refreshPaused,this),this._media=null),this._filters?.forEach(e=>e.disconnect()),this._filters=null,this._end=null,this._speed=1,this._volume=1,this._loop=false,this._elapsed=0,this._duration=0,this._paused=false,this._muted=false,this._pausedReal=false;}toString(){return `[WebAudioInstance id=${this.id}]`}_now(){return this._media.context.audioContext.currentTime}_updateListener(){this._update();}_update(e=false){if(this._source){let t=this._now(),i=t-this._lastUpdate;if(i>0||e){let s=this._source.playbackRate.value;this._elapsed+=i*s,this._lastUpdate=t;let n=this._duration,o;if(this._source.loopStart){let a=this._source.loopEnd-this._source.loopStart;o=(this._source.loopStart+this._elapsed%a)/n;}else o=this._elapsed%n/n;this._progress=o,this.emit("progress",this._progress,n);}}}init(e){this._media=e,e.context.events.on("refresh",this.refresh,this),e.context.events.on("refreshPaused",this.refreshPaused,this);}_internalStop(){if(this._source){this.enableTicker(false),this._source.onended=null,this._source.stop(0),this._source.disconnect();try{this._source.buffer=null;}catch(e){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",e);}this._source=null;}}_onComplete(){if(this._source){this.enableTicker(false),this._source.onended=null,this._source.disconnect();try{this._source.buffer=null;}catch(e){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",e);}}this._source=null,this._progress=1,this.emit("progress",1,this._duration),this.emit("end",this);}};var So=class{constructor(e,t){this._output=t,this._input=e;}get destination(){return this._input}get filters(){return this._filters}set filters(e){if(this._filters&&(this._filters.forEach(t=>{t&&t.disconnect();}),this._filters=null,this._input.connect(this._output)),e&&e.length){this._filters=e.slice(0),this._input.disconnect();let t=null;e.forEach(i=>{t===null?this._input.connect(i.destination):t.connect(i.destination),t=i;}),t.connect(this._output);}}destroy(){this.filters=null,this._input=null,this._output=null;}};var hB=class extends So{constructor(r){let e=r.audioContext,t=e.createBufferSource(),i=e.createGain(),s=e.createAnalyser();t.connect(s),s.connect(i),i.connect(r.destination),super(s,i),this.context=r,this.bufferSource=t,this.gain=i,this.analyser=s;}get script(){return this._script||(this._script=this.context.audioContext.createScriptProcessor(hB.BUFFER_SIZE),this._script.connect(this.context.destination)),this._script}destroy(){super.destroy(),this.bufferSource.disconnect(),this._script&&this._script.disconnect(),this.gain.disconnect(),this.analyser.disconnect(),this.bufferSource=null,this._script=null,this.gain=null,this.analyser=null,this.context=null;}cloneBufferSource(){let r=this.bufferSource,e=this.context.audioContext.createBufferSource();e.buffer=r.buffer,je.setParamValue(e.playbackRate,r.playbackRate.value),e.loop=r.loop;let t=this.context.audioContext.createGain();return e.connect(t),t.connect(this.destination),{source:e,gain:t}}get bufferSize(){return this.script.bufferSize}},jx=hB;jx.BUFFER_SIZE=0;var Eo=class{init(e){this.parent=e,this._nodes=new jx(this.context),this._source=this._nodes.bufferSource,this.source=e.options.source;}destroy(){this.parent=null,this._nodes.destroy(),this._nodes=null;try{this._source.buffer=null;}catch(e){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",e);}this._source=null,this.source=null;}create(){return new Ih(this)}get context(){return this.parent.context}get isPlayable(){return !!this._source&&!!this._source.buffer}get filters(){return this._nodes.filters}set filters(e){this._nodes.filters=e;}get duration(){return console.assert(this.isPlayable,"Sound not yet playable, no duration"),this._source.buffer.duration}get buffer(){return this._source.buffer}set buffer(e){this._source.buffer=e;}get nodes(){return this._nodes}load(e){this.source?this._decode(this.source,e):this.parent.url?this._loadUrl(e):e?e(new Error("sound.url or sound.source must be set")):console.error("sound.url or sound.source must be set");}async _loadUrl(e){let t=this.parent.url,i=await L.get().fetch(t);this._decode(await i.arrayBuffer(),e);}_decode(e,t){let i=(s,n)=>{if(s)t&&t(s);else {this.parent.isLoaded=true,this.buffer=n;let o=this.parent.autoPlayStart();t&&t(null,this.parent,o);}};e instanceof AudioBuffer?i(null,e):this.parent.context.decode(e,i);}};var Hu=class{static from(r){let e={};typeof r=="string"?e.url=r:r instanceof ArrayBuffer||r instanceof AudioBuffer||r instanceof HTMLAudioElement?e.source=r:Array.isArray(r)?e.url=r:e=r,e={autoPlay:false,singleInstance:false,url:null,source:null,preload:false,volume:1,speed:1,complete:null,loaded:null,loop:false,...e},Object.freeze(e);let t=fe().useLegacy?new Mh:new Eo;return new Hu(t,e)}constructor(r,e){this.media=r,this.options=e,this._instances=[],this._sprites={},this.media.init(this);let t=e.complete;this._autoPlayOptions=t?{complete:t}:null,this.isLoaded=false,this._preloadQueue=null,this.isPlaying=false,this.autoPlay=e.autoPlay,this.singleInstance=e.singleInstance,this.preload=e.preload||this.autoPlay,this.url=Array.isArray(e.url)?this.preferUrl(e.url):e.url,this.speed=e.speed,this.volume=e.volume,this.loop=e.loop,e.sprites&&this.addSprites(e.sprites),this.preload&&this._preload(e.loaded);}preferUrl(r){let[e]=r.map(t=>({url:t,ext:Te.extname(t).slice(1)})).filter(({ext:t})=>To[t]).sort((t,i)=>vo.indexOf(t.ext)-vo.indexOf(i.ext));if(!e)throw new Error("No supported file type found");return e.url}get context(){return fe().context}pause(){return this.isPlaying=false,this.paused=true,this}resume(){return this.isPlaying=this._instances.length>0,this.paused=false,this}get paused(){return this._paused}set paused(r){this._paused=r,this.refreshPaused();}get speed(){return this._speed}set speed(r){this._speed=r,this.refresh();}get filters(){return this.media.filters}set filters(r){this.media.filters=r;}addSprites(r,e){if(typeof r=="object"){let i={};for(let s in r)i[s]=this.addSprites(s,r[s]);return i}console.assert(!this._sprites[r],`Alias ${r} is already taken`);let t=new Dh(this,e);return this._sprites[r]=t,t}destroy(){this._removeInstances(),this.removeSprites(),this.media.destroy(),this.media=null,this._sprites=null,this._instances=null;}removeSprites(r){if(r){let e=this._sprites[r];e!==void 0&&(e.destroy(),delete this._sprites[r]);}else for(let e in this._sprites)this.removeSprites(e);return this}get isPlayable(){return this.isLoaded&&this.media&&this.media.isPlayable}stop(){if(!this.isPlayable)return this.autoPlay=false,this._autoPlayOptions=null,this;this.isPlaying=false;for(let r=this._instances.length-1;r>=0;r--)this._instances[r].stop();return this}play(r,e){let t;if(typeof r=="string"?t={sprite:r,loop:this.loop,complete:e}:typeof r=="function"?(t={},t.complete=r):t=r,t={complete:null,loaded:null,sprite:null,end:null,start:0,volume:1,speed:1,muted:false,loop:false,...t||{}},t.sprite){let s=t.sprite;console.assert(!!this._sprites[s],`Alias ${s} is not available`);let n=this._sprites[s];t.start=n.start+(t.start||0),t.end=n.end,t.speed=n.speed||1,t.loop=n.loop||t.loop,delete t.sprite;}if(t.offset&&(t.start=t.offset),!this.isLoaded)return this._preloadQueue?new Promise(s=>{this._preloadQueue.push(()=>{s(this.play(t));});}):(this._preloadQueue=[],this.autoPlay=true,this._autoPlayOptions=t,new Promise((s,n)=>{this._preload((o,a,u)=>{this._preloadQueue.forEach(l=>l()),this._preloadQueue=null,o?n(o):(t.loaded&&t.loaded(o,a,u),s(u));});}));(this.singleInstance||t.singleInstance)&&this._removeInstances();let i=this._createInstance();return this._instances.push(i),this.isPlaying=true,i.once("end",()=>{t.complete&&t.complete(this),this._onComplete(i);}),i.once("stop",()=>{this._onComplete(i);}),i.play(t),i}refresh(){let r=this._instances.length;for(let e=0;e<r;e++)this._instances[e].refresh();}refreshPaused(){let r=this._instances.length;for(let e=0;e<r;e++)this._instances[e].refreshPaused();}get volume(){return this._volume}set volume(r){this._volume=r,this.refresh();}get muted(){return this._muted}set muted(r){this._muted=r,this.refresh();}get loop(){return this._loop}set loop(r){this._loop=r,this.refresh();}_preload(r){this.media.load(r);}get instances(){return this._instances}get sprites(){return this._sprites}get duration(){return this.media.duration}autoPlayStart(){let r;return this.autoPlay&&(r=this.play(this._autoPlayOptions)),r}_removeInstances(){for(let r=this._instances.length-1;r>=0;r--)this._poolInstance(this._instances[r]);this._instances.length=0;}_onComplete(r){if(this._instances){let e=this._instances.indexOf(r);e>-1&&this._instances.splice(e,1),this.isPlaying=this._instances.length>0;}this._poolInstance(r);}_createInstance(){if(Hu._pool.length>0){let r=Hu._pool.pop();return r.init(this.media),r}return this.media.create()}_poolInstance(r){r.destroy(),Hu._pool.indexOf(r)<0&&Hu._pool.push(r);}},Ps=Hu;Ps._pool=[];_e();var Vu=class r extends So{constructor(){let e=window,t=new r.AudioContext,i=t.createDynamicsCompressor(),s=t.createAnalyser();s.connect(i),i.connect(t.destination),super(s,i),this.autoPause=true,this._ctx=t,this._offlineCtx=new r.OfflineAudioContext(1,2,e.OfflineAudioContext?Math.max(8e3,Math.min(96e3,t.sampleRate)):44100),this.compressor=i,this.analyser=s,this.events=new te,this.volume=1,this.speed=1,this.muted=false,this.paused=false,this._locked=t.state==="suspended"&&("ontouchstart"in globalThis||"onclick"in globalThis),this._locked&&(this._unlock(),this._unlock=this._unlock.bind(this),document.addEventListener("mousedown",this._unlock,true),document.addEventListener("touchstart",this._unlock,true),document.addEventListener("touchend",this._unlock,true)),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),globalThis.addEventListener("focus",this.onFocus),globalThis.addEventListener("blur",this.onBlur);}onFocus(){if(!this.autoPause)return;let e=this._ctx.state;(e==="suspended"||e==="interrupted"||!this._locked)&&(this.paused=this._pausedOnBlur,this.refreshPaused());}onBlur(){this.autoPause&&(this._locked||(this._pausedOnBlur=this._paused,this.paused=true,this.refreshPaused()));}_unlock(){this._locked&&(this.playEmptySound(),this._ctx.state==="running"&&(document.removeEventListener("mousedown",this._unlock,true),document.removeEventListener("touchend",this._unlock,true),document.removeEventListener("touchstart",this._unlock,true),this._locked=false));}playEmptySound(){let e=this._ctx.createBufferSource();e.buffer=this._ctx.createBuffer(1,1,22050),e.connect(this._ctx.destination),e.start(0,0,0),e.context.state==="suspended"&&e.context.resume();}static get AudioContext(){let e=window;return e.AudioContext||e.webkitAudioContext||null}static get OfflineAudioContext(){let e=window;return e.OfflineAudioContext||e.webkitOfflineAudioContext||null}destroy(){super.destroy();let e=this._ctx;typeof e.close<"u"&&e.close(),globalThis.removeEventListener("focus",this.onFocus),globalThis.removeEventListener("blur",this.onBlur),this.events.removeAllListeners(),this.analyser.disconnect(),this.compressor.disconnect(),this.analyser=null,this.compressor=null,this.events=null,this._offlineCtx=null,this._ctx=null;}get audioContext(){return this._ctx}get offlineContext(){return this._offlineCtx}set paused(e){e&&this._ctx.state==="running"?this._ctx.suspend():!e&&this._ctx.state==="suspended"&&this._ctx.resume(),this._paused=e;}get paused(){return this._paused}refresh(){this.events.emit("refresh");}refreshPaused(){this.events.emit("refreshPaused");}toggleMute(){return this.muted=!this.muted,this.refresh(),this.muted}togglePause(){return this.paused=!this.paused,this.refreshPaused(),this._paused}decode(e,t){let i=n=>{t(new Error(n?.message||"Unable to decode file"));},s=this._offlineCtx.decodeAudioData(e,n=>{t(null,n);},i);s&&s.catch(i);}};var qx=class{constructor(){this.init();}init(){return this.supported&&(this._webAudioContext=new Vu),this._htmlAudioContext=new Rh,this._sounds={},this.useLegacy=!this.supported,this}get context(){return this._context}get filtersAll(){return this.useLegacy?[]:this._context.filters}set filtersAll(e){this.useLegacy||(this._context.filters=e);}get supported(){return Vu.AudioContext!==null}add(e,t){if(typeof e=="object"){let n={};for(let o in e){let a=this._getOptions(e[o],t);n[o]=this.add(o,a);}return n}if(console.assert(!this._sounds[e],`Sound with alias ${e} already exists.`),t instanceof Ps)return this._sounds[e]=t,t;let i=this._getOptions(t),s=Ps.from(i);return this._sounds[e]=s,s}_getOptions(e,t){let i;return typeof e=="string"?i={url:e}:Array.isArray(e)?i={url:e}:e instanceof ArrayBuffer||e instanceof AudioBuffer||e instanceof HTMLAudioElement?i={source:e}:i=e,i={...i,...t||{}},i}get useLegacy(){return this._useLegacy}set useLegacy(e){this._useLegacy=e,this._context=!e&&this.supported?this._webAudioContext:this._htmlAudioContext;}get disableAutoPause(){return !this._webAudioContext.autoPause}set disableAutoPause(e){this._webAudioContext.autoPause=!e;}remove(e){return this.exists(e,true),this._sounds[e].destroy(),delete this._sounds[e],this}get volumeAll(){return this._context.volume}set volumeAll(e){this._context.volume=e,this._context.refresh();}get speedAll(){return this._context.speed}set speedAll(e){this._context.speed=e,this._context.refresh();}togglePauseAll(){return this._context.togglePause()}pauseAll(){return this._context.paused=true,this._context.refreshPaused(),this}resumeAll(){return this._context.paused=false,this._context.refreshPaused(),this}toggleMuteAll(){return this._context.toggleMute()}muteAll(){return this._context.muted=true,this._context.refresh(),this}unmuteAll(){return this._context.muted=false,this._context.refresh(),this}removeAll(){for(let e in this._sounds)this._sounds[e].destroy(),delete this._sounds[e];return this}stopAll(){for(let e in this._sounds)this._sounds[e].stop();return this}exists(e,t=false){let i=!!this._sounds[e];return t&&console.assert(i,`No sound matching alias '${e}'.`),i}isPlaying(){for(let e in this._sounds)if(this._sounds[e].isPlaying)return true;return false}find(e){return this.exists(e,true),this._sounds[e]}play(e,t){return this.find(e).play(t)}stop(e){return this.find(e).stop()}pause(e){return this.find(e).pause()}resume(e){return this.find(e).resume()}volume(e,t){let i=this.find(e);return t!==void 0&&(i.volume=t),i.volume}speed(e,t){let i=this.find(e);return t!==void 0&&(i.speed=t),i.speed}duration(e){return this.find(e).duration}close(){return this.removeAll(),this._sounds=null,this._webAudioContext&&(this._webAudioContext.destroy(),this._webAudioContext=null),this._htmlAudioContext&&(this._htmlAudioContext.destroy(),this._htmlAudioContext=null),this._context=null,this}};_e();_e();var dB=r=>{let e=r.src,t=r?.alias?.[0];return (!t||r.src===t)&&(t=Te.basename(e,Te.extname(e))),t},fB={extension:m.Asset,detection:{test:async()=>true,add:async r=>[...r,...vo.filter(e=>To[e])],remove:async r=>r.filter(e=>r.includes(e))},loader:{name:"sound",extension:{type:[m.LoadParser],priority:ve.High},test(r){let e=Te.extname(r).slice(1);return !!To[e]||QS.some(t=>r.startsWith(`data:${t}`))},async load(r,e){let t=await new Promise((i,s)=>Ps.from({...e.data,url:r,preload:true,loaded(n,o){n?s(n):i(o),e.data?.loaded?.(n,o);}}));return fe().add(dB(e),t),t},async unload(r,e){fe().remove(dB(e));}}};F.add(fB);lB(new qx);var kh="repeat";({DistortionFilter:$r.DistortionFilter,EqualizerFilter:$r.EqualizerFilter,MonoFilter:$r.MonoFilter,ReverbFilter:$r.ReverbFilter,StereoFilter:$r.StereoFilter,StreamFilter:$r.StreamFilter,TelephoneFilter:$r.TelephoneFilter});var pB=["webm","mp4","ogv","mov","avi","wmv","flv","mkv","3gp","mpg","mpeg","m4v","f4v","m2v","asf","vob","ts","m2ts","mts","divx","xvid","rm","rmvb","dat","swf","mpv","mxf","vcd","svcd","dvd","dv","3g2","m2p","m2ts","m2v","m4v","mpe","mpg","mpv2","ogm","qt","rm","ts","vob","wmv","xvid","flv","mkv","mov","mp4","webm","avi","ogv","m4v","f4v","m2v","asf","vob","ts","m2ts","mts","divx","xvid","rm","rmvb","dat","swf","mpv","mxf","vcd","svcd","dvd","dv","3g2","m2p","m2ts","m2v","m4v","mpe","mpg","mpv2","ogm","qt","rm","ts","vob","wmv","xvid","flv","mkv","mov","mp4","webm","avi","ogv","m4v","f4v","m2v","asf","vob"],Mr="__game_layer__",zu="Container",Kx="ImageContainer",JS="Image",Wu="Sprite",Xu="Text",e1="Video";var N;(s=>(s.log=(n,...o)=>console.log(`[Pixi\u2019VN] ${n}`,...o),s.warn=(n,...o)=>console.warn(`[Pixi\u2019VN] ${n}`,...o),s.error=(n,...o)=>console.error(`[Pixi\u2019VN] ${n}`,...o),s.info=(n,...o)=>console.info(`[Pixi\u2019VN] ${n}`,...o)))(N||={});function St(r){try{if(typeof r>"u")return r;let e=JSON.stringify(r);return JSON.parse(e)}catch(e){throw N.error("Error creating exportable element",r,e),new Error("[Pixi\u2019VN] Error creating exportable element")}}async function mB(r){var e;let t={importPixi:false,...r};t.app&&(t.renderer=t.app.renderer,t.stage=t.app.stage),t.importPixi&&!t.pixi&&(t.pixi=await Promise.resolve().then(()=>(_e(),oB))),window.__PIXI_DEVTOOLS__={...window.__PIXI_DEVTOOLS__||{},app:t.app,stage:t.stage,renderer:t.renderer,extensions:[...((e=window.__PIXI_DEVTOOLS__)==null?void 0:e.extensions)||[],...t.extensions||[]],plugins:{}};}var MB=Ro(bB());_e();var Nt=class r{static init(e){r._getScreen=e.getScreen;}static _getScreen;static get screen(){return r._getScreen()}};_e();var Yu=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,vB=new Set,t1=typeof process=="object"&&process?process:{},TB=(r,e,t,i)=>{typeof t1.emitWarning=="function"?t1.emitWarning(r,e,t,i):console.error(`[${t}] ${e}: ${r}`);},Jx=globalThis.AbortController,yB=globalThis.AbortSignal;if(typeof Jx>"u"){yB=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,s){this._onabort.push(s);}},Jx=class{constructor(){e();}signal=new yB;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 r=t1.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{r&&(r=false,TB("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 dk=r=>!vB.has(r),ws=r=>r&&r===Math.floor(r)&&r>0&&isFinite(r),SB=r=>ws(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?$u:null:null,$u=class extends Array{constructor(e){super(e),this.fill(0);}},r1=class r{heap;length;static#u=false;static create(e){let t=SB(e);if(!t)return [];r.#u=true;let i=new r(e,t);return r.#u=false,i}constructor(e,t){if(!r.#u)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0;}push(e){this.heap[this.length++]=e;}pop(){return this.heap[--this.length]}},e_=class r{#u;#h;#m;#P;#g;#M;#D;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#s;#x;#i;#r;#e;#l;#d;#a;#n;#_;#o;#b;#y;#f;#v;#C;#c;#I;static unsafeExposeInternals(e){return {starts:e.#y,ttls:e.#f,sizes:e.#b,keyMap:e.#i,keyList:e.#r,valList:e.#e,next:e.#l,prev:e.#d,get head(){return e.#a},get tail(){return e.#n},free:e.#_,isBackgroundFetch:t=>e.#t(t),backgroundFetch:(t,i,s,n)=>e.#O(t,i,s,n),moveToTail:t=>e.#R(t),indexes:t=>e.#T(t),rindexes:t=>e.#S(t),isStale:t=>e.#p(t)}}get max(){return this.#u}get maxSize(){return this.#h}get calculatedSize(){return this.#x}get size(){return this.#s}get fetchMethod(){return this.#M}get memoMethod(){return this.#D}get dispose(){return this.#m}get onInsert(){return this.#P}get disposeAfter(){return this.#g}constructor(e){let{max:t=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:u,dispose:l,onInsert:c,disposeAfter:h,noDisposeOnSet:d,noUpdateTTL:p,maxSize:g=0,maxEntrySize:b=0,sizeCalculation:_,fetchMethod:x,memoMethod:y,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:v,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:E,ignoreFetchAbort:C}=e;if(t!==0&&!ws(t))throw new TypeError("max option must be a nonnegative integer");let I=t?SB(t):Array;if(!I)throw new Error("invalid max value: "+t);if(this.#u=t,this.#h=g,this.maxEntrySize=b||this.#h,this.sizeCalculation=_,this.sizeCalculation){if(!this.#h&&!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(y!==void 0&&typeof y!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#D=y,x!==void 0&&typeof x!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#M=x,this.#C=!!x,this.#i=new Map,this.#r=new Array(t).fill(void 0),this.#e=new Array(t).fill(void 0),this.#l=new I(t),this.#d=new I(t),this.#a=0,this.#n=0,this.#_=r1.create(t),this.#s=0,this.#x=0,typeof l=="function"&&(this.#m=l),typeof c=="function"&&(this.#P=c),typeof h=="function"?(this.#g=h,this.#o=[]):(this.#g=void 0,this.#o=void 0),this.#v=!!this.#m,this.#I=!!this.#P,this.#c=!!this.#g,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!w,this.allowStaleOnFetchAbort=!!E,this.ignoreFetchAbort=!!C,this.maxEntrySize!==0){if(this.#h!==0&&!ws(this.#h))throw new TypeError("maxSize must be a positive integer if specified");if(!ws(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#z();}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!v,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=ws(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!ws(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#G();}if(this.#u===0&&this.ttl===0&&this.#h===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#u&&!this.#h){let k="LRU_CACHE_UNBOUNDED";dk(k)&&(vB.add(k),TB("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",k,r));}}getRemainingTTL(e){return this.#i.has(e)?1/0:0}#G(){let e=new $u(this.#u),t=new $u(this.#u);this.#f=e,this.#y=t,this.#U=(n,o,a=Yu.now())=>{if(t[n]=o!==0?a:0,e[n]=o,o!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.#p(n)&&this.#E(this.#r[n],"expire");},o+1);u.unref&&u.unref();}},this.#w=n=>{t[n]=e[n]!==0?Yu.now():0;},this.#A=(n,o)=>{if(e[o]){let a=e[o],u=t[o];if(!a||!u)return;n.ttl=a,n.start=u,n.now=i||s();let l=n.now-u;n.remainingTTL=a-l;}};let i=0,s=()=>{let n=Yu.now();if(this.ttlResolution>0){i=n;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref();}return n};this.getRemainingTTL=n=>{let o=this.#i.get(n);if(o===void 0)return 0;let a=e[o],u=t[o];if(!a||!u)return 1/0;let l=(i||s())-u;return a-l},this.#p=n=>{let o=t[n],a=e[n];return !!a&&!!o&&(i||s())-o>a};}#w=()=>{};#A=()=>{};#U=()=>{};#p=()=>false;#z(){let e=new $u(this.#u);this.#x=0,this.#b=e,this.#B=t=>{this.#x-=e[t],e[t]=0;},this.#L=(t,i,s,n)=>{if(this.#t(i))return 0;if(!ws(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,t),!ws(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},this.#k=(t,i,s)=>{if(e[t]=i,this.#h){let n=this.#h-e[t];for(;this.#x>n;)this.#F(true);}this.#x+=e[t],s&&(s.entrySize=i,s.totalCalculatedSize=this.#x);};}#B=e=>{};#k=(e,t,i)=>{};#L=(e,t,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#T({allowStale:e=this.allowStale}={}){if(this.#s)for(let t=this.#n;!(!this.#N(t)||((e||!this.#p(t))&&(yield t),t===this.#a));)t=this.#d[t];}*#S({allowStale:e=this.allowStale}={}){if(this.#s)for(let t=this.#a;!(!this.#N(t)||((e||!this.#p(t))&&(yield t),t===this.#n));)t=this.#l[t];}#N(e){return e!==void 0&&this.#i.get(this.#r[e])===e}*entries(){for(let e of this.#T())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#r[e],this.#e[e]]);}*rentries(){for(let e of this.#S())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#r[e],this.#e[e]]);}*keys(){for(let e of this.#T()){let t=this.#r[e];t!==void 0&&!this.#t(this.#e[e])&&(yield t);}}*rkeys(){for(let e of this.#S()){let t=this.#r[e];t!==void 0&&!this.#t(this.#e[e])&&(yield t);}}*values(){for(let e of this.#T())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}*rvalues(){for(let e of this.#S())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#T()){let s=this.#e[i],n=this.#t(s)?s.__staleWhileFetching:s;if(n!==void 0&&e(n,this.#r[i],this))return this.get(this.#r[i],t)}}forEach(e,t=this){for(let i of this.#T()){let s=this.#e[i],n=this.#t(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#r[i],this);}}rforEach(e,t=this){for(let i of this.#S()){let s=this.#e[i],n=this.#t(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#r[i],this);}}purgeStale(){let e=false;for(let t of this.#S({allowStale:true}))this.#p(t)&&(this.#E(this.#r[t],"expire"),e=true);return e}info(e){let t=this.#i.get(e);if(t===void 0)return;let i=this.#e[t],s=this.#t(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#f&&this.#y){let o=this.#f[t],a=this.#y[t];if(o&&a){let u=o-(Yu.now()-a);n.ttl=u,n.start=Date.now();}}return this.#b&&(n.size=this.#b[t]),n}dump(){let e=[];for(let t of this.#T({allowStale:true})){let i=this.#r[t],s=this.#e[t],n=this.#t(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let o={value:n};if(this.#f&&this.#y){o.ttl=this.#f[t];let a=Yu.now()-this.#y[t];o.start=Math.floor(Date.now()-a);}this.#b&&(o.size=this.#b[t]),e.unshift([i,o]);}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let s=Date.now()-i.start;i.start=Yu.now()-s;}this.set(t,i.value,i);}}set(e,t,i={}){if(t===void 0)return this.delete(e),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:u}=i,{noUpdateTTL:l=this.noUpdateTTL}=i,c=this.#L(e,t,i.size||0,a);if(this.maxEntrySize&&c>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=true),this.#E(e,"set"),this;let h=this.#s===0?void 0:this.#i.get(e);if(h===void 0)h=this.#s===0?this.#n:this.#_.length!==0?this.#_.pop():this.#s===this.#u?this.#F(false):this.#s,this.#r[h]=e,this.#e[h]=t,this.#i.set(e,h),this.#l[this.#n]=h,this.#d[h]=this.#n,this.#n=h,this.#s++,this.#k(h,c,u),u&&(u.set="add"),l=false,this.#I&&this.#P?.(t,e,"add");else {this.#R(h);let d=this.#e[h];if(t!==d){if(this.#C&&this.#t(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:p}=d;p!==void 0&&!o&&(this.#v&&this.#m?.(p,e,"set"),this.#c&&this.#o?.push([p,e,"set"]));}else o||(this.#v&&this.#m?.(d,e,"set"),this.#c&&this.#o?.push([d,e,"set"]));if(this.#B(h),this.#k(h,c,u),this.#e[h]=t,u){u.set="replace";let p=d&&this.#t(d)?d.__staleWhileFetching:d;p!==void 0&&(u.oldValue=p);}}else u&&(u.set="update");this.#I&&this.onInsert?.(t,e,t===d?"update":"replace");}if(s!==0&&!this.#f&&this.#G(),this.#f&&(l||this.#U(h,s,n),u&&this.#A(u,h)),!o&&this.#c&&this.#o){let d=this.#o,p;for(;p=d?.shift();)this.#g?.(...p);}return this}pop(){try{for(;this.#s;){let e=this.#e[this.#a];if(this.#F(!0),this.#t(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#c&&this.#o){let e=this.#o,t;for(;t=e?.shift();)this.#g?.(...t);}}}#F(e){let t=this.#a,i=this.#r[t],s=this.#e[t];return this.#C&&this.#t(s)?s.__abortController.abort(new Error("evicted")):(this.#v||this.#c)&&(this.#v&&this.#m?.(s,i,"evict"),this.#c&&this.#o?.push([s,i,"evict"])),this.#B(t),e&&(this.#r[t]=void 0,this.#e[t]=void 0,this.#_.push(t)),this.#s===1?(this.#a=this.#n=0,this.#_.length=0):this.#a=this.#l[t],this.#i.delete(i),this.#s--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=t,n=this.#i.get(e);if(n!==void 0){let o=this.#e[n];if(this.#t(o)&&o.__staleWhileFetching===void 0)return false;if(this.#p(n))s&&(s.has="stale",this.#A(s,n));else return i&&this.#w(n),s&&(s.has="hit",this.#A(s,n)),true}else s&&(s.has="miss");return false}peek(e,t={}){let{allowStale:i=this.allowStale}=t,s=this.#i.get(e);if(s===void 0||!i&&this.#p(s))return;let n=this.#e[s];return this.#t(n)?n.__staleWhileFetching:n}#O(e,t,i,s){let n=t===void 0?void 0:this.#e[t];if(this.#t(n))return n;let o=new Jx,{signal:a}=i;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let u={signal:o.signal,options:i,context:s},l=(b,_=false)=>{let{aborted:x}=o.signal,y=i.ignoreFetchAbort&&b!==void 0;if(i.status&&(x&&!_?(i.status.fetchAborted=true,i.status.fetchError=o.signal.reason,y&&(i.status.fetchAbortIgnored=true)):i.status.fetchResolved=true),x&&!y&&!_)return h(o.signal.reason);let T=p;return this.#e[t]===p&&(b===void 0?T.__staleWhileFetching?this.#e[t]=T.__staleWhileFetching:this.#E(e,"fetch"):(i.status&&(i.status.fetchUpdated=true),this.set(e,b,u.options))),b},c=b=>(i.status&&(i.status.fetchRejected=true,i.status.fetchError=b),h(b)),h=b=>{let{aborted:_}=o.signal,x=_&&i.allowStaleOnFetchAbort,y=x||i.allowStaleOnFetchRejection,T=y||i.noDeleteOnFetchRejection,v=p;if(this.#e[t]===p&&(!T||v.__staleWhileFetching===void 0?this.#E(e,"fetch"):x||(this.#e[t]=v.__staleWhileFetching)),y)return i.status&&v.__staleWhileFetching!==void 0&&(i.status.returnedStale=true),v.__staleWhileFetching;if(v.__returned===v)throw b},d=(b,_)=>{let x=this.#M?.(e,n,u);x&&x instanceof Promise&&x.then(y=>b(y===void 0?void 0:y),_),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(b(void 0),i.allowStaleOnFetchAbort&&(b=y=>l(y,true)));});};i.status&&(i.status.fetchDispatched=true);let p=new Promise(d).then(l,c),g=Object.assign(p,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.set(e,g,{...u.options,status:void 0}),t=this.#i.get(e)):this.#e[t]=g,g}#t(e){if(!this.#C)return false;let t=e;return !!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof Jx}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:u=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:b,forceRefresh:_=false,status:x,signal:y}=t;if(!this.#C)return x&&(x.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:x});let T={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:a,size:u,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:g,ignoreFetchAbort:p,status:x,signal:y},v=this.#i.get(e);if(v===void 0){x&&(x.fetch="miss");let w=this.#O(e,v,T,b);return w.__returned=w}else {let w=this.#e[v];if(this.#t(w)){let O=i&&w.__staleWhileFetching!==void 0;return x&&(x.fetch="inflight",O&&(x.returnedStale=true)),O?w.__staleWhileFetching:w.__returned=w}let E=this.#p(v);if(!_&&!E)return x&&(x.fetch="hit"),this.#R(v),s&&this.#w(v),x&&this.#A(x,v),w;let C=this.#O(e,v,T,b),k=C.__staleWhileFetching!==void 0&&i;return x&&(x.fetch=E?"stale":"refresh",k&&E&&(x.returnedStale=true)),k?C.__staleWhileFetching:C.__returned=C}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#D;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...o}=t,a=this.get(e,o);if(!n&&a!==void 0)return a;let u=i(e,a,{options:o,context:s});return this.set(e,u,o),u}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=t,a=this.#i.get(e);if(a!==void 0){let u=this.#e[a],l=this.#t(u);return o&&this.#A(o,a),this.#p(a)?(o&&(o.get="stale"),l?(o&&i&&u.__staleWhileFetching!==void 0&&(o.returnedStale=true),i?u.__staleWhileFetching:void 0):(n||this.#E(e,"expire"),o&&i&&(o.returnedStale=true),i?u:void 0)):(o&&(o.get="hit"),l?u.__staleWhileFetching:(this.#R(a),s&&this.#w(a),u))}else o&&(o.get="miss");}#H(e,t){this.#d[t]=e,this.#l[e]=t;}#R(e){e!==this.#n&&(e===this.#a?this.#a=this.#l[e]:this.#H(this.#d[e],this.#l[e]),this.#H(this.#n,e),this.#n=e);}delete(e){return this.#E(e,"delete")}#E(e,t){let i=false;if(this.#s!==0){let s=this.#i.get(e);if(s!==void 0)if(i=true,this.#s===1)this.#V(t);else {this.#B(s);let n=this.#e[s];if(this.#t(n)?n.__abortController.abort(new Error("deleted")):(this.#v||this.#c)&&(this.#v&&this.#m?.(n,e,t),this.#c&&this.#o?.push([n,e,t])),this.#i.delete(e),this.#r[s]=void 0,this.#e[s]=void 0,s===this.#n)this.#n=this.#d[s];else if(s===this.#a)this.#a=this.#l[s];else {let o=this.#d[s];this.#l[o]=this.#l[s];let a=this.#l[s];this.#d[a]=this.#d[s];}this.#s--,this.#_.push(s);}}if(this.#c&&this.#o?.length){let s=this.#o,n;for(;n=s?.shift();)this.#g?.(...n);}return i}clear(){return this.#V("delete")}#V(e){for(let t of this.#S({allowStale:true})){let i=this.#e[t];if(this.#t(i))i.__abortController.abort(new Error("deleted"));else {let s=this.#r[t];this.#v&&this.#m?.(i,s,e),this.#c&&this.#o?.push([i,s,e]);}}if(this.#i.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#f&&this.#y&&(this.#f.fill(0),this.#y.fill(0)),this.#b&&this.#b.fill(0),this.#a=0,this.#n=0,this.#_.length=0,this.#x=0,this.#s=0,this.#c&&this.#o){let t=this.#o,i;for(;i=t?.shift();)this.#g?.(...i);}}};var jr=class{cache;map=new Map;constructor(e){this.cache=new e_({max:e.cacheSize}),this.map=new Map;}get[Symbol.iterator](){return this.map[Symbol.iterator]}get[Symbol.toStringTag](){return this.map[Symbol.toStringTag]}clear(){return this.cache.clear(),this.map.clear()}delete(e){let t=this.map.delete(e);return t&&this.cache.delete(e),t}get forEach(){return this.map.forEach}get(e){let t=this.cache.get(e);return t||this.map.get(e)}has(e){return this.map.has(e)}set(e,t){return this.map.set(e,t),this.cache.set(e,t),this}get size(){return this.map.size}get entries(){return this.map.entries}get keys(){return this.map.keys}get values(){return this.map.values}};var Fh=new jr({cacheSize:5});var EB;(s=>{function r(n,o){o||(o=n.name),Fh.get(o)&&N.warn(`CanvasElement "${o}" already registered`),n.prototype.pixivnId=o,Fh.set(o,n);}s.add=r;function e(n){try{let o=Fh.get(n);if(!o){N.error(`CanvasElement "${n}" not found, did you forget to register it with the canvasComponentDecorator?`);return}return new o,o}catch(o){N.error(`Error while getting CanvasElement "${n}"`,o);return}}s.get=e;function t(){return Array.from(Fh.values())}s.values=t;function i(n){return Fh.has(n)}s.has=i;})(EB||={});var Rt=EB;_e();_e();function i1(r){return "memory"in r?r.memory:r instanceof hr?s1(r):r instanceof me?Oh(r):Ao(r)}function fk(r){return {width:r.width,height:r.height,isRenderGroup:r.isRenderGroup,blendMode:r.blendMode,tint:r.tint,alpha:r.alpha,angle:r.angle,renderable:r.renderable,rotation:r.rotation,scale:{x:r.scale.x,y:r.scale.y},pivot:{x:r.pivot.x,y:r.pivot.y},position:{x:r.position.x,y:r.position.y},skew:{x:r.skew.x,y:r.skew.y},visible:r.visible,x:r.x,y:r.y,boundsArea:r.boundsArea,cursor:r.cursor,eventMode:r.eventMode,interactive:r.interactive,interactiveChildren:r.interactiveChildren,hitArea:r.hitArea}}function AB(r,e){return {url:r.source.label,alias:e===r.source.label?void 0:e}}function Ao(r,e){let t=pk(r,zu),s=e?.childrenExport||false?r.children.sort((n,o)=>r.getChildIndex(n)-r.getChildIndex(o)).map(n=>i1(n)):[];return {pixivnId:t,elements:s,...fk(r)}}function Oh(r){let e=Ao(r),t=e.pixivnId??Wu,i=PB(r),s="textureAlias"in r?AB(r.texture,r.textureAlias):AB(r.texture);return {...e,pixivnId:t,textureData:s,anchor:{x:r.anchor.x,y:r.anchor.y},roundPixels:r.roundPixels,onEvents:i}}function s1(r){let e=Ao(r),t=e.pixivnId??Xu,i=PB(r);return {...e,pixivnId:t,anchor:{x:r.anchor.x,y:r.anchor.y},text:r.text,resolution:r.resolution,style:mk(r.style),roundPixels:r.roundPixels,onEvents:i}}function pk(r,e){return Object.prototype.hasOwnProperty.call(r,"pixivnId")?r.pixivnId:e}function PB(r){return "onEvents"in r?r.onEvents:{}}function CB(r,e){if(typeof r!="object"||r===null)return r;N.warn(`Unsupported property type for Text.style.${e}: FillGradient or FillPattern.`,r);}function mk(r){return {align:r.align,breakWords:r.breakWords,dropShadow:r.dropShadow,fill:CB(r.stroke,"fill"),fontFamily:r.fontFamily,fontSize:r.fontSize,fontStyle:r.fontStyle,fontVariant:r.fontVariant,fontWeight:r.fontWeight,leading:r.leading,letterSpacing:r.letterSpacing,lineHeight:r.lineHeight,padding:r.padding,stroke:CB(r.stroke,"stroke"),textBaseline:r.textBaseline,trim:r.trim,whiteSpace:r.whiteSpace,wordWrap:r.wordWrap,wordWrapWidth:r.wordWrapWidth}}function bi(r,e,t,i,s,n=0){return i=i*(s?-1:1),r==="width"?e*(Nt.screen.width-t)+i+n*t+(s?t:0):e*(Nt.screen.height-t)+i+n*t+(s?t:0)}function qr(r,e,t,i,s,n=0){return i=i*(s?-1:1),r==="width"?(e-i-n*t-(s?t:0))/(Nt.screen.width-t):(e-i-n*t-(s?t:0))/(Nt.screen.height-t)}function yi(r,e){return r==="width"?e*Nt.screen.width:e*Nt.screen.height}function Kr(r,e){return r==="width"?e/Nt.screen.width:e/Nt.screen.height}function We(r,e){if(e=e%360,e<0&&(e+=360),e===0)return {x:r.x,y:r.y};if(e===90)return {x:-r.y,y:r.x};if(e===180)return {x:-r.x,y:-r.y};if(e===270)return {x:r.y,y:-r.x};if(e>0&&e<90){let t=e*Math.PI/180,i=Math.cos(t),s=Math.sin(t);return {x:r.x*i-r.y*s,y:r.x*s+r.y*i}}else if(e>90&&e<180){let t=(e-90)*Math.PI/180,i=Math.cos(t),s=Math.sin(t);return {x:-r.y*s-r.x*i,y:r.y*i-r.x*s}}else if(e>180&&e<270){let t=(e-180)*Math.PI/180,i=Math.cos(t),s=Math.sin(t);return {x:-r.x*i+r.y*s,y:-r.x*s-r.y*i}}else if(e>270&&e<360){let t=(e-270)*Math.PI/180,i=Math.cos(t),s=Math.sin(t);return {x:r.y*s-r.x*i,y:-r.y*i-r.x*s}}return {x:0,y:0}}function Zr(r){let e=r.width,t=r.height,i=r.angle%360;return i<0&&(i+=360),i===0||i===180?e:i===90||i===270?t:Math.abs(e*Math.cos(i*Math.PI/180))+Math.abs(t*Math.sin(i*Math.PI/180))}function Qr(r){let e=r.width,t=r.height,i=r.angle%360;return i<0&&(i+=360),i===0||i===180?t:i===90||i===270?e:Math.abs(t*Math.cos(i*Math.PI/180))+Math.abs(e*Math.sin(i*Math.PI/180))}_e();async function Bs(r){if(r!=="EMPTY"){if(!r){N.error("Texture not found",r);return}if(ct.cache.has(r)){let e=ct.get(r);if(e)return e}return ct.load(r).then(e=>{if(!e){N.error("Texture not found",r);return}if(!(e instanceof A)){N.error("File not is a file",r);return}return e}).catch(e=>{N.error("Error loading file",e);})}}function Co(r){return r&&(typeof r.align!="number"&&(r.xAlign!=null&&(r.align===void 0?(r.align={x:r.xAlign},delete r.xAlign):(r.align.x=r.xAlign,delete r.xAlign)),r.yAlign!=null&&(r.align===void 0?(r.align={y:r.yAlign},delete r.yAlign):(r.align.y=r.yAlign,delete r.yAlign))),typeof r.percentagePosition!="number"&&(r.xPercentagePosition!=null&&(r.percentagePosition===void 0?(r.percentagePosition={x:r.xPercentagePosition},delete r.xPercentagePosition):(r.percentagePosition.x=r.xPercentagePosition,delete r.xPercentagePosition)),r.yPercentagePosition!=null&&(r.percentagePosition===void 0?(r.percentagePosition={y:r.yPercentagePosition},delete r.yPercentagePosition):(r.percentagePosition.y=r.yPercentagePosition,delete r.yPercentagePosition))),r)}_e();var ju=new jr({cacheSize:5});var wB;(n=>{function r(o,a){a||(a=o.name),ju.get(a)&&N.info(`Event "${a}" already exists, it will be overwritten`),o.prototype.id=a,ju.set(a,o);}n.add=r;function e(o){try{let a=ju.get(o);if(!a){N.error(`Event "${o}" not found, did you forget to register it with the eventDecorator?`);return}return new a,a}catch(a){N.error(`Error while getting Event "${o}"`,a);return}}n.get=e;function t(o){try{let a=ju.get(o);if(!a){N.error(`Event "${o}" not found, did you forget to register it with the eventDecorator?`);return}return new a}catch(a){N.error(`Error while getting Event "${o}"`,a);return}}n.getInstance=t;function i(){return Array.from(ju.values())}n.values=i;function s(o){return ju.has(o)}n.has=s;})(wB||={});var vi=wB;_e();async function t_(r){let e=gk(r.pixivnId);if(e)await e.setMemory(r);else throw new Error("[Pixi\u2019VN] The element "+r.pixivnId+" could not be created");return e}function gk(r){try{let e=Rt.get(r);return e?new e:void 0}catch(e){N.error(`Error while getting CanvasElement ${r}`,e);return}}var Po=class extends K{constructor(e){super(e),this.pixivnId=this.constructor.prototype.pixivnId||zu;}pixivnId=zu;get memory(){return Ao(this,{childrenExport:true})}set memory(e){}async setMemory(e){return this.memory=e,await this.importChildren(e),await Jr(this,e)}async importChildren(e){for(let t=0;t<e.elements.length;t++){let i=e.elements[t],s=await t_(i);this.addChild(s);}}_onEvents={};get onEvents(){return this._onEvents}onEvent(e,t){let i=t.prototype.id,s=vi.getInstance(i);return this._onEvents[e]=i,s?super.on(e,()=>{s.fn(e,this);}):N.error(`Event ${i} not found`),this}on(e,t,i){return super.on(e,t,i)}};Rt.add(Po,zu);async function Jr(r,e,t){let i=t?.ignoreScale||false,s=t?.end;"isRenderGroup"in e&&e.isRenderGroup!==void 0&&(r.isRenderGroup=e.isRenderGroup),"blendMode"in e&&e.blendMode!==void 0&&(r.blendMode=e.blendMode),"tint"in e&&e.tint!==void 0&&(r.tint=e.tint),"alpha"in e&&e.alpha!==void 0&&(r.alpha=e.alpha),"angle"in e&&e.angle!==void 0&&(r.angle=e.angle),"renderable"in e&&e.renderable!==void 0&&(r.renderable=e.renderable),"rotation"in e&&e.rotation!==void 0&&(r.rotation=e.rotation),!i&&"scale"in e&&e.scale!==void 0&&(typeof e.scale=="number"?r.scale.set(e.scale,e.scale):r.scale.set(e.scale.x,e.scale.y)),"pivot"in e&&e.pivot!==void 0&&(typeof e.pivot=="number"?r.pivot.set(e.pivot,e.pivot):r.pivot.set(e.pivot.x,e.pivot.y)),"position"in e&&e.position!==void 0&&r.position.set(e.position.x,e.position.y),"skew"in e&&e.skew!==void 0&&r.skew.set(e.skew.x,e.skew.y),"visible"in e&&e.visible!==void 0&&(r.visible=e.visible),"x"in e&&e.x!==void 0&&(r.x=e.x),"y"in e&&e.y!==void 0&&(r.y=e.y),"boundsArea"in e&&e.boundsArea!==void 0&&(r.boundsArea=e.boundsArea),"cursor"in e&&e.cursor!==void 0&&(r.cursor=e.cursor),"eventMode"in e&&e.eventMode!==void 0&&(r.eventMode=e.eventMode),"interactive"in e&&e.interactive!==void 0&&(r.interactive=e.interactive),"interactiveChildren"in e&&e.interactiveChildren!==void 0&&(r.interactiveChildren=e.interactiveChildren),"hitArea"in e&&e.hitArea!==void 0&&(r.hitArea=e.hitArea),s&&await s(),i||("width"in e&&e.width!==void 0&&(r.width=e.width),"height"in e&&e.height!==void 0&&(r.height=e.height));}var Ti=class r extends me{constructor(e){super(e),this.pixivnId=this.constructor.prototype.pixivnId||Wu;}pixivnId=Wu;_textureAlias;get textureAlias(){return this._textureAlias?this._textureAlias:this.texture.source.label}set textureAlias(e){this._textureAlias=e;}get memory(){return Oh(this)}set memory(e){}async setMemory(e){return this.memory=e,await Gh(this,e)}_onEvents={};get onEvents(){return this._onEvents}onEvent(e,t){let i=t.prototype.id,s=vi.getInstance(i);return this._onEvents[e]=i,s?(super.on(e,()=>{s.fn(e,this);}),this.interactive||(this.interactive=true,this.eventMode="dynamic")):N.error(`Event ${i} not found`),this}on(e,t,i){return super.on(e,t,i)}static from(e,t){let i=me.from(e,t),s=new r;return s.texture=i.texture,s}};Rt.add(Ti,Wu);async function Gh(r,e,t){let i=t?.ignoreTexture||false;if(await Jr(r,e),!i){if("textureImage"in e&&e.textureImage&&e.textureImage.image){let n=await Bs(e.textureImage.image);n&&(r.texture=n);}if("textureData"in e&&(e.textureData.alias&&(r.textureAlias=e.textureData.alias),e.textureData.url!=="EMPTY")){let n=e.textureData.url;e.textureData.alias&&ct.resolver.hasKey(e.textureData.alias)&&(n=e.textureData.alias);let o=await Bs(n);o&&(r.texture=o);}}let s=t?.half;if(s&&await s(),"anchor"in e&&e.anchor!==void 0&&(typeof e.anchor=="number"?r.anchor.set(e.anchor,e.anchor):r.anchor.set(e.anchor.x,e.anchor.y)),"roundPixels"in e&&e.roundPixels!==void 0&&(r.roundPixels=e.roundPixels),"onEvents"in e)for(let n in e.onEvents){let o=e.onEvents[n],a=vi.get(o);a&&r.onEvent(n,a);}}var qe=class r extends Ti{pixivnId=JS;constructor(e,t){e=Co(e);let i,s;e&&"align"in e&&e?.align!==void 0&&(i=e.align,delete e.align),e&&"percentagePosition"in e&&e?.percentagePosition!==void 0&&(s=e.percentagePosition,delete e.percentagePosition),super(e),t&&(this.textureAlias=t),i&&(this.align=i),s&&(this.percentagePosition=s);}get memory(){return {...Oh(this),pixivnId:this.pixivnId,align:this._align,percentagePosition:this._percentagePosition,loadIsStarted:this._loadIsStarted}}set memory(e){}async setMemory(e){this.memory=e,await Uh(this,e),this.reloadPosition();}static from(e,t){let i=me.from(e,t),s=new r;return s.texture=i.texture,s}_loadIsStarted=false;get loadIsStarted(){return this._loadIsStarted}async load(){return this._loadIsStarted=true,Bs(this.textureAlias).then(e=>{this._loadIsStarted=false,e&&(this.texture=e);}).catch(e=>{this._loadIsStarted=false,N.error("Error into ImageSprite.load()",e);})}set texture(e){super.texture=e,this.reloadPosition();}get texture(){return super.texture}get haveEmptyTexture(){return this.texture._source.label==="EMPTY"}_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=We(this.pivot,this.angle),t=We(this.scale,this.angle);return {x:qr("width",this.x,Zr(this),e.x,t.x<0,this.anchor.x),y:qr("height",this.y,Qr(this),e.y,t.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=We(this.pivot,this.angle),t=We(this.scale,this.angle);return qr("width",this.x,Zr(this),e.x,t.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=We(this.pivot,this.angle),t=We(this.scale,this.angle);return qr("height",this.y,Qr(this),e.y,t.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:Kr("width",this.x),y:Kr("height",this.y)}}get xPercentagePosition(){return Kr("width",this.x)}set xPercentagePosition(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.x=e,this.reloadPosition();}get yPercentagePosition(){return Kr("height",this.y)}set yPercentagePosition(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(){return this._align?{x:this._align.x||0,y:this._align.y||0,type:"align"}:this._percentagePosition?{x:this._percentagePosition.x||0,y:this._percentagePosition.y||0,type:"percentage"}:{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=We(this.pivot,this.angle),t=We(this.scale,this.angle);this._align.x!==void 0&&(super.x=bi("width",this._align.x,Zr(this),e.x,t.x<0,this.anchor.x)),this._align.y!==void 0&&(super.y=bi("height",this._align.y,Qr(this),e.y,t.y<0,this.anchor.y));}else this._percentagePosition&&(this._percentagePosition.x!==void 0&&(super.x=yi("width",this._percentagePosition.x)),this._percentagePosition.y!==void 0&&(super.y=yi("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;}};Rt.add(qe,JS);async function Uh(r,e,t){let i=t?.ignoreTexture||false;return e=Co(e),await Gh(r,e,{half:async()=>{"align"in e&&e.align!==void 0&&(r.align=e.align),"percentagePosition"in e&&e.percentagePosition!==void 0&&(r.percentagePosition=e.percentagePosition),i||"imageLink"in e&&e.imageLink!==void 0&&(r.textureAlias=e.imageLink),"loadIsStarted"in e&&e.loadIsStarted&&await r.load();},ignoreTexture:t?.ignoreTexture})}var qt=class r extends qe{constructor(e,t){let i,s,n;e&&"loop"in e&&e?.loop!==void 0&&(i=e.loop,delete e.loop),e&&"paused"in e&&e?.paused!==void 0&&(s=e.paused,delete e.paused),e&&"currentTime"in e&&e?.currentTime!==void 0&&(n=e.currentTime,delete e.currentTime),super(e,t),i&&(this.loop=i),s&&(this.paused=s),n&&(this.currentTime=n);}pixivnId=e1;get memory(){return {...super.memory,pixivnId:this.pixivnId,loop:this.loop,paused:this._paused,currentTime:this.currentTime}}set memory(e){}async setMemory(e){return this.memory=e,await n1(this,e)}static from(e,t){let i=me.from(e,t),s=new r;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&&this.texture.source.resource.play();}_currentTime=0;get currentTime(){return this.texture?.source?.resource?.currentTime||0}set currentTime(e){let t=this.duration;t&&e>=t&&(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}};Rt.add(qt,e1);async function n1(r,e,t){await Uh(r,e,{ignoreTexture:t?.ignoreTexture}),"loop"in e&&e.loop!==void 0&&(r.loop=e.loop),"currentTime"in e&&e.currentTime!==void 0&&(r.currentTime=e.currentTime),"paused"in e&&e.paused!==void 0&&(r.paused=e.paused);}_e();_e();var xk=new RegExp(`(${pB.join("|")})$`);function o1(r){let e=ct.cache.has(r)?ct.get(r):null;return e instanceof A&&(r=e.source?.label||r),xk.test(r)}var Et=class extends Po{constructor(e,t=[]){e=Co(e);let i,s,n;e&&"anchor"in e&&e?.anchor!==void 0&&(n=e.anchor,delete e.anchor),e&&"align"in e&&e?.align!==void 0&&(i=e.align,delete e.align),e&&"percentagePosition"in e&&e?.percentagePosition!==void 0&&(s=e.percentagePosition,delete e.percentagePosition),super(e),e=Co(e),t&&t.forEach(o=>{let a;o1(o)?a=new qt(void 0,o):a=new qe(void 0,o),this.addChild(a);}),n&&(this.anchor=n),i&&(this.align=i),s&&(this.percentagePosition=s);}get memory(){return {...super.memory,pixivnId:Kx,anchor:this._anchor,align:this._align,percentagePosition:this._percentagePosition,loadIsStarted:this._loadIsStarted}}set memory(e){}async setMemory(e){this.memory=e,await this.importChildren(e),await a1(this,e),this.reloadAnchor(),this.reloadPosition();}pixivnId=Kx;_loadIsStarted=false;get loadIsStarted(){return this._loadIsStarted}async load(){this._loadIsStarted=true;let e=Array(this.children.length);for(let t=0;t<this.children.length;t++)e[t]=this.children[t].load();return Promise.all(e).then(()=>{this._loadIsStarted=false,this.reloadAnchor(),this.reloadPosition();}).catch(t=>{this._loadIsStarted=false,N.error("Error into ImageContainer.load()",t);})}get texture(){return this.children.length>0?this.children[0].texture:new A}get haveEmptyTexture(){return this.children.some(e=>e.texture._source.label==="EMPTY")}_anchor;get anchor(){let e=super.pivot.x/this.width,t=super.pivot.y/this.height;return {x:e,y:t}}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=We(this.pivot,this.angle),t=We(this.scale,this.angle);return {x:qr("width",this.x,Zr(this),e.x,t.x<0,this.anchor.x),y:qr("height",this.y,Qr(this),e.y,t.y<0,this.anchor.y)}}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=We(this.pivot,this.angle),t=We(this.scale,this.angle);return qr("width",this.x,Zr(this),e.x,t.x<0,this.anchor.x)}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=We(this.pivot,this.angle),t=We(this.scale,this.angle);return qr("height",this.y,Qr(this),e.y,t.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:Kr("width",this.x),y:Kr("height",this.y)}}set xPercentagePosition(e){this._align&&(this._align=void 0),this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.x=e,this.reloadPosition();}get xPercentagePosition(){return Kr("width",this.x)}set yPercentagePosition(e){this._align&&(this._align=void 0),this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.y=e,this.reloadPosition();}get yPercentagePosition(){return Kr("height",this.y)}get positionType(){return this._align?"align":this._percentagePosition?"percentage":"pixel"}get positionInfo(){return this._align?{x:this._align.x||0,y:this._align.y||0,type:"align"}:this._percentagePosition?{x:this._percentagePosition.x||0,y:this._percentagePosition.y||0,type:"percentage"}:{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=We(this.pivot,this.angle),t=We(this.scale,this.angle);this._align.x!==void 0&&(super.x=bi("width",this._align.x,Zr(this),e.x,t.x<0)),this._align.y!==void 0&&(super.y=bi("height",this._align.y,Qr(this),e.y,t.y<0));}else this._percentagePosition&&(this._percentagePosition.x!==void 0&&(super.x=yi("width",this._percentagePosition.x)),this._percentagePosition.y!==void 0&&(super.y=yi("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;}};Rt.add(Et,Kx);async function a1(r,e,t){e=Co(e),Jr(r,e,{...t,end:async()=>{"anchor"in e&&e.anchor!==void 0&&(r.anchor=e.anchor),"align"in e&&e.align!==void 0&&(r.align=e.align),"percentagePosition"in e&&e.percentagePosition!==void 0&&(r.percentagePosition=e.percentagePosition),"loadIsStarted"in e&&e.loadIsStarted&&await r.load();}});}_e();var wo=class extends hr{constructor(e){super(e),this.pixivnId=this.constructor.prototype.pixivnId||Xu;}pixivnId=Xu;get memory(){return s1(this)}set memory(e){}async setMemory(e){return this.memory=e,await u1(this,e)}_onEvents={};get onEvents(){return this._onEvents}onEvent(e,t){let i=t.prototype.id,s=vi.getInstance(i);return this._onEvents[e]=i,s?(super.on(e,()=>{s.fn(e,this);}),this.interactive||(this.interactive=true,this.eventMode="dynamic")):N.error(`Event ${i} not found`),this}on(e,t,i){return super.on(e,t,i)}};Rt.add(wo,Xu);async function u1(r,e){if(await Jr(r,e),"anchor"in e&&e.anchor!==void 0&&(typeof e.anchor=="number"?r.anchor.set(e.anchor,e.anchor):r.anchor.set(e.anchor.x,e.anchor.y)),"text"in e&&e.text!==void 0&&(r.text=e.text),"resolution"in e&&e.resolution!==void 0&&(r.resolution=e.resolution),"style"in e&&e.style!==void 0&&(r.style=e.style),"roundPixels"in e&&e.roundPixels!==void 0&&(r.roundPixels=e.roundPixels),"onEvents"in e)for(let t in e.onEvents){let i=e.onEvents[t],s=vi.get(i);s&&r.onEvent(t,s);}}var Ht=class{constructor(e,t,i){this.args=e,this.duration=t,this.priority=i,this.id=this.constructor.prototype.id;}id="ticker_id_not_set";args;duration;priority;fn(e,t,i,s){throw new Error("[Pixi\u2019VN] The method TickerBase.fn() must be overridden")}onEndOfTicker(e,t,i){let s="aliasToRemoveAfter"in i&&i.aliasToRemoveAfter||[];typeof s=="string"&&(s=[s]);let n="tickerAliasToResume"in i&&i.tickerAliasToResume||[];typeof n=="string"&&(n=[n]),Ie.onEndOfTicker(t,{aliasToRemoveAfter:s,tickerAliasToResume:n});}};_e();var qu=new jr({cacheSize:5});var BB;(n=>{function r(o,a){a||(a=o.name),qu.get(a)&&N.info(`Ticker "${a}" already exists, it will be overwritten`),o.prototype.id=a,qu.set(a,o);}n.add=r;function e(o){try{let a=qu.get(o);if(!a){N.error(`Event "${o}" not found, did you forget to register it with the tickerDecorator?`);return}return a}catch(a){N.error(`Error while getting Event "${o}"`,a);return}}n.get=e;function t(o,a,u,l){try{let c=qu.get(o);if(!c){N.error(`Ticker "${o}" not found, did you forget to register it with the tickerDecorator?`);return}return new c(a,u,l)}catch(c){N.error(`Error while getting Ticker "${o}"`,c);return}}n.getInstance=t;function i(){return Array.from(qu.values())}n.values=i;function s(o){return qu.has(o)}n.has=s;})(BB||={});var Vt=BB;_e();function Rs(r){return (r instanceof qe||r instanceof Et)&&r.haveEmptyTexture?false:!(r instanceof me&&r.texture?.label=="EMPTY")}function Ms(r,e,t){let{limit:i}=t;r[e]===void 0||!t||r[e]===i||(typeof r[e]=="number"?t.type==="linear"?r[e]=l1(r[e],t):t.type==="exponential"&&(r[e]=c1(r[e],t)):r[e]!==void 0&&typeof r[e]=="object"&&r[e].haveOwnProperty("x")&&r[e].haveOwnProperty("y")&&typeof r[e].x=="number"&&typeof r[e].y=="number"&&(t.type==="linear"?(r[e].x=l1(r[e].x,t),r[e].y=l1(r[e].y,t)):t.type==="exponential"&&(r[e].x=c1(r[e].x,t),r[e].y=c1(r[e].y,t))));}function l1(r,e){let{limit:t,amt:i}=e;if(t!==void 0){if(r>t&&i>0)return t;if(r<t&&i<0)return t}return r+i}function c1(r,e){let{limit:t}=e;if(t!==void 0){if(r>t&&e.percentage>0)return t;if(r<t&&e.percentage<0)return t}return r+r*e.percentage}var _k=5,Ku=class extends Ht{constructor(e={},t,i){super(e,t,i);}fn(e,t,i,s){t.speed===void 0&&(t.duration===void 0?t.speed=_k:t.speed=600/(t.duration*60));let{type:n="hide",startOnlyIfHaveTexture:o,speedProgression:a}=t,u=this.speedConvert(t.speed),l=this.getLimit(t);n==="hide"&&l<0&&(l=0),n==="show"&&l>1&&(l=1),i.filter(c=>{let h=Ie.find(c);return !(!h||o&&!Rs(h))}).forEach(c=>{let h=Ie.find(c);if(h&&h instanceof K){if(n==="show"&&h.alpha<l?h.alpha+=u*e.deltaTime:n==="hide"&&h.alpha>l&&(h.alpha-=u*e.deltaTime),n==="show"&&h.alpha>=l){this.onEndOfTicker(c,s,t);return}else if(n==="hide"&&h.alpha<=l){this.onEndOfTicker(c,s,t);return}if(u<1e-5&&!(a&&a.type=="linear"&&a.amt!=0)){N.warn("The speed of the FadeAlphaTicker must be greater than 0."),this.onEndOfTicker(c,s,t,{editAlpha:false});return}}}),a&&Ms(t,"speed",a);}onEndOfTicker(e,t,i,s={editAlpha:true}){typeof e=="string"&&(e=[e]),e.forEach(n=>{let o=Ie.find(n);if(o&&s.editAlpha){let a=this.getLimit(i);o.alpha=a;}}),super.onEndOfTicker(e,t,i);}getLimit(e){let{type:t="hide",limit:i=t==="hide"?0:1}=e;return i}speedConvert(e){return e/600}};Vt.add(Ku);_e();var bk=10;function yk(r,e){let t=St(r.destination);if(t.type==="align"){let i,s;e instanceof me&&(i=e.anchor.x,s=e.anchor.y);let n=We(e.pivot,e.angle),o=We(e.scale,e.angle);t.x=bi("width",t.x,Zr(e),n.x,o.x<0,i),t.y=bi("height",t.y,Qr(e),n.y,o.y<0,s);}return t.type==="percentage"&&(t.x=yi("width",t.x),t.y=yi("height",t.y)),t}var Bo=class extends Ht{fn(e,t,i,s){t.speed===void 0&&(t.speed=bk);let{speed:n,startOnlyIfHaveTexture:o,speedProgression:a}=t;i.filter(u=>{let l=Ie.find(u);return !(!l||o&&!Rs(l))}).forEach(u=>{let l=Ie.find(u);if(l&&l instanceof K){let c=yk(t,l),h=c.x-l.x,d=c.y-l.y,p=h>0?1:-1,g=d>0?1:-1,b,_;if(typeof n=="number"){let x=this.speedConvert(n);h===0||d===0?b=_=x:(b=Math.abs(h/(h+d))*x,_=Math.abs(d/(h+d))*x);}else b=this.speedConvert(n.x),_=this.speedConvert(n.y);if(b>0){l.x+=p*b*e.deltaTime;let x=c.x-l.x;(p<0&&x>0||p>0&&x<0)&&(l.x=c.x);}if(_>0){l.y+=g*_*e.deltaTime;let x=c.y-l.y;(g<0&&x>0||g>0&&x<0)&&(l.y=c.y);}if(l.x==c.x&&l.y==c.y){this.onEndOfTicker(u,s,t);return}else if(b<1e-5&&_<1e-5&&!(a&&a.type=="linear"&&a.amt!=0)){N.warn("The speed of the MoveTicker must be greater than 0."),this.onEndOfTicker(u,s,t,{editPosition:false});return}}}),a&&Ms(t,"speed",a);}onEndOfTicker(e,t,i,s={editPosition:true}){typeof e=="string"&&(e=[e]),e.forEach(n=>{let o=Ie.find(n);if(o){let a=i.destination;s.editPosition&&(o instanceof qe||o instanceof Et?o.positionInfo=a:(o.x=a.x,o.y=a.y));}}),super.onEndOfTicker(e,t,i);}speedConvert(e){return e*(66/400)}};Vt.add(Bo);_e();var vk=1,Lh=class extends Ht{constructor(e={},t,i){super(e,t,i);}fn(e,t,i,s){t.speed===void 0&&(t.speed=vk);let{clockwise:n=true,speedProgression:o,limit:a}=t,u=this.speedConvert(t.speed);i.filter(l=>{let c=Ie.find(l);return !(!c||t.startOnlyIfHaveTexture&&!Rs(c))}).forEach(l=>{let c=Ie.find(l);if(c&&c instanceof K&&(n?c.rotation+=u*e.deltaTime:c.rotation-=u*e.deltaTime,a!==void 0&&(n&&c.angle>=a?(c.angle=a,this.onEndOfTicker(l,s,t)):!n&&c.angle<=a&&(c.angle=a,this.onEndOfTicker(l,s,t))),u<1e-5&&!(o&&o.type=="linear"&&o.amt!=0))){N.warn("The speed of the RotateTicker must be greater than 0."),this.onEndOfTicker(l,s,t,{editRotation:false});return}}),o&&Ms(t,"speed",o);}onEndOfTicker(e,t,i,s={editRotation:true}){let{limit:n}=i;typeof e=="string"&&(e=[e]),e.forEach(o=>{let a=Ie.find(o);a&&s.editRotation&&n!==void 0&&(a.angle=n);}),super.onEndOfTicker(e,t,i);}speedConvert(e){return e/100}};Vt.add(Lh);_e();var Tk=10,Zu=class extends Ht{constructor(e={},t,i){super(e,t,i);}fn(e,t,i,s){t.speed===void 0&&(t.speed=Tk);let{speed:n,type:o="zoom",startOnlyIfHaveTexture:a,speedProgression:u}=t,l,c;typeof n=="number"?(l=this.speedConvert(n),c=this.speedConvert(n)):(l=this.speedConvert(n.x),c=this.speedConvert(n.y));let h=this.getLimit(t);i.filter(d=>{let p=Ie.find(d);return !(!p||a&&!Rs(p))}).forEach(d=>{let p=Ie.find(d);if(p&&p instanceof K){if(o==="zoom"&&(p.scale.x<h.x||p.scale.y<h.y)?(p.scale.x+=l*e.deltaTime,p.scale.y+=c*e.deltaTime):o==="unzoom"&&(p.scale.x>h.x||p.scale.y>h.y)&&(p.scale.x-=l*e.deltaTime,p.scale.y-=c*e.deltaTime),o==="zoom"){if(p.scale.x>h.x&&(p.scale.x=h.x),p.scale.y>h.y&&(p.scale.y=h.y),p.scale.x>=h.x&&p.scale.y>=h.y){this.onEndOfTicker(d,s,t);return}}else if(o==="unzoom"&&(p.scale.x<h.x&&(p.scale.x=h.x),p.scale.y<h.y&&(p.scale.y=h.y),p.scale.x<=h.x&&p.scale.y<=h.y)){this.onEndOfTicker(d,s,t);return}if((l<1e-5&&c<1e-5||l<1e-5&&p.scale.y==h.y||c<1e-5&&p.scale.x==h.x)&&!(u&&u.type=="linear"&&u.amt!=0)){N.warn("The speed of the ZoomTicker must be greater than 0."),this.onEndOfTicker(d,s,t,{editScale:false});return}}}),u&&Ms(t,"speed",u);}speedConvert(e){return e/600}onEndOfTicker(e,t,i,s={editScale:true}){let{isZoomInOut:n}=i;typeof e=="string"&&(e=[e]),e.forEach(o=>{let a=Ie.find(o);if(a){if(s.editScale){let u=this.getLimit(i);a.scale.x=u.x,a.scale.y=u.y;}if(n){let{pivot:u,position:l}=n;a.pivot=u.x,a.position=l;}}}),super.onEndOfTicker(e,t,i);}getLimit(e){let{type:t="zoom",limit:i}=e,s=t==="zoom"?1/0:0,n=t==="zoom"?1/0:0;return i&&(typeof i=="number"?(s=i,n=i):(s=i.x,n=i.y)),{x:s,y:n}}};Vt.add(Zu);_e();_e();var Ie=new Nh;Nt.init({getScreen:()=>Ie.screen});var Ck={extension:{type:"sceneProperties",name:"additional-positions"},testNode(r){return r instanceof qe||r instanceof qt||r instanceof Et},testProp(r){switch(r){case "xAlign":case "yAlign":case "xPercentagePosition":case "yPercentagePosition":case "positionType":return true;default:return false}},setProperty(r,e,t){if(r instanceof qe||r instanceof qt||r instanceof Et)switch(e){case "xAlign":r.xAlign=t/100;break;case "yAlign":r.yAlign=t/100;break;case "xPercentagePosition":r.xPercentagePosition=t/100;break;case "yPercentagePosition":r.yPercentagePosition=t/100;break}},getProperties(r){return [{value:r.positionType,prop:"positionType",entry:{section:"Transform",type:"text",label:"Position Type"}},{value:r.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:r.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:r.xPercentagePosition*100,prop:"xPercentagePosition",entry:{section:"Transform",type:"range",label:"X Percentage Position",tooltip:"0% is left, 100% is right",options:{min:0,max:100}}},{value:r.yPercentagePosition*100,prop:"yPercentagePosition",entry:{section:"Transform",type:"range",label:"Y Percentage Position",tooltip:"0% is top, 100% is bottom",options:{min:0,max:100}}}]}},RB=Ck;function Pk(r,e){let t=0;return async(...i)=>{let s=Date.now();if(s-t>=e)return t=s,await r(...i)}}var P=class r{constructor(){}static _app=void 0;static get app(){if(!r._app)throw new Error("[Pixi\u2019VN] CanvasManagerStatic.app is undefined");return r._app}static get gameLayer(){let e=this.app.stage.getChildByLabel(Mr);return e||(e=new K,e.label=Mr,this.app.stage.addChild(e)),e}static htmlLayers=[];static canvasWidth=300;static canvasHeight=300;static _isInitialized=false;static async init(e,t,i,s,n){return r.canvasWidth=t,r.canvasHeight=i,r._app=new Wc,r.app.init({resolution:window.devicePixelRatio||1,autoDensity:true,width:t,height:i,...s}).then(()=>{let{app:o=r.app,extensions:a=[],...u}=n||{};mB({app:o,extensions:[RB,...a],...u}),r._isInitialized=true,r.addCanvasIntoHTMLElement(e),window.addEventListener("resize",r.resize),r.resize(),r.gameLayer;})}static addCanvasIntoHTMLElement(e){r._isInitialized?e.appendChild(r.app.canvas):N.error("GameWindowManager is not initialized");}static addHtmlLayer(e,t,i={position:"absolute",pointerEvents:"none"}){let s=document.createElement("div");s.setAttribute("id",e),s.style.position=i.position,s.style.pointerEvents=i.pointerEvents;let n=t.appendChild(s);return r.htmlLayers.push(s),r.resize(),n}static removeHtmlLayer(e){let t=r.htmlLayers.find(i=>i.id===e);t&&(t.remove(),r.htmlLayers=r.htmlLayers.filter(i=>i.id!==e));}static getHtmlLayer(e){return r.htmlLayers.find(t=>t.id===e)}static get screenScale(){let e=Math.max(document.documentElement.clientWidth,window.innerWidth||0),t=Math.max(document.documentElement.clientHeight,window.innerHeight||0);return Math.min(e/r.canvasWidth,t/r.canvasHeight)}static get screenWidth(){return Math.floor(r.screenScale*r.canvasWidth)}static get screenHeight(){return Math.floor(r.screenScale*r.canvasHeight)}static get horizontalMargin(){return (Math.max(document.documentElement.clientWidth,window.innerWidth||0)-r.screenWidth)/2}static get verticalMargin(){return (Math.max(document.documentElement.clientHeight,window.innerHeight||0)-r.screenHeight)/2}static async resize(){await Pk(async()=>{if(r._isInitialized){let i=r.app.canvas.style;i.width=`${r.screenWidth}px`,i.height=`${r.screenHeight}px`,i.marginLeft=`${r.horizontalMargin}px`,i.marginRight=`${r.horizontalMargin}px`,i.marginTop=`${r.verticalMargin}px`,i.marginBottom=`${r.verticalMargin}px`;}let t=r.htmlLayers.map(i=>{i.style.width=`${r.screenWidth}px`,i.style.height=`${r.screenHeight}px`,i.style.marginLeft=`${r.horizontalMargin}px`,i.style.marginRight=`${r.horizontalMargin}px`,i.style.marginTop=`${r.verticalMargin}px`,i.style.marginBottom=`${r.verticalMargin}px`;});await Promise.all(t);},10)();}static get childrenAliasesOrder(){return r.gameLayer.children.filter(e=>e.label).sort((e,t)=>r.gameLayer.getChildIndex(e)-r.gameLayer.getChildIndex(t)).map(e=>e.label)}static get currentTickersWithoutCreatedBySteps(){return Object.fromEntries(Object.entries(r._currentTickers).filter(([e,t])=>!t.createdByTicketSteps))}static _currentTickers={};static _currentTickersSequence={};static _currentTickersTimeouts={};static _tickersToCompleteOnStepEnd={tikersIds:[],stepAlias:[]};static _tickersOnPause={};static generateTickerId(e){try{return (0,MB.default)(JSON.stringify(e)).toString()+"_"+Math.random().toString(36).substring(7)}catch(t){throw new Error(`[Pixi\u2019VN] Error to generate ticker id: ${t}`)}}static addTickerTimeoutInfo(e,t,i,s){typeof e=="string"&&(e=[e]),r._currentTickersTimeouts[i]={aliases:e,ticker:t,canBeDeletedBeforeEnd:s};}static removeTickerTimeoutInfo(e){typeof e!="string"&&(e=e.toString()),r._currentTickersTimeouts[e]&&delete r._currentTickersTimeouts[e];}static removeTickerTimeout(e){typeof e!="string"&&(e=e.toString()),clearTimeout(Number(e)),r.removeTickerTimeoutInfo(e);}static removeTickerTimeoutsByAlias(e,t){Object.entries(r._currentTickersTimeouts).forEach(([i,s])=>{let n=s.aliases.filter(o=>o!==e);if(n.length===0){let o=s.canBeDeletedBeforeEnd;(!t||o)&&r.removeTickerTimeout(i);}else r._currentTickersTimeouts[i].aliases=n;});}};var Qu="aliasToRemoveAfter";var Nh=class{get app(){return P.app}get gameLayer(){return P.gameLayer}get isInitialized(){return P._isInitialized}get htmlLayout(){return P.htmlLayers[0]}set htmlLayout(e){this.addHtmlLayer("ui",e);}get canvasWidth(){return P.canvasWidth}get canvasHeight(){return P.canvasHeight}set canvasWidth(e){P.canvasWidth=e;}set canvasHeight(e){P.canvasHeight=e;}get screen(){return this.app.screen}async init(e,t,i,s,n){if(typeof t=="number"&&typeof i=="number")return await P.init(e,t,i,s,n);if(typeof t!="number"&&typeof i!="number")return await P.init(e,t.width,t.height,t,i);throw new Error("Invalid parameters")}initializeHTMLLayout(e){this.addHtmlLayer("ui",e);}get children(){return P.gameLayer.children}async copyCanvasElementProperty(e,t){if(typeof t=="string"){let i=this.find(t);if(i)t=i;else {N.error(`Canvas element ${t} not found`);return}}if(typeof e=="string"){let i=this.find(e);if(i)e=i;else {N.error(`Canvas element ${e} not found`);return}}e instanceof K&&(e=e.memory),"isRenderGroup"in e&&delete e.isRenderGroup,"scale"in e&&delete e.scale,"visible"in e&&delete e.visible,"boundsArea"in e&&delete e.boundsArea,"text"in e&&delete e.text,"resolution"in e&&delete e.resolution,"style"in e&&delete e.style,"height"in e&&delete e.height,"width"in e&&delete e.width,t instanceof qt?await n1(t,e,{ignoreTexture:true}):t instanceof qe?await Uh(t,e,{ignoreTexture:true}):t instanceof Ti?await Gh(t,e,{ignoreTexture:true}):t instanceof wo?await u1(t,e):t instanceof Et?await a1(t,e):t instanceof K&&await Jr(t,e);}transferTickers(e,t,i="move"){P._currentTickersSequence[e]&&(i==="move"?P._currentTickersSequence[t]=St(P._currentTickersSequence[e]):i==="duplicate"&&(P._currentTickersSequence[t]=St(P._currentTickersSequence[e]))),Object.entries(P._currentTickers).forEach(([s,n])=>{if(n.createdByTicketSteps?.canvasElementAlias===e&&this.removeTicker(s),n.canvasElementAliases.includes(e)&&(i==="move"?n.canvasElementAliases=n.canvasElementAliases.map(o=>o===e?t:o):i==="duplicate"&&n.canvasElementAliases.find(o=>o===e)&&n.canvasElementAliases.push(t),n.args.hasOwnProperty(Qu))){let o=n.args.aliasToRemoveAfter;typeof o=="string"&&(o=[o]),Array.isArray(o)&&(i==="move"?n.args.aliasToRemoveAfter=o.map(a=>a===e?t:a):i==="duplicate"&&o.find(a=>a===e)&&(n.args.aliasToRemoveAfter=[...o,t]));}}),Object.values(P._currentTickersTimeouts).forEach(s=>{s.aliases.includes(e)&&(i==="move"?s.aliases=s.aliases.map(n=>n===e?t:n):i==="duplicate"&&s.aliases.find(n=>n===e)&&s.aliases.push(t));}),P._currentTickersSequence[t]&&Object.keys(P._currentTickersSequence[t]).forEach(s=>{this.runTickersSequence(t,s);}),i==="duplicate"&&P._currentTickersSequence[e]&&Object.keys(P._currentTickersSequence[e]).forEach(s=>{this.runTickersSequence(e,s);});}add(e,t,i={}){if(e===Mr){N.error(`The alias ${Mr} is reserved`);return}let s=this.find(e),n=i?.ignoreOldStyle;s&&!n&&this.copyCanvasElementProperty(s,t);let o=i.zIndex;s&&!this.gameLayer.children.includes(s)?N.error(`The canvas element ${e} exist in the memory but it is not on the canvas, so the zIndex is not set`):s&&(o===void 0&&(o=this.gameLayer.getChildIndex(s)),this.remove(e,{ignoreTickers:true})),o!==void 0?(t.label=e,this.gameLayer.addChildAt(t,o)):(t.label=e,this.gameLayer.addChild(t));}remove(e,t={}){if(e===Mr){N.error(`The alias ${Mr} is reserved`);return}let i=t.ignoreTickers;typeof e=="string"&&(e=[e]),e.forEach(s=>{this.gameLayer.getChildrenByLabel(s).forEach(n=>{this.gameLayer.removeChild(n),!i&&this.unlinkComponentFromTicker(s);});});}find(e){if(e===Mr)return this.gameLayer;let t=this.gameLayer.getChildByLabel(e);if(t)return t}canvasElementIsOnCanvas(e){return this.gameLayer.children.includes(e)}removeAll(){this.gameLayer.removeChildren(),this.removeAllTickers();}editAlias(e,t,i={}){let s=this.find(e);s&&(s.label=t),!i.ignoreTickers&&this.transferTickers(e,t,"move");}get currentTickers(){return P._currentTickers}get currentTickersSteps(){return P._currentTickersSequence}addTicker(e,t){let i=t.id;if(typeof e=="string"&&(e=[e]),!Vt.getInstance(i,t.args,t.duration,t.priority)){N.error(`Ticker ${i} not found`);return}let s={fn:()=>{},id:i,args:St(t.args),canvasElementAliases:e,priority:t.priority,duration:t.duration,onEndOfTicker:()=>{}},n=P.generateTickerId(s);if(this.pushTicker(n,s,t),this.pushEndOfTicker(n,s,t),t.duration){let o=setTimeout(()=>{P.removeTickerTimeoutInfo(o),P._currentTickersTimeouts[o.toString()]&&this.onEndOfTicker(n,{aliasToRemoveAfter:Qu in t.args?t.args.aliasToRemoveAfter||[]:[],tickerAliasToResume:"tickerAliasToResume"in t.args?t.args.tickerAliasToResume||[]:[],ignoreTickerSteps:true});},t.duration*1e3);P.addTickerTimeoutInfo(e,i,o.toString(),true);}return n}pushTicker(e,t,i){P._currentTickers[e]=t,t.fn=s=>{let n=P._currentTickers[e];if(n){let o=n.canvasElementAliases;if(t.createdByTicketSteps){if(this.isTickerPaused(t.createdByTicketSteps.canvasElementAlias,t.createdByTicketSteps.id))return}else o=o.filter(a=>!this.isTickerPaused(a,e));i?.fn(s,n.args,o,e);}},this.app.ticker.add(t.fn,void 0,t.priority);}pushEndOfTicker(e,t,i){t.onEndOfTicker=()=>{i.onEndOfTicker(t.canvasElementAliases,e,t.args);};}addTickersSequence(e,t,i=0){if(t.length==0){N.warn("The steps of the tickers is empty");return}e in P._currentTickersSequence||(P._currentTickersSequence[e]={});let s={currentStepNumber:i,steps:t.map(o=>o===kh||o.hasOwnProperty("type")&&o.type==="pause"?o:{ticker:o.id,args:St(o.args),duration:o.duration})},n=P.generateTickerId(s);return P._currentTickersSequence[e][n]=s,this.runTickersSequence(e,n),n}runTickersSequence(e,t){if(!P._currentTickersSequence[e]||!P._currentTickersSequence[e][t])return;let i=P._currentTickersSequence[e][t].steps[P._currentTickersSequence[e][t].currentStepNumber];if(i===kh&&(i=P._currentTickersSequence[e][t].steps[0],P._currentTickersSequence[e][t].currentStepNumber=0,i===kh)){N.error("TikersSteps has a RepeatType in the first step");return}if(i.hasOwnProperty("type")&&i.type==="pause"){let u=setTimeout(()=>{let l=P._currentTickersTimeouts[u.toString()];l&&l.aliases.forEach(c=>{this.nextTickerStep(c,t);}),P.removeTickerTimeoutInfo(u);},i.duration*1e3);P.addTickerTimeoutInfo(e,"steps",u.toString(),false);return}let s=Vt.getInstance(i.ticker,i.args,i.duration,i.priority);if(!s){N.error(`Ticker ${i.ticker} not found`);return}let n=s.id,o={fn:()=>{},id:n,args:St(s.args),canvasElementAliases:[e],priority:s.priority,duration:s.duration,createdByTicketSteps:{canvasElementAlias:e,id:t},onEndOfTicker:()=>{}},a=P.generateTickerId(o);if(this.pushTicker(a,o,s),s.duration){let u=setTimeout(()=>{let l=P._currentTickersTimeouts[u.toString()];l&&(this.onEndOfTicker(a,{aliasToRemoveAfter:Qu in s.args?s.args.aliasToRemoveAfter||[]:[],tickerAliasToResume:"tickerAliasToResume"in s.args?s.args.tickerAliasToResume||[]:[],ignoreTickerSteps:true}),l.aliases.forEach(c=>{this.nextTickerStep(c,t);})),P.removeTickerTimeoutInfo(u);},s.duration*1e3);P.addTickerTimeoutInfo(e,n,u.toString(),false);}}nextTickerStep(e,t){if(P._currentTickersSequence[e]&&P._currentTickersSequence[e][t]){let i=P._currentTickersSequence[e][t];i.currentStepNumber+1<i.steps.length?(i.currentStepNumber++,P._currentTickersSequence[e][t]=i,this.runTickersSequence(e,t)):t&&P._currentTickersSequence[e]&&P._currentTickersSequence[e][t]&&(delete P._currentTickersSequence[e][t],Object.entries(P._currentTickers).forEach(([s,n])=>{n.createdByTicketSteps?.canvasElementAlias===e&&n.createdByTicketSteps.id===t&&this.removeTicker(s);}));}}onEndOfTicker(e,t){let i=P._currentTickers[e],s=t.ignoreTickerSteps||false;this.remove(t.aliasToRemoveAfter),this.resumeTicker(t.tickerAliasToResume),i&&(this.removeTicker(e),!s&&i.duration==null&&i.createdByTicketSteps&&this.nextTickerStep(i.createdByTicketSteps.canvasElementAlias,i.createdByTicketSteps.id));}unlinkComponentFromTicker(e,t){if(typeof e=="string"&&(e=[e]),!t){e.forEach(s=>{Object.entries(P._currentTickers).forEach(([n,o])=>{o.canvasElementAliases.includes(s)&&(o.canvasElementAliases.length===1?this.removeTicker(n):o.canvasElementAliases=o.canvasElementAliases.filter(a=>a!==s));}),P._currentTickersSequence[s]&&delete P._currentTickersSequence[s],P.removeTickerTimeoutsByAlias(s,false);});return}let i;typeof t=="string"?i=t:t instanceof Ht?i=t.id:i=t.prototype.id,e.forEach(s=>{P._currentTickersSequence[s]&&Object.entries(P._currentTickersSequence[s]).forEach(([n,o])=>{o.steps.find(a=>typeof a=="object"&&"ticker"in a&&a.ticker===i)&&delete P._currentTickersSequence[s][n];});}),Object.entries(P._currentTickers).forEach(([s,n])=>{n.id===i&&(P._currentTickers[s].canvasElementAliases=n.canvasElementAliases.filter(o=>!e.includes(o)));}),Object.entries(P._currentTickersTimeouts).forEach(([s,n])=>{n.ticker===i&&n.canBeDeletedBeforeEnd&&(P._currentTickersTimeouts[s].aliases=n.aliases.filter(o=>!e.includes(o)));}),this.removeTickersWithoutAssociatedCanvasElement();}removeTickersWithoutAssociatedCanvasElement(){Object.entries(P._currentTickers).forEach(([e,t])=>{t.canvasElementAliases=t.canvasElementAliases.filter(i=>this.find(i)),t.canvasElementAliases.length===0&&this.onEndOfTicker(e,{aliasToRemoveAfter:Qu in t.args?t.args.aliasToRemoveAfter:[],tickerAliasToResume:"tickerAliasToResume"in t.args?t.args.tickerAliasToResume:[],ignoreTickerSteps:true});}),Object.entries(P._currentTickersSequence).forEach(([e,t])=>{t===void 0&&delete P._currentTickersSequence[e];}),Object.entries(P._currentTickersTimeouts).forEach(([e,{aliases:t}])=>{t.length===0&&P.removeTickerTimeout(e);});}removeAllTickers(){P._currentTickersSequence={},Object.keys(P._currentTickers).forEach(e=>{this.removeTicker(e);}),P._currentTickers={};for(let e in P._currentTickersTimeouts)P.removeTickerTimeout(e);P._tickersToCompleteOnStepEnd={tikersIds:[],stepAlias:[]},P._tickersOnPause={};}removeTicker(e){typeof e=="string"&&(e=[e]),e.forEach(t=>{let i=P._currentTickers[t];if(i){if(i.args.hasOwnProperty(Qu)){let s=i.args.aliasToRemoveAfter;this.remove(s);}this.app.ticker.remove(i.fn),delete P._currentTickers[t];}});}pauseTicker(e,t={}){let i=P._tickersOnPause[e];if(!i){P._tickersOnPause[e]=t;return}t.tickerIdsExcluded&&(i.tickerIdsExcluded?P._tickersOnPause[e].tickerIdsExcluded=[...i.tickerIdsExcluded,...t.tickerIdsExcluded]:P._tickersOnPause[e].tickerIdsExcluded=t.tickerIdsExcluded),t.tickerIdsIncluded&&(i.tickerIdsIncluded?P._tickersOnPause[e].tickerIdsIncluded=[...i.tickerIdsIncluded,...t.tickerIdsIncluded]:P._tickersOnPause[e].tickerIdsIncluded=t.tickerIdsIncluded);}resumeTicker(e){typeof e=="string"&&(e=[e]),e.forEach(t=>{delete P._tickersOnPause[t];});}isTickerPaused(e,t){let i=P._tickersOnPause[e];if(i){if(t){if("tickerIdsIncluded"in i&&i.tickerIdsIncluded)return i.tickerIdsIncluded.includes(t);if("tickerIdsExcluded"in i&&i.tickerIdsExcluded)return !i.tickerIdsExcluded.includes(t)}return true}return false}completeTickerOnStepEnd(e){e.alias?P._tickersToCompleteOnStepEnd.stepAlias.push({id:e.id,alias:e.alias}):P._tickersToCompleteOnStepEnd.tikersIds.push({id:e.id});}forceCompletionOfTicker(e,t){if(t){let i=P._currentTickersSequence[t];i&&i[e]&&(i[e].steps.includes(kh)?N.error(`The ticker alias: ${t} id: ${e} contains a RepeatType, so it can't be forced to complete`,i[e]):i[e].steps.forEach(s=>{if(typeof s=="object"&&"ticker"in s){let n=Vt.getInstance(s.ticker,s.args,s.duration,s.priority);n&&n.onEndOfTicker([t],e,s.args);}}));}else {let i=P._currentTickers[e];i&&i.onEndOfTicker();}}addLayer(e,t){if(e===Mr){N.error(`The alias ${Mr} is reserved`);return}return t.label=e,P.app.stage.addChild(t)}getLayer(e){return P.app.stage.getChildByLabel(e)}removeLayer(e){P.app.stage.getChildrenByLabel(e);}addHtmlLayer(e,t,i){return P.addHtmlLayer(e,t,i)}removeHtmlLayer(e){return P.removeHtmlLayer(e)}getHtmlLayer(e){return P.getHtmlLayer(e)}async extractImage(){return (await this.app.renderer.extract.image(this.gameLayer)).src}clear(){this.removeAll();}export(){let e={};return this.children.forEach(t=>{t.label&&(e[t.label]=i1(t));}),{tickers:St(P.currentTickersWithoutCreatedBySteps),tickersSteps:St(P._currentTickersSequence),elements:St(e),stage:St(Ao(this.gameLayer)),elementAliasesOrder:St(P.childrenAliasesOrder),tickersOnPause:St(P._tickersOnPause),tickersToCompleteOnStepEnd:St(P._tickersToCompleteOnStepEnd)}}async restore(e){try{let t={};if(e.hasOwnProperty("elementAliasesOrder")&&e.hasOwnProperty("elements")){let i=e.elements,s=e.elementAliasesOrder,n=s.filter(a=>i[a]).map(a=>t_(i[a])),o=await Promise.all(n);this.clear(),o.forEach((a,u)=>{let l=s[u];this.add(l,a),P.childrenAliasesOrder.push(l);});}else {N.error("The data does not have the properties elementAliasesOrder and elements");return}if(e.hasOwnProperty("stage")&&e.hasOwnProperty("stage")?Jr(this.gameLayer,e.stage,{ignoreScale:!0}):N.error("The data does not have the properties stage"),e.hasOwnProperty("tickers")){let i=e.tickers;Object.entries(i).forEach(([s,n])=>{let o=n.canvasElementAliases,a=Vt.getInstance(n.id,n.args,n.duration,n.priority);if(a){let u=this.addTicker(o,a);u&&(t[s]=u);}else N.error(`Ticker ${n.id} not found`);});}if(e.hasOwnProperty("tickersSteps")){let i=e.tickersSteps;Object.entries(i).forEach(([s,n])=>{P._currentTickersSequence[s]=n,Object.keys(n).forEach(o=>{this.runTickersSequence(s,o);});});}if(e.hasOwnProperty("tickersOnPause")){let i=e.tickersOnPause;Object.keys(i).forEach(s=>{let n=i[s];"tickerIdsExcluded"in n&&n.tickerIdsExcluded&&(i[s].tickerIdsExcluded=n.tickerIdsExcluded.map(o=>t[o]||o)),"tickerIdsIncluded"in n&&n.tickerIdsIncluded&&(i[s].tickerIdsIncluded=n.tickerIdsIncluded.map(o=>t[o]||o));}),P._tickersOnPause=i;}if(e.hasOwnProperty("tickersToCompleteOnStepEnd")){let i=e.tickersToCompleteOnStepEnd,s=i.tikersIds.map(o=>({id:t[o.id]||o.id})),n=i.stepAlias.map(o=>({id:o.id,alias:o.alias}));P._tickersToCompleteOnStepEnd={tikersIds:s,stepAlias:n};}}catch(t){N.error("Error importing data",t);}}};module.exports=Nh;
|
|
3310
|
+
`,dynamic:false}};});var sk,q3,K3,Z3=f(()=>{nt();br();YS();sk=new ae(0,0,0,0),q3=class $S extends Ge{constructor(e={}){e={...$S.defaultOptions,...e,dynamicProperties:{...$S.defaultOptions.dynamicProperties,...e?.dynamicProperties}};let{dynamicProperties:t,shader:i,roundPixels:s,texture:n,particles:o,...a}=e;super({label:"ParticleContainer",...a}),this.renderPipeId="particle",this.batched=false,this._childrenDirty=false,this.texture=n||null,this.shader=i,this._properties={};for(let u in Bh){let l=Bh[u],c=t[u];this._properties[u]={...l,dynamic:c};}this.allowChildren=true,this.roundPixels=s??false,this.particleChildren=o??[];}addParticle(...e){for(let t=0;t<e.length;t++)this.particleChildren.push(e[t]);return this.onViewUpdate(),e[0]}removeParticle(...e){let t=false;for(let i=0;i<e.length;i++){let s=this.particleChildren.indexOf(e[i]);s>-1&&(this.particleChildren.splice(s,1),t=true);}return t&&this.onViewUpdate(),e[0]}update(){this._childrenDirty=true;}onViewUpdate(){this._childrenDirty=true,super.onViewUpdate();}get bounds(){return sk}updateBounds(){}destroy(e=false){if(super.destroy(e),typeof e=="boolean"?e:e?.texture){let i=typeof e=="boolean"?e:e?.textureSource,s=this.texture??this.particleChildren[0]?.texture;s&&s.destroy(i);}this.texture=null,this.shader?.destroy();}removeParticles(e,t){let i=this.particleChildren.splice(e,t);return this.onViewUpdate(),i}removeParticleAt(e){let t=this.particleChildren.splice(e,1);return this.onViewUpdate(),t[0]}addParticleAt(e,t){return this.particleChildren.splice(t,0,e),this.onViewUpdate(),e}addChild(...e){throw new Error("ParticleContainer.addChild() is not available. Please use ParticleContainer.addParticle()")}removeChild(...e){throw new Error("ParticleContainer.removeChild() is not available. Please use ParticleContainer.removeParticle()")}removeChildren(e,t){throw new Error("ParticleContainer.removeChildren() is not available. Please use ParticleContainer.removeParticles()")}removeChildAt(e){throw new Error("ParticleContainer.removeChildAt() is not available. Please use ParticleContainer.removeParticleAt()")}getChildAt(e){throw new Error("ParticleContainer.getChildAt() is not available. Please use ParticleContainer.getParticleAt()")}setChildIndex(e,t){throw new Error("ParticleContainer.setChildIndex() is not available. Please use ParticleContainer.setParticleIndex()")}getChildIndex(e){throw new Error("ParticleContainer.getChildIndex() is not available. Please use ParticleContainer.getParticleIndex()")}addChildAt(e,t){throw new Error("ParticleContainer.addChildAt() is not available. Please use ParticleContainer.addParticleAt()")}swapChildren(e,t){throw new Error("ParticleContainer.swapChildren() is not available. Please use ParticleContainer.swapParticles()")}reparentChild(...e){throw new Error("ParticleContainer.reparentChild() is not available with the particle container")}reparentChildAt(e,t){throw new Error("ParticleContainer.reparentChildAt() is not available with the particle container")}};q3.defaultOptions={dynamicProperties:{vertex:false,position:true,rotation:false,uvs:false,color:false},roundPixels:false};K3=q3;});var Q3,jS,Nx,eB=f(()=>{Ai();ie();le();br();Yp();Q3=class J3 extends Ge{constructor(e){e instanceof A&&(e={texture:e});let{width:t,height:i,anchor:s,leftWidth:n,rightWidth:o,topHeight:a,bottomHeight:u,texture:l,roundPixels:c,...h}=e;super({label:"NineSliceSprite",...h}),this.renderPipeId="nineSliceSprite",this.batched=true,this._leftWidth=n??l?.defaultBorders?.left??wr.defaultOptions.leftWidth,this._topHeight=a??l?.defaultBorders?.top??wr.defaultOptions.topHeight,this._rightWidth=o??l?.defaultBorders?.right??wr.defaultOptions.rightWidth,this._bottomHeight=u??l?.defaultBorders?.bottom??wr.defaultOptions.bottomHeight,this._width=t??l.width??wr.defaultOptions.width,this._height=i??l.height??wr.defaultOptions.height,this.allowChildren=false,this.texture=l??J3.defaultOptions.texture,this.roundPixels=c??false,this._anchor=new be({_onUpdate:()=>{this.onViewUpdate();}}),s?this.anchor=s:this.texture.defaultAnchor&&(this.anchor=this.texture.defaultAnchor);}get anchor(){return this._anchor}set anchor(e){typeof e=="number"?this._anchor.set(e):this._anchor.copyFrom(e);}get width(){return this._width}set width(e){this._width=e,this.onViewUpdate();}get height(){return this._height}set height(e){this._height=e,this.onViewUpdate();}setSize(e,t){typeof e=="object"&&(t=e.height??e.width,e=e.width),this._width=e,this._height=t??e,this.onViewUpdate();}getSize(e){return e||(e={}),e.width=this._width,e.height=this._height,e}get leftWidth(){return this._leftWidth}set leftWidth(e){this._leftWidth=e,this.onViewUpdate();}get topHeight(){return this._topHeight}set topHeight(e){this._topHeight=e,this.onViewUpdate();}get rightWidth(){return this._rightWidth}set rightWidth(e){this._rightWidth=e,this.onViewUpdate();}get bottomHeight(){return this._bottomHeight}set bottomHeight(e){this._bottomHeight=e,this.onViewUpdate();}get texture(){return this._texture}set texture(e){e||(e=A.EMPTY);let t=this._texture;t!==e&&(t&&t.dynamic&&t.off("update",this.onViewUpdate,this),e.dynamic&&e.on("update",this.onViewUpdate,this),this._texture=e,this.onViewUpdate());}get originalWidth(){return this._texture.width}get originalHeight(){return this._texture.height}destroy(e){if(super.destroy(e),typeof e=="boolean"?e:e?.texture){let i=typeof e=="boolean"?e:e?.textureSource;this._texture.destroy(i);}this._texture=null;}updateBounds(){let e=this._bounds,t=this._anchor,i=this._width,s=this._height;e.minX=-t._x*i,e.maxX=e.minX+i,e.minY=-t._y*s,e.maxY=e.minY+s;}};Q3.defaultOptions={texture:A.EMPTY};jS=Q3,Nx=class extends jS{constructor(...e){let t=e[0];t instanceof A&&(R(G,"NineSlicePlane now uses the options object {texture, leftWidth, rightWidth, topHeight, bottomHeight}"),t={texture:t,leftWidth:e[1],topHeight:e[2],rightWidth:e[3],bottomHeight:e[4]}),R(G,"NineSlicePlane is deprecated. Use NineSliceSprite instead."),super(t);}};});function tB(r,e){return e instanceof Ve||e instanceof Pr?e:r==="html"?new Pr(e):new Ve(e)}var rB=f(()=>{tc();ci();});async function iB(r,e,t=200){let i=await e.extract.base64(r);await e.encoder.commandFinished;let s=t;console.log(`logging texture ${r.source.width}px ${r.source.height}px`);let n=["font-size: 1px;",`padding: ${s}px 300px;`,`background: url(${i}) no-repeat;`,"background-size: contain;"].join(" ");console.log("%c ",n);}var sB=f(()=>{});function qS(r,e=0,t={color:"#000000"}){r.renderGroup&&(t.color=nk[ok++]);let i="";for(let o=0;o<e;o++)i+=" ";let s=r.label;!s&&r instanceof me&&(s=`sprite:${r.texture.label}`);let n=`%c ${i}|- ${s} (worldX:${r.worldTransform.tx}, relativeRenderX:${r.relativeGroupTransform.tx}, renderX:${r.groupTransform.tx}, localX:${r.x})`;r.renderGroup&&(n+=" (RenderGroup)"),r.filters&&(n+="(*filters)"),console.log(n,`color:${t.color}; font-weight:bold;`),e++;for(let o=0;o<r.children.length;o++){let a=r.children[o];qS(a,e,{...t});}}function KS(r,e=0,t={index:0,color:"#000000"}){let i="";for(let n=0;n<e;n++)i+=" ";let s=`%c ${i}- ${t.index}: ${r.root.label} worldX:${r.worldTransform.tx}`;console.log(s,`color:${t.color}; font-weight:bold;`),e++;for(let n=0;n<r.renderGroupChildren.length;n++){let o=r.renderGroupChildren[n];KS(o,e,{...t,index:n});}}var nk,ok,nB=f(()=>{Gi();nk=["#000080","#228B22","#8B0000","#4169E1","#008080","#800000","#9400D3","#FF8C00","#556B2F","#8B008B"],ok=0;});var oB={};Wh(oB,{AbstractBitmapFont:()=>os,AbstractRenderer:()=>Lr,AbstractText:()=>Yr,AccessibilitySystem:()=>Pd,AlphaFilter:()=>Tw,AlphaMask:()=>js,AlphaMaskPipe:()=>On,AnimatedSprite:()=>ku,Application:()=>Wc,ApplicationInitHook:()=>kn,Assets:()=>ct,AssetsClass:()=>Zc,BLEND_TO_NPM:()=>Zd,BUFFER_TYPE:()=>oo,BackgroundLoader:()=>au,BackgroundSystem:()=>fm,Batch:()=>Pl,BatchGeometry:()=>Zo,BatchTextureArray:()=>Ko,BatchableGraphics:()=>li,BatchableMesh:()=>Or,BatchableSprite:()=>ar,Batcher:()=>Jd,BatcherPipe:()=>Rc,BigPool:()=>W,BindGroup:()=>Ye,BindGroupSystem:()=>Wn,BitmapFont:()=>_o,BitmapFontManager:()=>di,BitmapText:()=>Gu,BitmapTextPipe:()=>xn,BlendModeFilter:()=>q,BlendModePipe:()=>Ln,BlurFilter:()=>yh,BlurFilterPass:()=>Iu,Bounds:()=>ae,BrowserAdapter:()=>Fd,Buffer:()=>Ee,BufferImageSource:()=>ii,BufferResource:()=>Vr,BufferUsage:()=>j,CLEAR:()=>$e,Cache:()=>ne,CanvasPool:()=>_t,CanvasPoolClass:()=>Wl,CanvasSource:()=>Ke,CanvasTextMetrics:()=>kt,CanvasTextPipe:()=>dn,CanvasTextSystem:()=>gn,Circle:()=>ga,Color:()=>z,ColorBlend:()=>oc,ColorBurnBlend:()=>ac,ColorDodgeBlend:()=>uc,ColorMask:()=>qs,ColorMaskPipe:()=>Gn,ColorMatrixFilter:()=>vx,CompressedSource:()=>cr,Container:()=>K,Culler:()=>rx,CullerPlugin:()=>nh,CustomRenderPipe:()=>wn,D3D10_RESOURCE_DIMENSION:()=>jg,D3DFMT:()=>Bt,DATA_URI:()=>aC,DDS:()=>Y,DEG_TO_RAD:()=>Kh,DEPRECATED_SCALE_MODES:()=>wh,DEPRECATED_WRAP_MODES:()=>Ph,DOMAdapter:()=>L,DOMContainer:()=>kd,DOMPipe:()=>Ys,DRAW_MODES:()=>e3,DXGI_FORMAT:()=>$g,DXGI_TO_TEXTURE_FORMAT:()=>vt,DarkenBlend:()=>lc,DefaultBatcher:()=>en,DefaultShader:()=>ra,DifferenceBlend:()=>cc,DisplacementFilter:()=>Ex,DivideBlend:()=>hc,DynamicBitmapFont:()=>Jl,Ellipse:()=>xa,EventBoundary:()=>Vo,EventEmitter:()=>te,EventSystem:()=>zo,EventsTicker:()=>Zt,ExclusionBlend:()=>dc,ExtensionType:()=>m,ExtractSystem:()=>pm,FOURCC_TO_TEXTURE_FORMAT:()=>rh,FederatedContainer:()=>Id,FederatedEvent:()=>Ir,FederatedMouseEvent:()=>_r,FederatedPointerEvent:()=>ot,FederatedWheelEvent:()=>Qt,FillGradient:()=>xt,FillPattern:()=>Er,Filter:()=>rt,FilterEffect:()=>mr,FilterPipe:()=>Tn,FilterSystem:()=>Sn,FontStylePromiseCache:()=>Ba,GAUSSIAN_VALUES:()=>Du,GL_FORMATS:()=>Qa,GL_INTERNAL_FORMAT:()=>zT,GL_TARGETS:()=>Gc,GL_TYPES:()=>oe,GL_WRAP_MODES:()=>b2,GenerateTextureSystem:()=>Nn,Geometry:()=>mt,GlBackBufferSystem:()=>Xm,GlBatchAdaptor:()=>no,GlBuffer:()=>Za,GlBufferSystem:()=>ao,GlColorMaskSystem:()=>lo,GlContextSystem:()=>Vm,GlEncoderSystem:()=>co,GlGeometrySystem:()=>uo,GlGraphicsAdaptor:()=>io,GlMeshAdaptor:()=>so,GlParticleContainerAdaptor:()=>ha,GlParticleContainerPipe:()=>ln,GlProgram:()=>Ae,GlProgramData:()=>tu,GlRenderTarget:()=>Ja,GlRenderTargetAdaptor:()=>eu,GlRenderTargetSystem:()=>po,GlShaderSystem:()=>mo,GlStateSystem:()=>dg,GlStencilSystem:()=>ho,GlTexture:()=>iu,GlTextureSystem:()=>xo,GlUboSystem:()=>fo,GlUniformGroupSystem:()=>go,GlobalUniformSystem:()=>Hn,GpuBatchAdaptor:()=>Pn,GpuBlendModesToPixi:()=>lt,GpuBufferSystem:()=>Xn,GpuColorMaskSystem:()=>Yn,GpuDeviceSystem:()=>gs,GpuEncoderSystem:()=>$n,GpuGraphicsAdaptor:()=>An,GpuGraphicsContext:()=>Ul,GpuMeshAdapter:()=>Cn,GpuMipmapGenerator:()=>Ka,GpuParticleContainerAdaptor:()=>pa,GpuParticleContainerPipe:()=>cn,GpuProgram:()=>Ce,GpuReadBuffer:()=>Zw,GpuRenderTarget:()=>$a,GpuRenderTargetAdaptor:()=>ja,GpuRenderTargetSystem:()=>Jn,GpuShaderSystem:()=>eo,GpuStateSystem:()=>to,GpuStencilModesToPixi:()=>lr,GpuStencilSystem:()=>jn,GpuTextureSystem:()=>ro,GpuUboSystem:()=>Kn,GpuUniformBatchPipe:()=>Zn,Graphics:()=>ns,GraphicsContext:()=>He,GraphicsContextRenderData:()=>Ll,GraphicsContextSystem:()=>Ji,GraphicsPath:()=>ur,GraphicsPipe:()=>an,HTMLText:()=>Uu,HTMLTextPipe:()=>_n,HTMLTextRenderData:()=>as,HTMLTextStyle:()=>Pr,HTMLTextSystem:()=>us,HardLightBlend:()=>fc,HardMixBlend:()=>pc,HelloSystem:()=>ms,IGLUniformData:()=>Zm,ImageSource:()=>pt,InstructionSet:()=>Bi,KTX:()=>De,LightenBlend:()=>mc,LinearBurnBlend:()=>gc,LinearDodgeBlend:()=>xc,LinearLightBlend:()=>_c,Loader:()=>lu,LoaderParserPriority:()=>ve,LuminosityBlend:()=>bc,MSAA_QUALITY:()=>LS,MaskEffectManager:()=>ko,MaskEffectManagerClass:()=>ll,MaskFilter:()=>Ga,Matrix:()=>B,Mesh:()=>Lt,MeshGeometry:()=>bt,MeshPipe:()=>un,MeshPlane:()=>Gx,MeshRope:()=>H3,MeshSimple:()=>Lx,NOOP:()=>fl,NegationBlend:()=>yc,NineSliceGeometry:()=>wr,NineSlicePlane:()=>Nx,NineSliceSprite:()=>jS,NineSliceSpritePipe:()=>vn,NoiseFilter:()=>Mw,ObservablePoint:()=>be,OverlayBlend:()=>vc,PI_2:()=>jh,Particle:()=>$3,ParticleBuffer:()=>da,ParticleContainer:()=>K3,ParticleContainerPipe:()=>es,ParticleShader:()=>fa,PerspectiveMesh:()=>k3,PerspectivePlaneGeometry:()=>Nu,PinLightBlend:()=>Tc,PipelineSystem:()=>Qn,PlaneGeometry:()=>cs,Point:()=>Z,Polygon:()=>rs,Pool:()=>ti,PoolGroupClass:()=>al,PrepareBase:()=>Px,PrepareQueue:()=>Ou,PrepareSystem:()=>Ch,PrepareUpload:()=>Lu,QuadGeometry:()=>Da,RAD_TO_DEG:()=>qh,Rectangle:()=>X,RenderContainer:()=>Ix,RenderGroup:()=>Lo,RenderGroupPipe:()=>Rn,RenderGroupSystem:()=>Dn,RenderLayer:()=>P3,RenderLayerClass:()=>NS,RenderTarget:()=>zn,RenderTargetSystem:()=>bs,RenderTexture:()=>Ua,RenderableGCSystem:()=>_m,RendererInitHook:()=>Fn,RendererType:()=>Pe,ResizePlugin:()=>zs,Resolver:()=>ut,RopeGeometry:()=>Ux,RoundedRectangle:()=>_a,SCALE_MODES:()=>n3,STENCIL_MODES:()=>ye,SVGParser:()=>fp,SaturationBlend:()=>Sc,SchedulerSystem:()=>Vn,ScissorMask:()=>Mx,SdfShader:()=>Ca,Shader:()=>Re,ShaderStage:()=>Yi,ShapePath:()=>Ta,SharedRenderPipes:()=>Va,SharedSystems:()=>Ha,SoftLightBlend:()=>Ec,Sprite:()=>me,SpritePipe:()=>In,Spritesheet:()=>Tl,State:()=>Be,StencilMask:()=>Ks,StencilMaskPipe:()=>Un,SubtractBlend:()=>Ac,SystemRunner:()=>fs,TEXTURE_FORMAT_BLOCK_SIZE:()=>qg,Text:()=>hr,TextStyle:()=>Ve,Texture:()=>A,TextureGCSystem:()=>bm,TextureMatrix:()=>Mi,TexturePool:()=>he,TexturePoolClass:()=>pl,TextureSource:()=>re,TextureStyle:()=>Uo,TextureUvs:()=>Dx,Ticker:()=>de,TickerListener:()=>Ii,TickerPlugin:()=>Xs,TilingSprite:()=>Bx,TilingSpritePipe:()=>yn,TilingSpriteShader:()=>Ma,Transform:()=>Fu,Triangle:()=>Cx,UNIFORM_TO_ARRAY_SETTERS:()=>lg,UNIFORM_TO_SINGLE_SETTERS:()=>ug,UNIFORM_TYPES_MAP:()=>Tf,UNIFORM_TYPES_VALUES:()=>Il,UPDATE_BLEND:()=>No,UPDATE_COLOR:()=>Vs,UPDATE_PRIORITY:()=>wt,UPDATE_TRANSFORM:()=>Y1,UPDATE_VISIBLE:()=>Di,UboBatch:()=>Xa,UboSystem:()=>xs,UniformGroup:()=>J,VERSION:()=>ps,VideoSource:()=>Ni,ViewContainer:()=>Ge,ViewSystem:()=>Tm,ViewableBuffer:()=>Jt,VividLightBlend:()=>Cc,WGSL_ALIGN_SIZE_DATA:()=>qn,WGSL_TO_STD40_SIZE:()=>Uc,WRAP_MODES:()=>s3,WebGLRenderer:()=>zc,WebGPURenderer:()=>Oc,WebWorkerAdapter:()=>_w,WorkerManager:()=>Kc,_getGlobalBounds:()=>ud,accessibilityTarget:()=>wd,addBits:()=>Bl,addMaskBounds:()=>Ui,addMaskLocalBounds:()=>Li,addProgramDefines:()=>sf,alphaFrag:()=>fx,alphaWgsl:()=>bh,applyMatrix:()=>zp,applyProjectiveTransformationToPlane:()=>kx,applyStyleParams:()=>Vc,assignWithIgnore:()=>Hs,autoDetectEnvironment:()=>rC,autoDetectRenderer:()=>Tg,autoDetectSource:()=>_E,basisTranscoderUrls:()=>bu,bgr2rgb:()=>ri,bitmapFontCachePlugin:()=>Sg,bitmapFontTextParser:()=>ou,bitmapFontXMLParser:()=>Xc,bitmapFontXMLStringParser:()=>Yc,blendTemplateFrag:()=>jp,blendTemplateVert:()=>qp,blendTemplateWgsl:()=>Kp,blockDataMap:()=>Fc,blurTemplateWgsl:()=>_x,boundsPool:()=>Pt,browserExt:()=>Y0,buildAdaptiveBezier:()=>ya,buildAdaptiveQuadratic:()=>ip,buildArc:()=>va,buildArcTo:()=>np,buildArcToSvg:()=>op,buildCircle:()=>nr,buildContextBatches:()=>Xf,buildEllipse:()=>wf,buildGeometryFromPath:()=>S3,buildLine:()=>kf,buildPixelLine:()=>Ff,buildPolygon:()=>aa,buildRectangle:()=>ua,buildRoundedRectangle:()=>Bf,buildSimpleUvs:()=>sa,buildTriangle:()=>la,buildUvs:()=>ia,cacheAsTextureMixin:()=>ed,cacheTextureArray:()=>Ag,calculateProjection:()=>Fm,checkChildrenDidChange:()=>hl,checkDataUrl:()=>Ft,checkExtension:()=>Me,checkMaxIfStatementsInShader:()=>jd,childrenHelperMixin:()=>rd,cleanArray:()=>xm,cleanHash:()=>gm,clearList:()=>Mn,closePointEps:()=>Mf,collectAllRenderables:()=>m3,collectRenderablesMixin:()=>id,color32BitToUniform:()=>or,colorBit:()=>ji,colorBitGl:()=>qi,colorMatrixFilterFrag:()=>yx,colorMatrixFilterWgsl:()=>vh,colorToUniform:()=>KE,compareModeToGlCompare:()=>_g,compileHighShader:()=>pf,compileHighShaderGl:()=>mf,compileHighShaderGlProgram:()=>tr,compileHighShaderGpuProgram:()=>er,compileHooks:()=>Rl,compileInputs:()=>Ml,compileOutputs:()=>ff,compileShader:()=>Lc,compute2DProjection:()=>Ox,convertFormatIfRequired:()=>hP,convertToList:()=>at,copySearchParams:()=>$s,createIdFromString:()=>Sr,createIndicesForQuads:()=>Vl,createLevelBuffers:()=>ZC,createLevelBuffersFromKTX:()=>fP,createStringVariations:()=>Od,createTexture:()=>yt,createUboElementsSTD40:()=>Ym,createUboElementsWGSL:()=>Am,createUboSyncFunction:()=>za,createUboSyncFunctionSTD40:()=>qm,createUboSyncFunctionWGSL:()=>Dm,crossOrigin:()=>MT,cullingMixin:()=>$h,curveEps:()=>Df,defaultFilterVert:()=>As,defaultValue:()=>ru,definedProps:()=>et,deprecation:()=>R,detectAvif:()=>Pg,detectBasis:()=>WC,detectCompressed:()=>yP,detectDefaults:()=>wg,detectMp4:()=>Bg,detectOgv:()=>Rg,detectVideoAlphaMode:()=>Yo,detectWebm:()=>Mg,detectWebp:()=>Dg,determineCrossOrigin:()=>IT,displacementFrag:()=>Tx,displacementVert:()=>Sx,displacementWgsl:()=>Th,earcut:()=>aB.default,effectsMixin:()=>sd,ensureAttributes:()=>Ya,ensureIsBuffer:()=>wl,ensurePrecision:()=>nf,ensureTextOptions:()=>Cs,ensureTextStyle:()=>tB,executeInstructions:()=>Bn,extensions:()=>F,extractAttributesFromGlProgram:()=>rg,extractAttributesFromGpuProgram:()=>lf,extractFontFamilies:()=>Dp,extractStructAndGroups:()=>Jo,extractSvgUrlId:()=>ql,fastCopy:()=>Js,findHooksRx:()=>Lb,findMixin:()=>nd,fontStringFromTextStyle:()=>hi,formatShader:()=>Ww,fragmentGPUTemplate:()=>xf,fragmentGlTemplate:()=>bf,generateArraySyncSTD40:()=>jm,generateArraySyncWGSL:()=>Mm,generateBlurFragSource:()=>mx,generateBlurGlProgram:()=>xx,generateBlurProgram:()=>bx,generateBlurVertSource:()=>gx,generateGPULayout:()=>Nw,generateGpuLayoutGroups:()=>cf,generateLayout:()=>Vw,generateLayoutHash:()=>hf,generateParticleUpdateFunction:()=>Yf,generateProgram:()=>og,generateShaderSyncCode:()=>Km,generateTextStyleKey:()=>Sa,generateTextureBatchBit:()=>Ki,generateTextureBatchBitGl:()=>Zi,generateTextureMatrix:()=>Wf,generateUID:()=>u3,generateUniformsSync:()=>cg,getAdjustedBlendModeBlend:()=>vr,getAttributeInfoFromFormat:()=>gt,getBatchSamplersUniformGroup:()=>Qi,getBitmapTextLayout:()=>wa,getCanvasBoundingBox:()=>Zf,getCanvasFillStyle:()=>ss,getCanvasTexture:()=>Na,getDefaultUniformValue:()=>Sf,getFastGlobalBounds:()=>d3,getFastGlobalBoundsMixin:()=>ad,getFontCss:()=>kp,getFontFamilyName:()=>ET,getGeometryBounds:()=>ef,getGlTypeFromFormat:()=>Wm,getGlobalBounds:()=>Dr,getGlobalMixin:()=>hd,getGlobalRenderableBounds:()=>$p,getLocalBounds:()=>wi,getMatrixRelativeToParent:()=>Hd,getMaxFragmentPrecision:()=>rf,getMaxTexturesPerBatch:()=>Dt,getOrientationOfPoints:()=>If,getParent:()=>S_,getPo2TextureFromSource:()=>Aa,getResolutionOfUrl:()=>Ts,getSVGUrl:()=>Fp,getSupportedCompressedTextureFormats:()=>gu,getSupportedGPUCompressedTextureFormats:()=>Jc,getSupportedGlCompressedTextureFormats:()=>Qc,getSupportedTextureFormats:()=>zr,getTemporaryCanvasFromImage:()=>Op,getTestContext:()=>$o,getTextureBatchBindGroup:()=>Vi,getTextureDefaultMatrix:()=>W3,getTextureFormatFromKTXTexture:()=>mP,getUboData:()=>ig,getUniformData:()=>sg,getUrlExtension:()=>eb,glFormatToGPUFormat:()=>Jg,glUploadBufferImageResource:()=>fg,glUploadCompressedTextureResource:()=>pg,glUploadImageResource:()=>su,glUploadVideoResource:()=>gg,globalUniformsBit:()=>yf,globalUniformsBitGl:()=>vf,globalUniformsUBOBitGl:()=>ME,gpuFormatToBasisTranscoderFormat:()=>JC,gpuFormatToKTXBasisTranscoderFormat:()=>xP,gpuUploadBufferImageResource:()=>Um,gpuUploadCompressedTextureResource:()=>Lm,gpuUploadImageResource:()=>qa,gpuUploadVideoResource:()=>Hm,groupD8:()=>ee,hasCachedCanvasTexture:()=>gC,hslWgsl:()=>Iw,hslgl:()=>hs,hslgpu:()=>ds,injectBits:()=>Dl,insertVersion:()=>of,isMobile:()=>Ad,isPow2:()=>dl,isRenderingToScreen:()=>Om,isSafari:()=>Pp,isSingleItem:()=>ni,isWebGLSupported:()=>Nr,isWebGPUSupported:()=>Hr,ktxTranscoderUrls:()=>vu,loadBasis:()=>qC,loadBasisOnWorker:()=>Yg,loadBitmapFont:()=>Eg,loadDDS:()=>tP,loadEnvironmentExtensions:()=>Pc,loadFontAsBase64:()=>Ip,loadFontCSS:()=>rc,loadImageBitmap:()=>RT,loadJson:()=>Ig,loadKTX:()=>iP,loadKTX2:()=>uP,loadKTX2onWorker:()=>Qg,loadSVGImage:()=>Gp,loadSvg:()=>Og,loadTextures:()=>fu,loadTxt:()=>kg,loadVideoTextures:()=>Ug,loadWebFont:()=>Fg,localUniformBit:()=>pi,localUniformBitGl:()=>ls,localUniformBitGroup2:()=>Lp,localUniformMSDFBit:()=>bp,localUniformMSDFBitGl:()=>yp,log2:()=>U1,logDebugTexture:()=>iB,logProgramError:()=>ng,logRenderGroupScene:()=>KS,logScene:()=>qS,mSDFBit:()=>vp,mSDFBitGl:()=>Tp,mapFormatToGlFormat:()=>bg,mapFormatToGlInternalFormat:()=>yg,mapFormatToGlType:()=>vg,mapGlToVertexFormat:()=>eg,mapSize:()=>qw,mapType:()=>Nc,mapWebGLBlendModesToPixi:()=>hg,maskFrag:()=>hm,maskVert:()=>dm,maskWgsl:()=>Mc,matrixPool:()=>Oe,measureHtmlText:()=>Ra,measureMixin:()=>fd,migrateFragmentFromV7toV8:()=>$w,mipmapScaleModeToGlFilter:()=>xg,mixHexColors:()=>x3,multiplyColors:()=>Pi,multiplyHexColors:()=>Oo,nextPow2:()=>gr,noiseFrag:()=>Ax,noiseWgsl:()=>Sh,nonCompressedFormats:()=>UT,normalizeExtensionPriority:()=>Mo,nssvg:()=>wp,nsxhtml:()=>Bp,onRenderMixin:()=>pd,parseAttribute:()=>dp,parseDDS:()=>Kg,parseFunctionBody:()=>c3,parseKTX:()=>Zg,parseSVGDefinitions:()=>cp,parseSVGFloatAttribute:()=>we,parseSVGPath:()=>Qf,parseSVGStyle:()=>Kl,particleData:()=>Bh,particlesFrag:()=>$f,particlesVert:()=>jf,particlesWgsl:()=>zl,path:()=>Te,pointInTriangle:()=>Eh,preloadVideo:()=>DT,removeItems:()=>Io,removeStructAndGroupDuplicates:()=>df,resetUids:()=>D1,resolveCharacters:()=>Pa,resolveCompressedTextureUrl:()=>bP,resolveJsonUrl:()=>Ng,resolveTextureUrl:()=>pu,resourceToTexture:()=>cb,roundPixelsBit:()=>rr,roundPixelsBitGl:()=>ir,roundedShapeArc:()=>ap,roundedShapeQuadraticCurve:()=>up,sayHello:()=>mm,scaleModeToGlFilter:()=>Hc,setBasisTranscoderPath:()=>$C,setKTXTranscoderPath:()=>oP,setPositions:()=>Vp,setProgramName:()=>af,setUvs:()=>Wp,shapeBuilders:()=>ca,sortMixin:()=>md,spritesheetAsset:()=>Ud,squaredDistanceToLineSegment:()=>ts,stripVersion:()=>uf,styleAttributes:()=>hp,testImageFormat:()=>uu,testVideoFormat:()=>ys,textStyleToCSS:()=>Mp,textureBit:()=>tm,textureBitGl:()=>rm,textureFrom:()=>hb,tilingBit:()=>Np,tilingBitGl:()=>Hp,toFillStyle:()=>Ar,toLocalGlobalMixin:()=>gd,toStrokeStyle:()=>is,transformVertices:()=>tn,triangulateWithHoles:()=>oa,uboSyncFunctionsSTD40:()=>Ic,uboSyncFunctionsWGSL:()=>Bm,uid:()=>Q,uniformParsers:()=>Br,unpremultiplyAlpha:()=>wC,unsafeEvalSupported:()=>Ia,updateLocalTransform:()=>b3,updateQuadBounds:()=>Xo,updateRenderGroupTransform:()=>nv,updateRenderGroupTransforms:()=>Bc,updateTextBounds:()=>hn,updateTransformAndChildren:()=>am,updateTransformBackwards:()=>Fo,updateWorldTransform:()=>v3,v8_0_0:()=>G,v8_3_4:()=>Qh,validFormats:()=>Tu,validateRenderables:()=>um,vertexGPUTemplate:()=>gf,vertexGlTemplate:()=>_f,viewportFromFrame:()=>r3,vkFormatToGPUFormat:()=>ex,warn:()=>D,webworkerExt:()=>$0,wrapModeToGlAddress:()=>nu});var aB,_e=f(()=>{RA();DA();S();S();Xd();Ld();N_();H_();FA();OA();GA();UA();LA();NA();HA();VA();zA();WA();XA();YA();$A();jA();qA();KA();ZA();QA();JA();eC();tC();OC();V_();W_();zC();fT();kr();pT();mT();gT();xT();_T();bT();yT();Cg();$c();vT();Wt();TT();ST();AT();CT();Gg();kT();mi();BT();FT();Lg();Oi();vs();jt();Wo();Gd();J_();yl();Xe();XC();KC();QC();eP();LT();NT();HT();rP();VT();sP();XT();WT();lP();dP();pP();gP();qT();_P();YT();KT();$T();vP();ZT();JT();TP();f_();hE();Z_();ge();J0();Q_();bw();$_();Dd();Bd();ml();K_();xl();Rd();Md();q0();K0();Z0();kw();mS();gS();yS();SS();ES();_h();AS();CS();PS();wS();BS();dv();fv();pv();Fe();sc();nc();Sw();Cw();TS();px();xS();bS();_S();vS();Pw();ww();Dw();Ur();ul();V0();W0();mv();yd();se();Zh();Go();Jf();Ai();Ct();RS();Ny();Hy();Vy();Le();zy();Fw();MS();FS();Lw();US();f2();fb();Hi();Hw();zw();Al();rv();xb();hv();yb();mb();Ef();Qb();ai();Xb();Ub();Nb();Hb();Vb();Xw();zb();Yb();ea();ta();$b();bn();ui();im();ib();xv();sb();_v();__();Yw();nb();bv();Sl();El();oT();p2();m2();g2();En();_2();v2();y2();S2();E2();A2();R2();C2();B2();M2();D2();I2();kl();It();k2();V2();X2();jw();F2();Qm();Im();G2();H2();Tb();$d();U2();L2();N2();Kw();tg();Sb();Eb();Ab();Cb();Pb();$m();w2();P2();W2();z2();j2();Y2();zm();q2();sT();K2();Z2();mg();Q2();eT();OT();tT();rT();iT();J2();BC();nT();Lv();Nv();Qw();jv();Hv();Vv();zv();Wv();$v();qv();Kv();Zv();Jv();e2();t2();oi();Xt();r2();Cm();Yv();Mb();Db();Xv();kb();Fb();Ob();i2();s2();km();l2();n2();o2();Nm();a2();GT();u2();c2();vv();Tv();Fr();kc();Tr();Kd();Av();Pv();t3();Wi();Af();_b();Xi();bb();Cf();xd();wv();Qv();ym();Gm();i3();Bv();Ib();sr();Kb();Em();Ne();wm();Zb();Rm();Pm();Mv();zi();qo();$t();ka();Sm();Qp();fn();o3();kv();Cv();vd();Zs();mu();Qs();tt();Wd();ie();Ov();Td();xr();_d();a3();l3();vm();Wg();xu();db();Qo();h3();Uv();Yt();wy();By();Ry();nt();f3();Os();cl();z0();Ci();m_();g_();x_();b_();y_();v_();dd();A_();C_();P_();w_();Mt();iv();p3();M_();sv();uv();Sd();E_();om();g3();Ri();nm();_3();cd();ld();y3();ov();T3();av();h2();on();ev();Pf();rp();$y();sp();jy();Zy();Rf();ey();ty();Hf();Vf();zf();UE();nn();Xl();_p();mn();Nl();yy();jl();Qy();Jy();e0();lp();Ly();r0();i0();t0();cy();E3();pp();ly();Jb();Nf();w3();F3();zS();HS();VS();O3();ic();V3();z3();WS();d2();tv();Hl();X3();yo();fi();Ty();Ey();Iy();Dy();ky();j3();Py();Z3();qf();YS();My();Ay();Cy();DS();Yp();eB();N0();R0();I0();kS();U0();O0();k0();F0();G0();ma();Gi();lv();Sp();lT();cT();hT();dT();uT();ec();OS();g0();p0();Ap();Ep();GS();_0();Rp();tc();w0();v0();E0();A0();C0();T0();S0();P0();Up();y0();Ah();Ql();Oy();a0();Zl();xp();f0();l0();c0();Rx();ci();rB();mp();gp();Kf();br();tb();rb();Ws();ki();z_();Vd();U_();b0();Fa();Oa();Zp();Gy();lm();dt();Dv();td();Je();Nd();qd();cm();le();sB();nB();ue();R_();IS();jc();Fi();Jh();ft();Rv();aB=Ro(oy());F.add(Y0,$0);});var xB=fr((Zx,gB)=>{(function(r,e){typeof Zx=="object"?gB.exports=Zx=e():typeof define=="function"&&define.amd?define([],e):r.CryptoJS=e();})(Zx,function(){var r=r||function(e,t){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof global<"u"&&global.crypto&&(i=global.crypto),!i&&typeof n_=="function")try{i=n_("crypto");}catch{}var s=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function x(){}return function(y){var T;return x.prototype=y,T=new x,x.prototype=null,T}}(),o={},a=o.lib={},u=a.Base=function(){return {extend:function(x){var y=n(this);return x&&y.mixIn(x),(!y.hasOwnProperty("init")||this.init===y.init)&&(y.init=function(){y.$super.init.apply(this,arguments);}),y.init.prototype=y,y.$super=this,y},create:function(){var x=this.extend();return x.init.apply(x,arguments),x},init:function(){},mixIn:function(x){for(var y in x)x.hasOwnProperty(y)&&(this[y]=x[y]);x.hasOwnProperty("toString")&&(this.toString=x.toString);},clone:function(){return this.init.prototype.extend(this)}}}(),l=a.WordArray=u.extend({init:function(x,y){x=this.words=x||[],y!=t?this.sigBytes=y:this.sigBytes=x.length*4;},toString:function(x){return (x||h).stringify(this)},concat:function(x){var y=this.words,T=x.words,v=this.sigBytes,w=x.sigBytes;if(this.clamp(),v%4)for(var E=0;E<w;E++){var C=T[E>>>2]>>>24-E%4*8&255;y[v+E>>>2]|=C<<24-(v+E)%4*8;}else for(var I=0;I<w;I+=4)y[v+I>>>2]=T[I>>>2];return this.sigBytes+=w,this},clamp:function(){var x=this.words,y=this.sigBytes;x[y>>>2]&=4294967295<<32-y%4*8,x.length=e.ceil(y/4);},clone:function(){var x=u.clone.call(this);return x.words=this.words.slice(0),x},random:function(x){for(var y=[],T=0;T<x;T+=4)y.push(s());return new l.init(y,x)}}),c=o.enc={},h=c.Hex={stringify:function(x){for(var y=x.words,T=x.sigBytes,v=[],w=0;w<T;w++){var E=y[w>>>2]>>>24-w%4*8&255;v.push((E>>>4).toString(16)),v.push((E&15).toString(16));}return v.join("")},parse:function(x){for(var y=x.length,T=[],v=0;v<y;v+=2)T[v>>>3]|=parseInt(x.substr(v,2),16)<<24-v%8*4;return new l.init(T,y/2)}},d=c.Latin1={stringify:function(x){for(var y=x.words,T=x.sigBytes,v=[],w=0;w<T;w++){var E=y[w>>>2]>>>24-w%4*8&255;v.push(String.fromCharCode(E));}return v.join("")},parse:function(x){for(var y=x.length,T=[],v=0;v<y;v++)T[v>>>2]|=(x.charCodeAt(v)&255)<<24-v%4*8;return new l.init(T,y)}},p=c.Utf8={stringify:function(x){try{return decodeURIComponent(escape(d.stringify(x)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(x){return d.parse(unescape(encodeURIComponent(x)))}},g=a.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new l.init,this._nDataBytes=0;},_append:function(x){typeof x=="string"&&(x=p.parse(x)),this._data.concat(x),this._nDataBytes+=x.sigBytes;},_process:function(x){var y,T=this._data,v=T.words,w=T.sigBytes,E=this.blockSize,C=E*4,I=w/C;x?I=e.ceil(I):I=e.max((I|0)-this._minBufferSize,0);var k=I*E,O=e.min(k*4,w);if(k){for(var M=0;M<k;M+=E)this._doProcessBlock(v,M);y=v.splice(0,k),T.sigBytes-=O;}return new l.init(y,O)},clone:function(){var x=u.clone.call(this);return x._data=this._data.clone(),x},_minBufferSize:0});a.Hasher=g.extend({cfg:u.extend(),init:function(x){this.cfg=this.cfg.extend(x),this.reset();},reset:function(){g.reset.call(this),this._doReset();},update:function(x){return this._append(x),this._process(),this},finalize:function(x){x&&this._append(x);var y=this._doFinalize();return y},blockSize:512/32,_createHelper:function(x){return function(y,T){return new x.init(T).finalize(y)}},_createHmacHelper:function(x){return function(y,T){return new _.HMAC.init(x,T).finalize(y)}}});var _=o.algo={};return o}(Math);return r});});var bB=fr((Qx,_B)=>{(function(r,e){typeof Qx=="object"?_B.exports=Qx=e(xB()):typeof define=="function"&&define.amd?define(["./core"],e):e(r.CryptoJS);})(Qx,function(r){return function(){var e=r,t=e.lib,i=t.WordArray,s=t.Hasher,n=e.algo,o=[],a=n.SHA1=s.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520]);},_doProcessBlock:function(u,l){for(var c=this._hash.words,h=c[0],d=c[1],p=c[2],g=c[3],b=c[4],_=0;_<80;_++){if(_<16)o[_]=u[l+_]|0;else {var x=o[_-3]^o[_-8]^o[_-14]^o[_-16];o[_]=x<<1|x>>>31;}var y=(h<<5|h>>>27)+b+o[_];_<20?y+=(d&p|~d&g)+1518500249:_<40?y+=(d^p^g)+1859775393:_<60?y+=(d&p|d&g|p&g)-1894007588:y+=(d^p^g)-899497514,b=g,g=p,p=d<<30|d>>>2,d=h,h=y;}c[0]=c[0]+h|0,c[1]=c[1]+d|0,c[2]=c[2]+p|0,c[3]=c[3]+g|0,c[4]=c[4]+b|0;},_doFinalize:function(){var u=this._data,l=u.words,c=this._nDataBytes*8,h=u.sigBytes*8;return l[h>>>5]|=128<<24-h%32,l[(h+64>>>9<<4)+14]=Math.floor(c/4294967296),l[(h+64>>>9<<4)+15]=c,u.sigBytes=l.length*4,this._process(),this._hash},clone:function(){var u=s.clone.call(this);return u._hash=this._hash.clone(),u}});e.SHA1=s._createHelper(a),e.HmacSHA1=s._createHmacHelper(a);}(),r.SHA1});});_e();var $r={};Wh($r,{DistortionFilter:()=>Hx,EqualizerFilter:()=>dr,Filter:()=>Ze,MonoFilter:()=>Vx,ReverbFilter:()=>zx,StereoFilter:()=>Wx,StreamFilter:()=>Xx,TelephoneFilter:()=>Yx});var uB;function lB(r){return uB=r,r}function fe(){return uB}var Ze=class{constructor(e,t){this.init(e,t);}init(e,t){this.destination=e,this.source=t||e;}connect(e){this.source?.connect(e);}disconnect(){this.source?.disconnect();}destroy(){this.disconnect(),this.destination=null,this.source=null;}};var Hx=class extends Ze{constructor(e=0){let t;if(!fe().useLegacy){let{audioContext:i}=fe().context;t=i.createWaveShaper();}super(t),this._distortion=t,this.amount=e;}set amount(e){if(this._amount=e,fe().useLegacy)return;let t=e*1e3,i=44100,s=new Float32Array(i),n=Math.PI/180,o=0,a;for(;o<i;++o)a=o*2/i-1,s[o]=(3+t)*a*20*n/(Math.PI+t*Math.abs(a));this._distortion.curve=s,this._distortion.oversample="4x";}get amount(){return this._amount}destroy(){this._distortion=null,super.destroy();}};var je=class{static setParamValue(e,t){if(e.setValueAtTime){let i=fe().context;e.setValueAtTime(t,i.audioContext.currentTime);}else e.value=t;return t}};var pe=class extends Ze{constructor(r=0,e=0,t=0,i=0,s=0,n=0,o=0,a=0,u=0,l=0){let c=[],h=[{f:pe.F32,type:"lowshelf",gain:r},{f:pe.F64,type:"peaking",gain:e},{f:pe.F125,type:"peaking",gain:t},{f:pe.F250,type:"peaking",gain:i},{f:pe.F500,type:"peaking",gain:s},{f:pe.F1K,type:"peaking",gain:n},{f:pe.F2K,type:"peaking",gain:o},{f:pe.F4K,type:"peaking",gain:a},{f:pe.F8K,type:"peaking",gain:u},{f:pe.F16K,type:"highshelf",gain:l}];fe().useLegacy||(c=h.map(d=>{let p=fe().context.audioContext.createBiquadFilter();return p.type=d.type,je.setParamValue(p.Q,1),p.frequency.value=d.f,je.setParamValue(p.gain,d.gain),p})),super(c[0],c[c.length-1]),this.bands=c,this.bandsMap={};for(let d=0;d<this.bands.length;d++){let p=this.bands[d];d>0&&this.bands[d-1].connect(p),this.bandsMap[p.frequency.value]=p;}}setGain(r,e=0){if(!this.bandsMap[r])throw new Error(`No band found for frequency ${r}`);je.setParamValue(this.bandsMap[r].gain,e);}getGain(r){if(!this.bandsMap[r])throw new Error(`No band found for frequency ${r}`);return this.bandsMap[r].gain.value}set f32(r){this.setGain(pe.F32,r);}get f32(){return this.getGain(pe.F32)}set f64(r){this.setGain(pe.F64,r);}get f64(){return this.getGain(pe.F64)}set f125(r){this.setGain(pe.F125,r);}get f125(){return this.getGain(pe.F125)}set f250(r){this.setGain(pe.F250,r);}get f250(){return this.getGain(pe.F250)}set f500(r){this.setGain(pe.F500,r);}get f500(){return this.getGain(pe.F500)}set f1k(r){this.setGain(pe.F1K,r);}get f1k(){return this.getGain(pe.F1K)}set f2k(r){this.setGain(pe.F2K,r);}get f2k(){return this.getGain(pe.F2K)}set f4k(r){this.setGain(pe.F4K,r);}get f4k(){return this.getGain(pe.F4K)}set f8k(r){this.setGain(pe.F8K,r);}get f8k(){return this.getGain(pe.F8K)}set f16k(r){this.setGain(pe.F16K,r);}get f16k(){return this.getGain(pe.F16K)}reset(){this.bands.forEach(r=>{je.setParamValue(r.gain,0);});}destroy(){this.bands.forEach(r=>{r.disconnect();}),this.bands=null,this.bandsMap=null;}},dr=pe;dr.F32=32;dr.F64=64;dr.F125=125;dr.F250=250;dr.F500=500;dr.F1K=1e3;dr.F2K=2e3;dr.F4K=4e3;dr.F8K=8e3;dr.F16K=16e3;var Vx=class extends Ze{constructor(){let e,t;if(!fe().useLegacy){let{audioContext:i}=fe().context;t=i.createChannelSplitter(),e=i.createChannelMerger(),e.connect(t);}super(e,t),this._merger=e;}destroy(){this._merger?.disconnect(),this._merger=null,super.destroy();}};var zx=class extends Ze{constructor(e=3,t=2,i=false){super(null),this._seconds=this._clamp(e,1,50),this._decay=this._clamp(t,0,100),this._reverse=i,this._rebuild();}_clamp(e,t,i){return Math.min(i,Math.max(t,e))}get seconds(){return this._seconds}set seconds(e){this._seconds=this._clamp(e,1,50),this._rebuild();}get decay(){return this._decay}set decay(e){this._decay=this._clamp(e,0,100),this._rebuild();}get reverse(){return this._reverse}set reverse(e){this._reverse=e,this._rebuild();}_rebuild(){if(fe().useLegacy)return;let{audioContext:e}=fe().context,t=e.sampleRate,i=t*this._seconds,s=e.createBuffer(2,i,t),n=s.getChannelData(0),o=s.getChannelData(1),a;for(let l=0;l<i;l++)a=this._reverse?i-l:l,n[l]=(Math.random()*2-1)*Math.pow(1-a/i,this._decay),o[l]=(Math.random()*2-1)*Math.pow(1-a/i,this._decay);let u=e.createConvolver();u.buffer=s,this.init(u);}};var Wx=class extends Ze{constructor(e=0){let t,i,s;if(!fe().useLegacy){let{audioContext:n}=fe().context;n.createStereoPanner?(t=n.createStereoPanner(),s=t):(i=n.createPanner(),i.panningModel="equalpower",s=i);}super(s),this._stereo=t,this._panner=i,this.pan=e;}set pan(e){this._pan=e,this._stereo?je.setParamValue(this._stereo.pan,e):this._panner&&this._panner.setPosition(e,0,1-Math.abs(e));}get pan(){return this._pan}destroy(){super.destroy(),this._stereo=null,this._panner=null;}};var Xx=class extends Ze{constructor(){let e,t;if(!fe().useLegacy){let{audioContext:i}=fe().context;e=i.createMediaStreamDestination(),t=i.createMediaStreamSource(e.stream);}super(e,t),this._stream=e?.stream;}get stream(){return this._stream}destroy(){this._stream=null,super.destroy();}};var Yx=class extends Ze{constructor(){let e,t;if(!fe().useLegacy){let{audioContext:i}=fe().context,s=i.createBiquadFilter(),n=i.createBiquadFilter(),o=i.createBiquadFilter(),a=i.createBiquadFilter();s.type="lowpass",je.setParamValue(s.frequency,2e3),n.type="lowpass",je.setParamValue(n.frequency,2e3),o.type="highpass",je.setParamValue(o.frequency,500),a.type="highpass",je.setParamValue(a.frequency,500),s.connect(n),n.connect(o),o.connect(a),e=s,t=a;}super(e,t);}};_e();var Rh=class extends te{constructor(){super(...arguments),this.speed=1,this.muted=false,this.volume=1,this.paused=false;}refresh(){this.emit("refresh");}refreshPaused(){this.emit("refreshPaused");}get filters(){return console.warn("HTML Audio does not support filters"),null}set filters(e){console.warn("HTML Audio does not support filters");}get audioContext(){return console.warn("HTML Audio does not support audioContext"),null}toggleMute(){return this.muted=!this.muted,this.refresh(),this.muted}togglePause(){return this.paused=!this.paused,this.refreshPaused(),this.paused}destroy(){this.removeAllListeners();}};_e();var ak=0,ZS=class extends te{constructor(r){super(),this.id=ak++,this.init(r);}set(r,e){if(this[r]===void 0)throw new Error(`Property with name ${r} does not exist.`);switch(r){case "speed":this.speed=e;break;case "volume":this.volume=e;break;case "paused":this.paused=e;break;case "loop":this.loop=e;break;case "muted":this.muted=e;break}return this}get progress(){let{currentTime:r}=this._source;return r/this._duration}get paused(){return this._paused}set paused(r){this._paused=r,this.refreshPaused();}_onPlay(){this._playing=true;}_onPause(){this._playing=false;}init(r){this._playing=false,this._duration=r.source.duration;let e=this._source=r.source.cloneNode(false);e.src=r.parent.url,e.onplay=this._onPlay.bind(this),e.onpause=this._onPause.bind(this),r.context.on("refresh",this.refresh,this),r.context.on("refreshPaused",this.refreshPaused,this),this._media=r;}_internalStop(){this._source&&this._playing&&(this._source.onended=null,this._source.pause());}stop(){this._internalStop(),this._source&&this.emit("stop");}get speed(){return this._speed}set speed(r){this._speed=r,this.refresh();}get volume(){return this._volume}set volume(r){this._volume=r,this.refresh();}get loop(){return this._loop}set loop(r){this._loop=r,this.refresh();}get muted(){return this._muted}set muted(r){this._muted=r,this.refresh();}get filters(){return console.warn("HTML Audio does not support filters"),null}set filters(r){console.warn("HTML Audio does not support filters");}refresh(){let r=this._media.context,e=this._media.parent;this._source.loop=this._loop||e.loop;let t=r.volume*(r.muted?0:1),i=e.volume*(e.muted?0:1),s=this._volume*(this._muted?0:1);this._source.volume=s*t*i,this._source.playbackRate=this._speed*r.speed*e.speed;}refreshPaused(){let r=this._media.context,e=this._media.parent,t=this._paused||e.paused||r.paused;t!==this._pausedReal&&(this._pausedReal=t,t?(this._internalStop(),this.emit("paused")):(this.emit("resumed"),this.play({start:this._source.currentTime,end:this._end,volume:this._volume,speed:this._speed,loop:this._loop})),this.emit("pause",t));}play(r){let{start:e,end:t,speed:i,loop:s,volume:n,muted:o}=r;t&&console.assert(t>e,"End time is before start time"),this._speed=i,this._volume=n,this._loop=!!s,this._muted=o,this.refresh(),this.loop&&t!==null&&(console.warn('Looping not support when specifying an "end" time'),this.loop=false),this._start=e,this._end=t||this._duration,this._start=Math.max(0,this._start-ZS.PADDING),this._end=Math.min(this._end+ZS.PADDING,this._duration),this._source.onloadedmetadata=()=>{this._source&&(this._source.currentTime=e,this._source.onloadedmetadata=null,this.emit("progress",e/this._duration,this._duration),de.shared.add(this._onUpdate,this));},this._source.onended=this._onComplete.bind(this),this._source.play(),this.emit("start");}_onUpdate(){this.emit("progress",this.progress,this._duration),this._source.currentTime>=this._end&&!this._source.loop&&this._onComplete();}_onComplete(){de.shared.remove(this._onUpdate,this),this._internalStop(),this.emit("progress",1,this._duration),this.emit("end",this);}destroy(){de.shared.remove(this._onUpdate,this),this.removeAllListeners();let r=this._source;r&&(r.onended=null,r.onplay=null,r.onpause=null,this._internalStop()),this._source=null,this._speed=1,this._volume=1,this._loop=false,this._end=null,this._start=0,this._duration=0,this._playing=false,this._pausedReal=false,this._paused=false,this._muted=false,this._media&&(this._media.context.off("refresh",this.refresh,this),this._media.context.off("refreshPaused",this.refreshPaused,this),this._media=null);}toString(){return `[HTMLAudioInstance id=${this.id}]`}},$x=ZS;$x.PADDING=.1;_e();var Mh=class extends te{init(e){this.parent=e,this._source=e.options.source||new Audio,e.url&&(this._source.src=e.url);}create(){return new $x(this)}get isPlayable(){return !!this._source&&this._source.readyState===4}get duration(){return this._source.duration}get context(){return this.parent.context}get filters(){return null}set filters(e){console.warn("HTML Audio does not support filters");}destroy(){this.removeAllListeners(),this.parent=null,this._source&&(this._source.src="",this._source.load(),this._source=null);}get source(){return this._source}load(e){let t=this._source,i=this.parent;if(t.readyState===4){i.isLoaded=true;let u=i.autoPlayStart();e&&setTimeout(()=>{e(null,i,u);},0);return}if(!i.url){e(new Error("sound.url or sound.source must be set"));return}t.src=i.url;let s=()=>{a(),i.isLoaded=true;let u=i.autoPlayStart();e&&e(null,i,u);},n=()=>{a(),e&&e(new Error("Sound loading has been aborted"));},o=()=>{a();let u=`Failed to load audio element (code: ${t.error.code})`;e?e(new Error(u)):console.error(u);},a=()=>{t.removeEventListener("canplaythrough",s),t.removeEventListener("load",s),t.removeEventListener("abort",n),t.removeEventListener("error",o);};t.addEventListener("canplaythrough",s,false),t.addEventListener("load",s,false),t.addEventListener("abort",n,false),t.addEventListener("error",o,false),t.load();}};_e();var Dh=class{constructor(e,t){this.parent=e,Object.assign(this,t),this.duration=this.end-this.start,console.assert(this.duration>0,"End time must be after start time");}play(e){return this.parent.play({complete:e,speed:this.speed||this.parent.speed,end:this.end,start:this.start,loop:this.loop})}destroy(){this.parent=null;}};var vo=["ogg","oga","opus","m4a","mp3","mpeg","wav","aiff","wma","mid","caf"],QS=["audio/mpeg","audio/ogg"],To={};function cB(r){let e={m4a:"audio/mp4",oga:"audio/ogg",opus:'audio/ogg; codecs="opus"',caf:'audio/x-caf; codecs="opus"',...{}},t=document.createElement("audio"),i={},s=/^no$/;vo.forEach(n=>{let o=t.canPlayType(`audio/${n}`).replace(s,""),a=e[n]?t.canPlayType(e[n]).replace(s,""):"";i[n]=!!o||!!a;}),Object.assign(To,i);}cB();_e();_e();var lk=0,Ih=class extends te{constructor(e){super(),this.id=lk++,this._media=null,this._paused=false,this._muted=false,this._elapsed=0,this.init(e);}set(e,t){if(this[e]===void 0)throw new Error(`Property with name ${e} does not exist.`);switch(e){case "speed":this.speed=t;break;case "volume":this.volume=t;break;case "muted":this.muted=t;break;case "loop":this.loop=t;break;case "paused":this.paused=t;break}return this}stop(){this._source&&(this._internalStop(),this.emit("stop"));}get speed(){return this._speed}set speed(e){this._speed=e,this.refresh(),this._update(true);}get volume(){return this._volume}set volume(e){this._volume=e,this.refresh();}get muted(){return this._muted}set muted(e){this._muted=e,this.refresh();}get loop(){return this._loop}set loop(e){this._loop=e,this.refresh();}get filters(){return this._filters}set filters(e){this._filters&&(this._filters?.filter(t=>t).forEach(t=>t.disconnect()),this._filters=null,this._source.connect(this._gain)),this._filters=e?.length?e.slice(0):null,this.refresh();}refresh(){if(!this._source)return;let e=this._media.context,t=this._media.parent;this._source.loop=this._loop||t.loop;let i=e.volume*(e.muted?0:1),s=t.volume*(t.muted?0:1),n=this._volume*(this._muted?0:1);je.setParamValue(this._gain.gain,n*s*i),je.setParamValue(this._source.playbackRate,this._speed*t.speed*e.speed),this.applyFilters();}applyFilters(){if(this._filters?.length){this._source.disconnect();let e=this._source;this._filters.forEach(t=>{e.connect(t.destination),e=t;}),e.connect(this._gain);}}refreshPaused(){let e=this._media.context,t=this._media.parent,i=this._paused||t.paused||e.paused;i!==this._pausedReal&&(this._pausedReal=i,i?(this._internalStop(),this.emit("paused")):(this.emit("resumed"),this.play({start:this._elapsed%this._duration,end:this._end,speed:this._speed,loop:this._loop,volume:this._volume})),this.emit("pause",i));}play(e){let{start:t,end:i,speed:s,loop:n,volume:o,muted:a,filters:u}=e;i&&console.assert(i>t,"End time is before start time"),this._paused=false;let{source:l,gain:c}=this._media.nodes.cloneBufferSource();this._source=l,this._gain=c,this._speed=s,this._volume=o,this._loop=!!n,this._muted=a,this._filters=u,this.refresh();let h=this._source.buffer.duration;this._duration=h,this._end=i,this._lastUpdate=this._now(),this._elapsed=t,this._source.onended=this._onComplete.bind(this),this._loop?(this._source.loopEnd=i,this._source.loopStart=t,this._source.start(0,t)):i?this._source.start(0,t,i-t):this._source.start(0,t),this.emit("start"),this._update(true),this.enableTicker(true);}enableTicker(e){de.shared.remove(this._updateListener,this),e&&de.shared.add(this._updateListener,this);}get progress(){return this._progress}get paused(){return this._paused}set paused(e){this._paused=e,this.refreshPaused();}destroy(){this.removeAllListeners(),this._internalStop(),this._gain&&(this._gain.disconnect(),this._gain=null),this._media&&(this._media.context.events.off("refresh",this.refresh,this),this._media.context.events.off("refreshPaused",this.refreshPaused,this),this._media=null),this._filters?.forEach(e=>e.disconnect()),this._filters=null,this._end=null,this._speed=1,this._volume=1,this._loop=false,this._elapsed=0,this._duration=0,this._paused=false,this._muted=false,this._pausedReal=false;}toString(){return `[WebAudioInstance id=${this.id}]`}_now(){return this._media.context.audioContext.currentTime}_updateListener(){this._update();}_update(e=false){if(this._source){let t=this._now(),i=t-this._lastUpdate;if(i>0||e){let s=this._source.playbackRate.value;this._elapsed+=i*s,this._lastUpdate=t;let n=this._duration,o;if(this._source.loopStart){let a=this._source.loopEnd-this._source.loopStart;o=(this._source.loopStart+this._elapsed%a)/n;}else o=this._elapsed%n/n;this._progress=o,this.emit("progress",this._progress,n);}}}init(e){this._media=e,e.context.events.on("refresh",this.refresh,this),e.context.events.on("refreshPaused",this.refreshPaused,this);}_internalStop(){if(this._source){this.enableTicker(false),this._source.onended=null,this._source.stop(0),this._source.disconnect();try{this._source.buffer=null;}catch(e){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",e);}this._source=null;}}_onComplete(){if(this._source){this.enableTicker(false),this._source.onended=null,this._source.disconnect();try{this._source.buffer=null;}catch(e){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",e);}}this._source=null,this._progress=1,this.emit("progress",1,this._duration),this.emit("end",this);}};var So=class{constructor(e,t){this._output=t,this._input=e;}get destination(){return this._input}get filters(){return this._filters}set filters(e){if(this._filters&&(this._filters.forEach(t=>{t&&t.disconnect();}),this._filters=null,this._input.connect(this._output)),e&&e.length){this._filters=e.slice(0),this._input.disconnect();let t=null;e.forEach(i=>{t===null?this._input.connect(i.destination):t.connect(i.destination),t=i;}),t.connect(this._output);}}destroy(){this.filters=null,this._input=null,this._output=null;}};var hB=class extends So{constructor(r){let e=r.audioContext,t=e.createBufferSource(),i=e.createGain(),s=e.createAnalyser();t.connect(s),s.connect(i),i.connect(r.destination),super(s,i),this.context=r,this.bufferSource=t,this.gain=i,this.analyser=s;}get script(){return this._script||(this._script=this.context.audioContext.createScriptProcessor(hB.BUFFER_SIZE),this._script.connect(this.context.destination)),this._script}destroy(){super.destroy(),this.bufferSource.disconnect(),this._script&&this._script.disconnect(),this.gain.disconnect(),this.analyser.disconnect(),this.bufferSource=null,this._script=null,this.gain=null,this.analyser=null,this.context=null;}cloneBufferSource(){let r=this.bufferSource,e=this.context.audioContext.createBufferSource();e.buffer=r.buffer,je.setParamValue(e.playbackRate,r.playbackRate.value),e.loop=r.loop;let t=this.context.audioContext.createGain();return e.connect(t),t.connect(this.destination),{source:e,gain:t}}get bufferSize(){return this.script.bufferSize}},jx=hB;jx.BUFFER_SIZE=0;var Eo=class{init(e){this.parent=e,this._nodes=new jx(this.context),this._source=this._nodes.bufferSource,this.source=e.options.source;}destroy(){this.parent=null,this._nodes.destroy(),this._nodes=null;try{this._source.buffer=null;}catch(e){console.warn("Failed to set AudioBufferSourceNode.buffer to null:",e);}this._source=null,this.source=null;}create(){return new Ih(this)}get context(){return this.parent.context}get isPlayable(){return !!this._source&&!!this._source.buffer}get filters(){return this._nodes.filters}set filters(e){this._nodes.filters=e;}get duration(){return console.assert(this.isPlayable,"Sound not yet playable, no duration"),this._source.buffer.duration}get buffer(){return this._source.buffer}set buffer(e){this._source.buffer=e;}get nodes(){return this._nodes}load(e){this.source?this._decode(this.source,e):this.parent.url?this._loadUrl(e):e?e(new Error("sound.url or sound.source must be set")):console.error("sound.url or sound.source must be set");}async _loadUrl(e){let t=this.parent.url,i=await L.get().fetch(t);this._decode(await i.arrayBuffer(),e);}_decode(e,t){let i=(s,n)=>{if(s)t&&t(s);else {this.parent.isLoaded=true,this.buffer=n;let o=this.parent.autoPlayStart();t&&t(null,this.parent,o);}};e instanceof AudioBuffer?i(null,e):this.parent.context.decode(e,i);}};var Hu=class{static from(r){let e={};typeof r=="string"?e.url=r:r instanceof ArrayBuffer||r instanceof AudioBuffer||r instanceof HTMLAudioElement?e.source=r:Array.isArray(r)?e.url=r:e=r,e={autoPlay:false,singleInstance:false,url:null,source:null,preload:false,volume:1,speed:1,complete:null,loaded:null,loop:false,...e},Object.freeze(e);let t=fe().useLegacy?new Mh:new Eo;return new Hu(t,e)}constructor(r,e){this.media=r,this.options=e,this._instances=[],this._sprites={},this.media.init(this);let t=e.complete;this._autoPlayOptions=t?{complete:t}:null,this.isLoaded=false,this._preloadQueue=null,this.isPlaying=false,this.autoPlay=e.autoPlay,this.singleInstance=e.singleInstance,this.preload=e.preload||this.autoPlay,this.url=Array.isArray(e.url)?this.preferUrl(e.url):e.url,this.speed=e.speed,this.volume=e.volume,this.loop=e.loop,e.sprites&&this.addSprites(e.sprites),this.preload&&this._preload(e.loaded);}preferUrl(r){let[e]=r.map(t=>({url:t,ext:Te.extname(t).slice(1)})).filter(({ext:t})=>To[t]).sort((t,i)=>vo.indexOf(t.ext)-vo.indexOf(i.ext));if(!e)throw new Error("No supported file type found");return e.url}get context(){return fe().context}pause(){return this.isPlaying=false,this.paused=true,this}resume(){return this.isPlaying=this._instances.length>0,this.paused=false,this}get paused(){return this._paused}set paused(r){this._paused=r,this.refreshPaused();}get speed(){return this._speed}set speed(r){this._speed=r,this.refresh();}get filters(){return this.media.filters}set filters(r){this.media.filters=r;}addSprites(r,e){if(typeof r=="object"){let i={};for(let s in r)i[s]=this.addSprites(s,r[s]);return i}console.assert(!this._sprites[r],`Alias ${r} is already taken`);let t=new Dh(this,e);return this._sprites[r]=t,t}destroy(){this._removeInstances(),this.removeSprites(),this.media.destroy(),this.media=null,this._sprites=null,this._instances=null;}removeSprites(r){if(r){let e=this._sprites[r];e!==void 0&&(e.destroy(),delete this._sprites[r]);}else for(let e in this._sprites)this.removeSprites(e);return this}get isPlayable(){return this.isLoaded&&this.media&&this.media.isPlayable}stop(){if(!this.isPlayable)return this.autoPlay=false,this._autoPlayOptions=null,this;this.isPlaying=false;for(let r=this._instances.length-1;r>=0;r--)this._instances[r].stop();return this}play(r,e){let t;if(typeof r=="string"?t={sprite:r,loop:this.loop,complete:e}:typeof r=="function"?(t={},t.complete=r):t=r,t={complete:null,loaded:null,sprite:null,end:null,start:0,volume:1,speed:1,muted:false,loop:false,...t||{}},t.sprite){let s=t.sprite;console.assert(!!this._sprites[s],`Alias ${s} is not available`);let n=this._sprites[s];t.start=n.start+(t.start||0),t.end=n.end,t.speed=n.speed||1,t.loop=n.loop||t.loop,delete t.sprite;}if(t.offset&&(t.start=t.offset),!this.isLoaded)return this._preloadQueue?new Promise(s=>{this._preloadQueue.push(()=>{s(this.play(t));});}):(this._preloadQueue=[],this.autoPlay=true,this._autoPlayOptions=t,new Promise((s,n)=>{this._preload((o,a,u)=>{this._preloadQueue.forEach(l=>l()),this._preloadQueue=null,o?n(o):(t.loaded&&t.loaded(o,a,u),s(u));});}));(this.singleInstance||t.singleInstance)&&this._removeInstances();let i=this._createInstance();return this._instances.push(i),this.isPlaying=true,i.once("end",()=>{t.complete&&t.complete(this),this._onComplete(i);}),i.once("stop",()=>{this._onComplete(i);}),i.play(t),i}refresh(){let r=this._instances.length;for(let e=0;e<r;e++)this._instances[e].refresh();}refreshPaused(){let r=this._instances.length;for(let e=0;e<r;e++)this._instances[e].refreshPaused();}get volume(){return this._volume}set volume(r){this._volume=r,this.refresh();}get muted(){return this._muted}set muted(r){this._muted=r,this.refresh();}get loop(){return this._loop}set loop(r){this._loop=r,this.refresh();}_preload(r){this.media.load(r);}get instances(){return this._instances}get sprites(){return this._sprites}get duration(){return this.media.duration}autoPlayStart(){let r;return this.autoPlay&&(r=this.play(this._autoPlayOptions)),r}_removeInstances(){for(let r=this._instances.length-1;r>=0;r--)this._poolInstance(this._instances[r]);this._instances.length=0;}_onComplete(r){if(this._instances){let e=this._instances.indexOf(r);e>-1&&this._instances.splice(e,1),this.isPlaying=this._instances.length>0;}this._poolInstance(r);}_createInstance(){if(Hu._pool.length>0){let r=Hu._pool.pop();return r.init(this.media),r}return this.media.create()}_poolInstance(r){r.destroy(),Hu._pool.indexOf(r)<0&&Hu._pool.push(r);}},Ps=Hu;Ps._pool=[];_e();var Vu=class r extends So{constructor(){let e=window,t=new r.AudioContext,i=t.createDynamicsCompressor(),s=t.createAnalyser();s.connect(i),i.connect(t.destination),super(s,i),this.autoPause=true,this._ctx=t,this._offlineCtx=new r.OfflineAudioContext(1,2,e.OfflineAudioContext?Math.max(8e3,Math.min(96e3,t.sampleRate)):44100),this.compressor=i,this.analyser=s,this.events=new te,this.volume=1,this.speed=1,this.muted=false,this.paused=false,this._locked=t.state==="suspended"&&("ontouchstart"in globalThis||"onclick"in globalThis),this._locked&&(this._unlock(),this._unlock=this._unlock.bind(this),document.addEventListener("mousedown",this._unlock,true),document.addEventListener("touchstart",this._unlock,true),document.addEventListener("touchend",this._unlock,true)),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),globalThis.addEventListener("focus",this.onFocus),globalThis.addEventListener("blur",this.onBlur);}onFocus(){if(!this.autoPause)return;let e=this._ctx.state;(e==="suspended"||e==="interrupted"||!this._locked)&&(this.paused=this._pausedOnBlur,this.refreshPaused());}onBlur(){this.autoPause&&(this._locked||(this._pausedOnBlur=this._paused,this.paused=true,this.refreshPaused()));}_unlock(){this._locked&&(this.playEmptySound(),this._ctx.state==="running"&&(document.removeEventListener("mousedown",this._unlock,true),document.removeEventListener("touchend",this._unlock,true),document.removeEventListener("touchstart",this._unlock,true),this._locked=false));}playEmptySound(){let e=this._ctx.createBufferSource();e.buffer=this._ctx.createBuffer(1,1,22050),e.connect(this._ctx.destination),e.start(0,0,0),e.context.state==="suspended"&&e.context.resume();}static get AudioContext(){let e=window;return e.AudioContext||e.webkitAudioContext||null}static get OfflineAudioContext(){let e=window;return e.OfflineAudioContext||e.webkitOfflineAudioContext||null}destroy(){super.destroy();let e=this._ctx;typeof e.close<"u"&&e.close(),globalThis.removeEventListener("focus",this.onFocus),globalThis.removeEventListener("blur",this.onBlur),this.events.removeAllListeners(),this.analyser.disconnect(),this.compressor.disconnect(),this.analyser=null,this.compressor=null,this.events=null,this._offlineCtx=null,this._ctx=null;}get audioContext(){return this._ctx}get offlineContext(){return this._offlineCtx}set paused(e){e&&this._ctx.state==="running"?this._ctx.suspend():!e&&this._ctx.state==="suspended"&&this._ctx.resume(),this._paused=e;}get paused(){return this._paused}refresh(){this.events.emit("refresh");}refreshPaused(){this.events.emit("refreshPaused");}toggleMute(){return this.muted=!this.muted,this.refresh(),this.muted}togglePause(){return this.paused=!this.paused,this.refreshPaused(),this._paused}decode(e,t){let i=n=>{t(new Error(n?.message||"Unable to decode file"));},s=this._offlineCtx.decodeAudioData(e,n=>{t(null,n);},i);s&&s.catch(i);}};var qx=class{constructor(){this.init();}init(){return this.supported&&(this._webAudioContext=new Vu),this._htmlAudioContext=new Rh,this._sounds={},this.useLegacy=!this.supported,this}get context(){return this._context}get filtersAll(){return this.useLegacy?[]:this._context.filters}set filtersAll(e){this.useLegacy||(this._context.filters=e);}get supported(){return Vu.AudioContext!==null}add(e,t){if(typeof e=="object"){let n={};for(let o in e){let a=this._getOptions(e[o],t);n[o]=this.add(o,a);}return n}if(console.assert(!this._sounds[e],`Sound with alias ${e} already exists.`),t instanceof Ps)return this._sounds[e]=t,t;let i=this._getOptions(t),s=Ps.from(i);return this._sounds[e]=s,s}_getOptions(e,t){let i;return typeof e=="string"?i={url:e}:Array.isArray(e)?i={url:e}:e instanceof ArrayBuffer||e instanceof AudioBuffer||e instanceof HTMLAudioElement?i={source:e}:i=e,i={...i,...t||{}},i}get useLegacy(){return this._useLegacy}set useLegacy(e){this._useLegacy=e,this._context=!e&&this.supported?this._webAudioContext:this._htmlAudioContext;}get disableAutoPause(){return !this._webAudioContext.autoPause}set disableAutoPause(e){this._webAudioContext.autoPause=!e;}remove(e){return this.exists(e,true),this._sounds[e].destroy(),delete this._sounds[e],this}get volumeAll(){return this._context.volume}set volumeAll(e){this._context.volume=e,this._context.refresh();}get speedAll(){return this._context.speed}set speedAll(e){this._context.speed=e,this._context.refresh();}togglePauseAll(){return this._context.togglePause()}pauseAll(){return this._context.paused=true,this._context.refreshPaused(),this}resumeAll(){return this._context.paused=false,this._context.refreshPaused(),this}toggleMuteAll(){return this._context.toggleMute()}muteAll(){return this._context.muted=true,this._context.refresh(),this}unmuteAll(){return this._context.muted=false,this._context.refresh(),this}removeAll(){for(let e in this._sounds)this._sounds[e].destroy(),delete this._sounds[e];return this}stopAll(){for(let e in this._sounds)this._sounds[e].stop();return this}exists(e,t=false){let i=!!this._sounds[e];return t&&console.assert(i,`No sound matching alias '${e}'.`),i}isPlaying(){for(let e in this._sounds)if(this._sounds[e].isPlaying)return true;return false}find(e){return this.exists(e,true),this._sounds[e]}play(e,t){return this.find(e).play(t)}stop(e){return this.find(e).stop()}pause(e){return this.find(e).pause()}resume(e){return this.find(e).resume()}volume(e,t){let i=this.find(e);return t!==void 0&&(i.volume=t),i.volume}speed(e,t){let i=this.find(e);return t!==void 0&&(i.speed=t),i.speed}duration(e){return this.find(e).duration}close(){return this.removeAll(),this._sounds=null,this._webAudioContext&&(this._webAudioContext.destroy(),this._webAudioContext=null),this._htmlAudioContext&&(this._htmlAudioContext.destroy(),this._htmlAudioContext=null),this._context=null,this}};_e();_e();var dB=r=>{let e=r.src,t=r?.alias?.[0];return (!t||r.src===t)&&(t=Te.basename(e,Te.extname(e))),t},fB={extension:m.Asset,detection:{test:async()=>true,add:async r=>[...r,...vo.filter(e=>To[e])],remove:async r=>r.filter(e=>r.includes(e))},loader:{name:"sound",extension:{type:[m.LoadParser],priority:ve.High},test(r){let e=Te.extname(r).slice(1);return !!To[e]||QS.some(t=>r.startsWith(`data:${t}`))},async load(r,e){let t=await new Promise((i,s)=>Ps.from({...e.data,url:r,preload:true,loaded(n,o){n?s(n):i(o),e.data?.loaded?.(n,o);}}));return fe().add(dB(e),t),t},async unload(r,e){fe().remove(dB(e));}}};F.add(fB);lB(new qx);var kh="repeat";({DistortionFilter:$r.DistortionFilter,EqualizerFilter:$r.EqualizerFilter,MonoFilter:$r.MonoFilter,ReverbFilter:$r.ReverbFilter,StereoFilter:$r.StereoFilter,StreamFilter:$r.StreamFilter,TelephoneFilter:$r.TelephoneFilter});var pB=["webm","mp4","ogv","mov","avi","wmv","flv","mkv","3gp","mpg","mpeg","m4v","f4v","m2v","asf","vob","ts","m2ts","mts","divx","xvid","rm","rmvb","dat","swf","mpv","mxf","vcd","svcd","dvd","dv","3g2","m2p","m2ts","m2v","m4v","mpe","mpg","mpv2","ogm","qt","rm","ts","vob","wmv","xvid","flv","mkv","mov","mp4","webm","avi","ogv","m4v","f4v","m2v","asf","vob","ts","m2ts","mts","divx","xvid","rm","rmvb","dat","swf","mpv","mxf","vcd","svcd","dvd","dv","3g2","m2p","m2ts","m2v","m4v","mpe","mpg","mpv2","ogm","qt","rm","ts","vob","wmv","xvid","flv","mkv","mov","mp4","webm","avi","ogv","m4v","f4v","m2v","asf","vob"],Mr="__game_layer__",zu="Container",Kx="ImageContainer",JS="Image",Wu="Sprite",Xu="Text",e1="Video";var N;(s=>(s.log=(n,...o)=>console.log(`[Pixi\u2019VN] ${n}`,...o),s.warn=(n,...o)=>console.warn(`[Pixi\u2019VN] ${n}`,...o),s.error=(n,...o)=>console.error(`[Pixi\u2019VN] ${n}`,...o),s.info=(n,...o)=>console.info(`[Pixi\u2019VN] ${n}`,...o)))(N||={});function St(r){try{if(typeof r>"u")return r;let e=JSON.stringify(r);return JSON.parse(e)}catch(e){throw N.error("Error creating exportable element",r,e),new Error("[Pixi\u2019VN] Error creating exportable element")}}async function mB(r){var e;let t={importPixi:false,...r};t.app&&(t.renderer=t.app.renderer,t.stage=t.app.stage),t.importPixi&&!t.pixi&&(t.pixi=await Promise.resolve().then(()=>(_e(),oB))),window.__PIXI_DEVTOOLS__={...window.__PIXI_DEVTOOLS__||{},app:t.app,stage:t.stage,renderer:t.renderer,extensions:[...((e=window.__PIXI_DEVTOOLS__)==null?void 0:e.extensions)||[],...t.extensions||[]],plugins:{}};}var MB=Ro(bB());_e();var Nt=class r{static init(e){r._getScreen=e.getScreen;}static _getScreen;static get screen(){return r._getScreen()}};_e();var Yu=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,vB=new Set,t1=typeof process=="object"&&process?process:{},TB=(r,e,t,i)=>{typeof t1.emitWarning=="function"?t1.emitWarning(r,e,t,i):console.error(`[${t}] ${e}: ${r}`);},Jx=globalThis.AbortController,yB=globalThis.AbortSignal;if(typeof Jx>"u"){yB=class{onabort;_onabort=[];reason;aborted=false;addEventListener(i,s){this._onabort.push(s);}},Jx=class{constructor(){e();}signal=new yB;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 r=t1.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{r&&(r=false,TB("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 dk=r=>!vB.has(r),ws=r=>r&&r===Math.floor(r)&&r>0&&isFinite(r),SB=r=>ws(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?$u:null:null,$u=class extends Array{constructor(e){super(e),this.fill(0);}},r1=class r{heap;length;static#u=false;static create(e){let t=SB(e);if(!t)return [];r.#u=true;let i=new r(e,t);return r.#u=false,i}constructor(e,t){if(!r.#u)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0;}push(e){this.heap[this.length++]=e;}pop(){return this.heap[--this.length]}},e_=class r{#u;#h;#m;#P;#g;#M;#D;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#s;#x;#i;#r;#e;#l;#d;#a;#n;#_;#o;#b;#y;#f;#v;#C;#c;#I;static unsafeExposeInternals(e){return {starts:e.#y,ttls:e.#f,sizes:e.#b,keyMap:e.#i,keyList:e.#r,valList:e.#e,next:e.#l,prev:e.#d,get head(){return e.#a},get tail(){return e.#n},free:e.#_,isBackgroundFetch:t=>e.#t(t),backgroundFetch:(t,i,s,n)=>e.#O(t,i,s,n),moveToTail:t=>e.#R(t),indexes:t=>e.#T(t),rindexes:t=>e.#S(t),isStale:t=>e.#p(t)}}get max(){return this.#u}get maxSize(){return this.#h}get calculatedSize(){return this.#x}get size(){return this.#s}get fetchMethod(){return this.#M}get memoMethod(){return this.#D}get dispose(){return this.#m}get onInsert(){return this.#P}get disposeAfter(){return this.#g}constructor(e){let{max:t=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:u,dispose:l,onInsert:c,disposeAfter:h,noDisposeOnSet:d,noUpdateTTL:p,maxSize:g=0,maxEntrySize:b=0,sizeCalculation:_,fetchMethod:x,memoMethod:y,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:v,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:E,ignoreFetchAbort:C}=e;if(t!==0&&!ws(t))throw new TypeError("max option must be a nonnegative integer");let I=t?SB(t):Array;if(!I)throw new Error("invalid max value: "+t);if(this.#u=t,this.#h=g,this.maxEntrySize=b||this.#h,this.sizeCalculation=_,this.sizeCalculation){if(!this.#h&&!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(y!==void 0&&typeof y!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#D=y,x!==void 0&&typeof x!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#M=x,this.#C=!!x,this.#i=new Map,this.#r=new Array(t).fill(void 0),this.#e=new Array(t).fill(void 0),this.#l=new I(t),this.#d=new I(t),this.#a=0,this.#n=0,this.#_=r1.create(t),this.#s=0,this.#x=0,typeof l=="function"&&(this.#m=l),typeof c=="function"&&(this.#P=c),typeof h=="function"?(this.#g=h,this.#o=[]):(this.#g=void 0,this.#o=void 0),this.#v=!!this.#m,this.#I=!!this.#P,this.#c=!!this.#g,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!w,this.allowStaleOnFetchAbort=!!E,this.ignoreFetchAbort=!!C,this.maxEntrySize!==0){if(this.#h!==0&&!ws(this.#h))throw new TypeError("maxSize must be a positive integer if specified");if(!ws(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#z();}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!v,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=ws(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!ws(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#G();}if(this.#u===0&&this.ttl===0&&this.#h===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#u&&!this.#h){let k="LRU_CACHE_UNBOUNDED";dk(k)&&(vB.add(k),TB("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",k,r));}}getRemainingTTL(e){return this.#i.has(e)?1/0:0}#G(){let e=new $u(this.#u),t=new $u(this.#u);this.#f=e,this.#y=t,this.#U=(n,o,a=Yu.now())=>{if(t[n]=o!==0?a:0,e[n]=o,o!==0&&this.ttlAutopurge){let u=setTimeout(()=>{this.#p(n)&&this.#E(this.#r[n],"expire");},o+1);u.unref&&u.unref();}},this.#w=n=>{t[n]=e[n]!==0?Yu.now():0;},this.#A=(n,o)=>{if(e[o]){let a=e[o],u=t[o];if(!a||!u)return;n.ttl=a,n.start=u,n.now=i||s();let l=n.now-u;n.remainingTTL=a-l;}};let i=0,s=()=>{let n=Yu.now();if(this.ttlResolution>0){i=n;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref();}return n};this.getRemainingTTL=n=>{let o=this.#i.get(n);if(o===void 0)return 0;let a=e[o],u=t[o];if(!a||!u)return 1/0;let l=(i||s())-u;return a-l},this.#p=n=>{let o=t[n],a=e[n];return !!a&&!!o&&(i||s())-o>a};}#w=()=>{};#A=()=>{};#U=()=>{};#p=()=>false;#z(){let e=new $u(this.#u);this.#x=0,this.#b=e,this.#B=t=>{this.#x-=e[t],e[t]=0;},this.#L=(t,i,s,n)=>{if(this.#t(i))return 0;if(!ws(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,t),!ws(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},this.#k=(t,i,s)=>{if(e[t]=i,this.#h){let n=this.#h-e[t];for(;this.#x>n;)this.#F(true);}this.#x+=e[t],s&&(s.entrySize=i,s.totalCalculatedSize=this.#x);};}#B=e=>{};#k=(e,t,i)=>{};#L=(e,t,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#T({allowStale:e=this.allowStale}={}){if(this.#s)for(let t=this.#n;!(!this.#N(t)||((e||!this.#p(t))&&(yield t),t===this.#a));)t=this.#d[t];}*#S({allowStale:e=this.allowStale}={}){if(this.#s)for(let t=this.#a;!(!this.#N(t)||((e||!this.#p(t))&&(yield t),t===this.#n));)t=this.#l[t];}#N(e){return e!==void 0&&this.#i.get(this.#r[e])===e}*entries(){for(let e of this.#T())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#r[e],this.#e[e]]);}*rentries(){for(let e of this.#S())this.#e[e]!==void 0&&this.#r[e]!==void 0&&!this.#t(this.#e[e])&&(yield [this.#r[e],this.#e[e]]);}*keys(){for(let e of this.#T()){let t=this.#r[e];t!==void 0&&!this.#t(this.#e[e])&&(yield t);}}*rkeys(){for(let e of this.#S()){let t=this.#r[e];t!==void 0&&!this.#t(this.#e[e])&&(yield t);}}*values(){for(let e of this.#T())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}*rvalues(){for(let e of this.#S())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e]);}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#T()){let s=this.#e[i],n=this.#t(s)?s.__staleWhileFetching:s;if(n!==void 0&&e(n,this.#r[i],this))return this.get(this.#r[i],t)}}forEach(e,t=this){for(let i of this.#T()){let s=this.#e[i],n=this.#t(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#r[i],this);}}rforEach(e,t=this){for(let i of this.#S()){let s=this.#e[i],n=this.#t(s)?s.__staleWhileFetching:s;n!==void 0&&e.call(t,n,this.#r[i],this);}}purgeStale(){let e=false;for(let t of this.#S({allowStale:true}))this.#p(t)&&(this.#E(this.#r[t],"expire"),e=true);return e}info(e){let t=this.#i.get(e);if(t===void 0)return;let i=this.#e[t],s=this.#t(i)?i.__staleWhileFetching:i;if(s===void 0)return;let n={value:s};if(this.#f&&this.#y){let o=this.#f[t],a=this.#y[t];if(o&&a){let u=o-(Yu.now()-a);n.ttl=u,n.start=Date.now();}}return this.#b&&(n.size=this.#b[t]),n}dump(){let e=[];for(let t of this.#T({allowStale:true})){let i=this.#r[t],s=this.#e[t],n=this.#t(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let o={value:n};if(this.#f&&this.#y){o.ttl=this.#f[t];let a=Yu.now()-this.#y[t];o.start=Math.floor(Date.now()-a);}this.#b&&(o.size=this.#b[t]),e.unshift([i,o]);}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let s=Date.now()-i.start;i.start=Yu.now()-s;}this.set(t,i.value,i);}}set(e,t,i={}){if(t===void 0)return this.delete(e),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:u}=i,{noUpdateTTL:l=this.noUpdateTTL}=i,c=this.#L(e,t,i.size||0,a);if(this.maxEntrySize&&c>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=true),this.#E(e,"set"),this;let h=this.#s===0?void 0:this.#i.get(e);if(h===void 0)h=this.#s===0?this.#n:this.#_.length!==0?this.#_.pop():this.#s===this.#u?this.#F(false):this.#s,this.#r[h]=e,this.#e[h]=t,this.#i.set(e,h),this.#l[this.#n]=h,this.#d[h]=this.#n,this.#n=h,this.#s++,this.#k(h,c,u),u&&(u.set="add"),l=false,this.#I&&this.#P?.(t,e,"add");else {this.#R(h);let d=this.#e[h];if(t!==d){if(this.#C&&this.#t(d)){d.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:p}=d;p!==void 0&&!o&&(this.#v&&this.#m?.(p,e,"set"),this.#c&&this.#o?.push([p,e,"set"]));}else o||(this.#v&&this.#m?.(d,e,"set"),this.#c&&this.#o?.push([d,e,"set"]));if(this.#B(h),this.#k(h,c,u),this.#e[h]=t,u){u.set="replace";let p=d&&this.#t(d)?d.__staleWhileFetching:d;p!==void 0&&(u.oldValue=p);}}else u&&(u.set="update");this.#I&&this.onInsert?.(t,e,t===d?"update":"replace");}if(s!==0&&!this.#f&&this.#G(),this.#f&&(l||this.#U(h,s,n),u&&this.#A(u,h)),!o&&this.#c&&this.#o){let d=this.#o,p;for(;p=d?.shift();)this.#g?.(...p);}return this}pop(){try{for(;this.#s;){let e=this.#e[this.#a];if(this.#F(!0),this.#t(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#c&&this.#o){let e=this.#o,t;for(;t=e?.shift();)this.#g?.(...t);}}}#F(e){let t=this.#a,i=this.#r[t],s=this.#e[t];return this.#C&&this.#t(s)?s.__abortController.abort(new Error("evicted")):(this.#v||this.#c)&&(this.#v&&this.#m?.(s,i,"evict"),this.#c&&this.#o?.push([s,i,"evict"])),this.#B(t),e&&(this.#r[t]=void 0,this.#e[t]=void 0,this.#_.push(t)),this.#s===1?(this.#a=this.#n=0,this.#_.length=0):this.#a=this.#l[t],this.#i.delete(i),this.#s--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=t,n=this.#i.get(e);if(n!==void 0){let o=this.#e[n];if(this.#t(o)&&o.__staleWhileFetching===void 0)return false;if(this.#p(n))s&&(s.has="stale",this.#A(s,n));else return i&&this.#w(n),s&&(s.has="hit",this.#A(s,n)),true}else s&&(s.has="miss");return false}peek(e,t={}){let{allowStale:i=this.allowStale}=t,s=this.#i.get(e);if(s===void 0||!i&&this.#p(s))return;let n=this.#e[s];return this.#t(n)?n.__staleWhileFetching:n}#O(e,t,i,s){let n=t===void 0?void 0:this.#e[t];if(this.#t(n))return n;let o=new Jx,{signal:a}=i;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let u={signal:o.signal,options:i,context:s},l=(b,_=false)=>{let{aborted:x}=o.signal,y=i.ignoreFetchAbort&&b!==void 0;if(i.status&&(x&&!_?(i.status.fetchAborted=true,i.status.fetchError=o.signal.reason,y&&(i.status.fetchAbortIgnored=true)):i.status.fetchResolved=true),x&&!y&&!_)return h(o.signal.reason);let T=p;return this.#e[t]===p&&(b===void 0?T.__staleWhileFetching?this.#e[t]=T.__staleWhileFetching:this.#E(e,"fetch"):(i.status&&(i.status.fetchUpdated=true),this.set(e,b,u.options))),b},c=b=>(i.status&&(i.status.fetchRejected=true,i.status.fetchError=b),h(b)),h=b=>{let{aborted:_}=o.signal,x=_&&i.allowStaleOnFetchAbort,y=x||i.allowStaleOnFetchRejection,T=y||i.noDeleteOnFetchRejection,v=p;if(this.#e[t]===p&&(!T||v.__staleWhileFetching===void 0?this.#E(e,"fetch"):x||(this.#e[t]=v.__staleWhileFetching)),y)return i.status&&v.__staleWhileFetching!==void 0&&(i.status.returnedStale=true),v.__staleWhileFetching;if(v.__returned===v)throw b},d=(b,_)=>{let x=this.#M?.(e,n,u);x&&x instanceof Promise&&x.then(y=>b(y===void 0?void 0:y),_),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(b(void 0),i.allowStaleOnFetchAbort&&(b=y=>l(y,true)));});};i.status&&(i.status.fetchDispatched=true);let p=new Promise(d).then(l,c),g=Object.assign(p,{__abortController:o,__staleWhileFetching:n,__returned:void 0});return t===void 0?(this.set(e,g,{...u.options,status:void 0}),t=this.#i.get(e)):this.#e[t]=g,g}#t(e){if(!this.#C)return false;let t=e;return !!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof Jx}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:u=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:b,forceRefresh:_=false,status:x,signal:y}=t;if(!this.#C)return x&&(x.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:x});let T={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:o,noDisposeOnSet:a,size:u,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:g,ignoreFetchAbort:p,status:x,signal:y},v=this.#i.get(e);if(v===void 0){x&&(x.fetch="miss");let w=this.#O(e,v,T,b);return w.__returned=w}else {let w=this.#e[v];if(this.#t(w)){let O=i&&w.__staleWhileFetching!==void 0;return x&&(x.fetch="inflight",O&&(x.returnedStale=true)),O?w.__staleWhileFetching:w.__returned=w}let E=this.#p(v);if(!_&&!E)return x&&(x.fetch="hit"),this.#R(v),s&&this.#w(v),x&&this.#A(x,v),w;let C=this.#O(e,v,T,b),k=C.__staleWhileFetching!==void 0&&i;return x&&(x.fetch=E?"stale":"refresh",k&&E&&(x.returnedStale=true)),k?C.__staleWhileFetching:C.__returned=C}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#D;if(!i)throw new Error("no memoMethod provided to constructor");let{context:s,forceRefresh:n,...o}=t,a=this.get(e,o);if(!n&&a!==void 0)return a;let u=i(e,a,{options:o,context:s});return this.set(e,u,o),u}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:o}=t,a=this.#i.get(e);if(a!==void 0){let u=this.#e[a],l=this.#t(u);return o&&this.#A(o,a),this.#p(a)?(o&&(o.get="stale"),l?(o&&i&&u.__staleWhileFetching!==void 0&&(o.returnedStale=true),i?u.__staleWhileFetching:void 0):(n||this.#E(e,"expire"),o&&i&&(o.returnedStale=true),i?u:void 0)):(o&&(o.get="hit"),l?u.__staleWhileFetching:(this.#R(a),s&&this.#w(a),u))}else o&&(o.get="miss");}#H(e,t){this.#d[t]=e,this.#l[e]=t;}#R(e){e!==this.#n&&(e===this.#a?this.#a=this.#l[e]:this.#H(this.#d[e],this.#l[e]),this.#H(this.#n,e),this.#n=e);}delete(e){return this.#E(e,"delete")}#E(e,t){let i=false;if(this.#s!==0){let s=this.#i.get(e);if(s!==void 0)if(i=true,this.#s===1)this.#V(t);else {this.#B(s);let n=this.#e[s];if(this.#t(n)?n.__abortController.abort(new Error("deleted")):(this.#v||this.#c)&&(this.#v&&this.#m?.(n,e,t),this.#c&&this.#o?.push([n,e,t])),this.#i.delete(e),this.#r[s]=void 0,this.#e[s]=void 0,s===this.#n)this.#n=this.#d[s];else if(s===this.#a)this.#a=this.#l[s];else {let o=this.#d[s];this.#l[o]=this.#l[s];let a=this.#l[s];this.#d[a]=this.#d[s];}this.#s--,this.#_.push(s);}}if(this.#c&&this.#o?.length){let s=this.#o,n;for(;n=s?.shift();)this.#g?.(...n);}return i}clear(){return this.#V("delete")}#V(e){for(let t of this.#S({allowStale:true})){let i=this.#e[t];if(this.#t(i))i.__abortController.abort(new Error("deleted"));else {let s=this.#r[t];this.#v&&this.#m?.(i,s,e),this.#c&&this.#o?.push([i,s,e]);}}if(this.#i.clear(),this.#e.fill(void 0),this.#r.fill(void 0),this.#f&&this.#y&&(this.#f.fill(0),this.#y.fill(0)),this.#b&&this.#b.fill(0),this.#a=0,this.#n=0,this.#_.length=0,this.#x=0,this.#s=0,this.#c&&this.#o){let t=this.#o,i;for(;i=t?.shift();)this.#g?.(...i);}}};var jr=class{cache;map=new Map;constructor(e){this.cache=new e_({max:e.cacheSize}),this.map=new Map;}get[Symbol.iterator](){return this.map[Symbol.iterator]}get[Symbol.toStringTag](){return this.map[Symbol.toStringTag]}clear(){return this.cache.clear(),this.map.clear()}delete(e){let t=this.map.delete(e);return t&&this.cache.delete(e),t}get forEach(){return this.map.forEach}get(e){let t=this.cache.get(e);return t||this.map.get(e)}has(e){return this.map.has(e)}set(e,t){return this.map.set(e,t),this.cache.set(e,t),this}get size(){return this.map.size}get entries(){return this.map.entries}keys(){return this.map.keys()}get values(){return this.map.values}};var Fh=new jr({cacheSize:5});var EB;(s=>{function r(n,o){o||(o=n.name),Fh.get(o)&&N.warn(`CanvasElement "${o}" already registered`),n.prototype.pixivnId=o,Fh.set(o,n);}s.add=r;function e(n){try{let o=Fh.get(n);if(!o){N.error(`CanvasElement "${n}" not found, did you forget to register it with the canvasComponentDecorator?`);return}return new o,o}catch(o){N.error(`Error while getting CanvasElement "${n}"`,o);return}}s.get=e;function t(){return Array.from(Fh.values())}s.values=t;function i(n){return Fh.has(n)}s.has=i;})(EB||={});var Rt=EB;_e();_e();function i1(r){return "memory"in r?r.memory:r instanceof hr?s1(r):r instanceof me?Oh(r):Ao(r)}function fk(r){return {width:r.width,height:r.height,isRenderGroup:r.isRenderGroup,blendMode:r.blendMode,tint:r.tint,alpha:r.alpha,angle:r.angle,renderable:r.renderable,rotation:r.rotation,scale:{x:r.scale.x,y:r.scale.y},pivot:{x:r.pivot.x,y:r.pivot.y},position:{x:r.position.x,y:r.position.y},skew:{x:r.skew.x,y:r.skew.y},visible:r.visible,x:r.x,y:r.y,boundsArea:r.boundsArea,cursor:r.cursor,eventMode:r.eventMode,interactive:r.interactive,interactiveChildren:r.interactiveChildren,hitArea:r.hitArea}}function AB(r,e){return {url:r.source.label,alias:e===r.source.label?void 0:e}}function Ao(r,e){let t=pk(r,zu),s=e?.childrenExport||false?r.children.sort((n,o)=>r.getChildIndex(n)-r.getChildIndex(o)).map(n=>i1(n)):[];return {pixivnId:t,elements:s,...fk(r)}}function Oh(r){let e=Ao(r),t=e.pixivnId??Wu,i=PB(r),s="textureAlias"in r?AB(r.texture,r.textureAlias):AB(r.texture);return {...e,pixivnId:t,textureData:s,anchor:{x:r.anchor.x,y:r.anchor.y},roundPixels:r.roundPixels,onEvents:i}}function s1(r){let e=Ao(r),t=e.pixivnId??Xu,i=PB(r);return {...e,pixivnId:t,anchor:{x:r.anchor.x,y:r.anchor.y},text:r.text,resolution:r.resolution,style:mk(r.style),roundPixels:r.roundPixels,onEvents:i}}function pk(r,e){return Object.prototype.hasOwnProperty.call(r,"pixivnId")?r.pixivnId:e}function PB(r){return "onEvents"in r?r.onEvents:{}}function CB(r,e){if(typeof r!="object"||r===null)return r;N.warn(`Unsupported property type for Text.style.${e}: FillGradient or FillPattern.`,r);}function mk(r){return {align:r.align,breakWords:r.breakWords,dropShadow:r.dropShadow,fill:CB(r.stroke,"fill"),fontFamily:r.fontFamily,fontSize:r.fontSize,fontStyle:r.fontStyle,fontVariant:r.fontVariant,fontWeight:r.fontWeight,leading:r.leading,letterSpacing:r.letterSpacing,lineHeight:r.lineHeight,padding:r.padding,stroke:CB(r.stroke,"stroke"),textBaseline:r.textBaseline,trim:r.trim,whiteSpace:r.whiteSpace,wordWrap:r.wordWrap,wordWrapWidth:r.wordWrapWidth}}function bi(r,e,t,i,s,n=0){return i=i*(s?-1:1),r==="width"?e*(Nt.screen.width-t)+i+n*t+(s?t:0):e*(Nt.screen.height-t)+i+n*t+(s?t:0)}function qr(r,e,t,i,s,n=0){return i=i*(s?-1:1),r==="width"?(e-i-n*t-(s?t:0))/(Nt.screen.width-t):(e-i-n*t-(s?t:0))/(Nt.screen.height-t)}function yi(r,e){return r==="width"?e*Nt.screen.width:e*Nt.screen.height}function Kr(r,e){return r==="width"?e/Nt.screen.width:e/Nt.screen.height}function We(r,e){if(e=e%360,e<0&&(e+=360),e===0)return {x:r.x,y:r.y};if(e===90)return {x:-r.y,y:r.x};if(e===180)return {x:-r.x,y:-r.y};if(e===270)return {x:r.y,y:-r.x};if(e>0&&e<90){let t=e*Math.PI/180,i=Math.cos(t),s=Math.sin(t);return {x:r.x*i-r.y*s,y:r.x*s+r.y*i}}else if(e>90&&e<180){let t=(e-90)*Math.PI/180,i=Math.cos(t),s=Math.sin(t);return {x:-r.y*s-r.x*i,y:r.y*i-r.x*s}}else if(e>180&&e<270){let t=(e-180)*Math.PI/180,i=Math.cos(t),s=Math.sin(t);return {x:-r.x*i+r.y*s,y:-r.x*s-r.y*i}}else if(e>270&&e<360){let t=(e-270)*Math.PI/180,i=Math.cos(t),s=Math.sin(t);return {x:r.y*s-r.x*i,y:-r.y*i-r.x*s}}return {x:0,y:0}}function Zr(r){let e=r.width,t=r.height,i=r.angle%360;return i<0&&(i+=360),i===0||i===180?e:i===90||i===270?t:Math.abs(e*Math.cos(i*Math.PI/180))+Math.abs(t*Math.sin(i*Math.PI/180))}function Qr(r){let e=r.width,t=r.height,i=r.angle%360;return i<0&&(i+=360),i===0||i===180?t:i===90||i===270?e:Math.abs(t*Math.cos(i*Math.PI/180))+Math.abs(e*Math.sin(i*Math.PI/180))}_e();async function Bs(r){if(r!=="EMPTY"){if(!r){N.error("Texture not found",r);return}if(ct.cache.has(r)){let e=ct.get(r);if(e)return e}return ct.load(r).then(e=>{if(!e){N.error("Texture not found",r);return}if(!(e instanceof A)){N.error("File not is a file",r);return}return e}).catch(e=>{N.error("Error loading file",e);})}}function Co(r){return r&&(typeof r.align!="number"&&(r.xAlign!=null&&(r.align===void 0?(r.align={x:r.xAlign},delete r.xAlign):(r.align.x=r.xAlign,delete r.xAlign)),r.yAlign!=null&&(r.align===void 0?(r.align={y:r.yAlign},delete r.yAlign):(r.align.y=r.yAlign,delete r.yAlign))),typeof r.percentagePosition!="number"&&(r.xPercentagePosition!=null&&(r.percentagePosition===void 0?(r.percentagePosition={x:r.xPercentagePosition},delete r.xPercentagePosition):(r.percentagePosition.x=r.xPercentagePosition,delete r.xPercentagePosition)),r.yPercentagePosition!=null&&(r.percentagePosition===void 0?(r.percentagePosition={y:r.yPercentagePosition},delete r.yPercentagePosition):(r.percentagePosition.y=r.yPercentagePosition,delete r.yPercentagePosition))),r)}_e();var ju=new jr({cacheSize:5});var wB;(n=>{function r(o,a){a||(a=o.name),ju.get(a)&&N.info(`Event "${a}" already exists, it will be overwritten`),o.prototype.id=a,ju.set(a,o);}n.add=r;function e(o){try{let a=ju.get(o);if(!a){N.error(`Event "${o}" not found, did you forget to register it with the eventDecorator?`);return}return new a,a}catch(a){N.error(`Error while getting Event "${o}"`,a);return}}n.get=e;function t(o){try{let a=ju.get(o);if(!a){N.error(`Event "${o}" not found, did you forget to register it with the eventDecorator?`);return}return new a}catch(a){N.error(`Error while getting Event "${o}"`,a);return}}n.getInstance=t;function i(){return Array.from(ju.values())}n.values=i;function s(o){return ju.has(o)}n.has=s;})(wB||={});var vi=wB;_e();async function t_(r){let e=gk(r.pixivnId);if(e)await e.setMemory(r);else throw new Error("[Pixi\u2019VN] The element "+r.pixivnId+" could not be created");return e}function gk(r){try{let e=Rt.get(r);return e?new e:void 0}catch(e){N.error(`Error while getting CanvasElement ${r}`,e);return}}var Po=class extends K{constructor(e){super(e),this.pixivnId=this.constructor.prototype.pixivnId||zu;}pixivnId=zu;get memory(){return Ao(this,{childrenExport:true})}set memory(e){}async setMemory(e){return this.memory=e,await this.importChildren(e),await Jr(this,e)}async importChildren(e){for(let t=0;t<e.elements.length;t++){let i=e.elements[t],s=await t_(i);this.addChild(s);}}_onEvents={};get onEvents(){return this._onEvents}onEvent(e,t){let i=t.prototype.id,s=vi.getInstance(i);return this._onEvents[e]=i,s?super.on(e,()=>{s.fn(e,this);}):N.error(`Event ${i} not found`),this}on(e,t,i){return super.on(e,t,i)}};Rt.add(Po,zu);async function Jr(r,e,t){let i=t?.ignoreScale||false,s=t?.end;"isRenderGroup"in e&&e.isRenderGroup!==void 0&&(r.isRenderGroup=e.isRenderGroup),"blendMode"in e&&e.blendMode!==void 0&&(r.blendMode=e.blendMode),"tint"in e&&e.tint!==void 0&&(r.tint=e.tint),"alpha"in e&&e.alpha!==void 0&&(r.alpha=e.alpha),"angle"in e&&e.angle!==void 0&&(r.angle=e.angle),"renderable"in e&&e.renderable!==void 0&&(r.renderable=e.renderable),"rotation"in e&&e.rotation!==void 0&&(r.rotation=e.rotation),!i&&"scale"in e&&e.scale!==void 0&&(typeof e.scale=="number"?r.scale.set(e.scale,e.scale):r.scale.set(e.scale.x,e.scale.y)),"pivot"in e&&e.pivot!==void 0&&(typeof e.pivot=="number"?r.pivot.set(e.pivot,e.pivot):r.pivot.set(e.pivot.x,e.pivot.y)),"position"in e&&e.position!==void 0&&r.position.set(e.position.x,e.position.y),"skew"in e&&e.skew!==void 0&&r.skew.set(e.skew.x,e.skew.y),"visible"in e&&e.visible!==void 0&&(r.visible=e.visible),"x"in e&&e.x!==void 0&&(r.x=e.x),"y"in e&&e.y!==void 0&&(r.y=e.y),"boundsArea"in e&&e.boundsArea!==void 0&&(r.boundsArea=e.boundsArea),"cursor"in e&&e.cursor!==void 0&&(r.cursor=e.cursor),"eventMode"in e&&e.eventMode!==void 0&&(r.eventMode=e.eventMode),"interactive"in e&&e.interactive!==void 0&&(r.interactive=e.interactive),"interactiveChildren"in e&&e.interactiveChildren!==void 0&&(r.interactiveChildren=e.interactiveChildren),"hitArea"in e&&e.hitArea!==void 0&&(r.hitArea=e.hitArea),s&&await s(),i||("width"in e&&e.width!==void 0&&(r.width=e.width),"height"in e&&e.height!==void 0&&(r.height=e.height));}var Ti=class r extends me{constructor(e){super(e),this.pixivnId=this.constructor.prototype.pixivnId||Wu;}pixivnId=Wu;_textureAlias;get textureAlias(){return this._textureAlias?this._textureAlias:this.texture.source.label}set textureAlias(e){this._textureAlias=e;}get memory(){return Oh(this)}set memory(e){}async setMemory(e){return this.memory=e,await Gh(this,e)}_onEvents={};get onEvents(){return this._onEvents}onEvent(e,t){let i=t.prototype.id,s=vi.getInstance(i);return this._onEvents[e]=i,s?(super.on(e,()=>{s.fn(e,this);}),this.interactive||(this.interactive=true,this.eventMode="dynamic")):N.error(`Event ${i} not found`),this}on(e,t,i){return super.on(e,t,i)}static from(e,t){let i=me.from(e,t),s=new r;return s.texture=i.texture,s}};Rt.add(Ti,Wu);async function Gh(r,e,t){let i=t?.ignoreTexture||false;if(await Jr(r,e),!i){if("textureImage"in e&&e.textureImage&&e.textureImage.image){let n=await Bs(e.textureImage.image);n&&(r.texture=n);}if("textureData"in e&&(e.textureData.alias&&(r.textureAlias=e.textureData.alias),e.textureData.url!=="EMPTY")){let n=e.textureData.url;e.textureData.alias&&ct.resolver.hasKey(e.textureData.alias)&&(n=e.textureData.alias);let o=await Bs(n);o&&(r.texture=o);}}let s=t?.half;if(s&&await s(),"anchor"in e&&e.anchor!==void 0&&(typeof e.anchor=="number"?r.anchor.set(e.anchor,e.anchor):r.anchor.set(e.anchor.x,e.anchor.y)),"roundPixels"in e&&e.roundPixels!==void 0&&(r.roundPixels=e.roundPixels),"onEvents"in e)for(let n in e.onEvents){let o=e.onEvents[n],a=vi.get(o);a&&r.onEvent(n,a);}}var qe=class r extends Ti{pixivnId=JS;constructor(e,t){e=Co(e);let i,s;e&&"align"in e&&e?.align!==void 0&&(i=e.align,delete e.align),e&&"percentagePosition"in e&&e?.percentagePosition!==void 0&&(s=e.percentagePosition,delete e.percentagePosition),super(e),t&&(this.textureAlias=t),i&&(this.align=i),s&&(this.percentagePosition=s);}get memory(){return {...Oh(this),pixivnId:this.pixivnId,align:this._align,percentagePosition:this._percentagePosition,loadIsStarted:this._loadIsStarted}}set memory(e){}async setMemory(e){this.memory=e,await Uh(this,e),this.reloadPosition();}static from(e,t){let i=me.from(e,t),s=new r;return s.texture=i.texture,s}_loadIsStarted=false;get loadIsStarted(){return this._loadIsStarted}async load(){return this._loadIsStarted=true,Bs(this.textureAlias).then(e=>{this._loadIsStarted=false,e&&(this.texture=e);}).catch(e=>{this._loadIsStarted=false,N.error("Error into ImageSprite.load()",e);})}set texture(e){super.texture=e,this.reloadPosition();}get texture(){return super.texture}get haveEmptyTexture(){return this.texture._source.label==="EMPTY"}_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=We(this.pivot,this.angle),t=We(this.scale,this.angle);return {x:qr("width",this.x,Zr(this),e.x,t.x<0,this.anchor.x),y:qr("height",this.y,Qr(this),e.y,t.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=We(this.pivot,this.angle),t=We(this.scale,this.angle);return qr("width",this.x,Zr(this),e.x,t.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=We(this.pivot,this.angle),t=We(this.scale,this.angle);return qr("height",this.y,Qr(this),e.y,t.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:Kr("width",this.x),y:Kr("height",this.y)}}get xPercentagePosition(){return Kr("width",this.x)}set xPercentagePosition(e){this._align=void 0,this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.x=e,this.reloadPosition();}get yPercentagePosition(){return Kr("height",this.y)}set yPercentagePosition(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(){return this._align?{x:this._align.x||0,y:this._align.y||0,type:"align"}:this._percentagePosition?{x:this._percentagePosition.x||0,y:this._percentagePosition.y||0,type:"percentage"}:{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=We(this.pivot,this.angle),t=We(this.scale,this.angle);this._align.x!==void 0&&(super.x=bi("width",this._align.x,Zr(this),e.x,t.x<0,this.anchor.x)),this._align.y!==void 0&&(super.y=bi("height",this._align.y,Qr(this),e.y,t.y<0,this.anchor.y));}else this._percentagePosition&&(this._percentagePosition.x!==void 0&&(super.x=yi("width",this._percentagePosition.x)),this._percentagePosition.y!==void 0&&(super.y=yi("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;}};Rt.add(qe,JS);async function Uh(r,e,t){let i=t?.ignoreTexture||false;return e=Co(e),await Gh(r,e,{half:async()=>{"align"in e&&e.align!==void 0&&(r.align=e.align),"percentagePosition"in e&&e.percentagePosition!==void 0&&(r.percentagePosition=e.percentagePosition),i||"imageLink"in e&&e.imageLink!==void 0&&(r.textureAlias=e.imageLink),"loadIsStarted"in e&&e.loadIsStarted&&await r.load();},ignoreTexture:t?.ignoreTexture})}var qt=class r extends qe{constructor(e,t){let i,s,n;e&&"loop"in e&&e?.loop!==void 0&&(i=e.loop,delete e.loop),e&&"paused"in e&&e?.paused!==void 0&&(s=e.paused,delete e.paused),e&&"currentTime"in e&&e?.currentTime!==void 0&&(n=e.currentTime,delete e.currentTime),super(e,t),i&&(this.loop=i),s&&(this.paused=s),n&&(this.currentTime=n);}pixivnId=e1;get memory(){return {...super.memory,pixivnId:this.pixivnId,loop:this.loop,paused:this._paused,currentTime:this.currentTime}}set memory(e){}async setMemory(e){return this.memory=e,await n1(this,e)}static from(e,t){let i=me.from(e,t),s=new r;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&&this.texture.source.resource.play();}_currentTime=0;get currentTime(){return this.texture?.source?.resource?.currentTime||0}set currentTime(e){let t=this.duration;t&&e>=t&&(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}};Rt.add(qt,e1);async function n1(r,e,t){await Uh(r,e,{ignoreTexture:t?.ignoreTexture}),"loop"in e&&e.loop!==void 0&&(r.loop=e.loop),"currentTime"in e&&e.currentTime!==void 0&&(r.currentTime=e.currentTime),"paused"in e&&e.paused!==void 0&&(r.paused=e.paused);}_e();_e();var xk=new RegExp(`(${pB.join("|")})$`);function o1(r){let e=ct.cache.has(r)?ct.get(r):null;return e instanceof A&&(r=e.source?.label||r),xk.test(r)}var Et=class extends Po{constructor(e,t=[]){e=Co(e);let i,s,n;e&&"anchor"in e&&e?.anchor!==void 0&&(n=e.anchor,delete e.anchor),e&&"align"in e&&e?.align!==void 0&&(i=e.align,delete e.align),e&&"percentagePosition"in e&&e?.percentagePosition!==void 0&&(s=e.percentagePosition,delete e.percentagePosition),super(e),e=Co(e),t&&t.forEach(o=>{let a;o1(o)?a=new qt(void 0,o):a=new qe(void 0,o),this.addChild(a);}),n&&(this.anchor=n),i&&(this.align=i),s&&(this.percentagePosition=s);}get memory(){return {...super.memory,pixivnId:Kx,anchor:this._anchor,align:this._align,percentagePosition:this._percentagePosition,loadIsStarted:this._loadIsStarted}}set memory(e){}async setMemory(e){this.memory=e,await this.importChildren(e),await a1(this,e),this.reloadAnchor(),this.reloadPosition();}pixivnId=Kx;_loadIsStarted=false;get loadIsStarted(){return this._loadIsStarted}async load(){this._loadIsStarted=true;let e=Array(this.children.length);for(let t=0;t<this.children.length;t++)e[t]=this.children[t].load();return Promise.all(e).then(()=>{this._loadIsStarted=false,this.reloadAnchor(),this.reloadPosition();}).catch(t=>{this._loadIsStarted=false,N.error("Error into ImageContainer.load()",t);})}get texture(){return this.children.length>0?this.children[0].texture:new A}get haveEmptyTexture(){return this.children.some(e=>e.texture._source.label==="EMPTY")}_anchor;get anchor(){let e=super.pivot.x/this.width,t=super.pivot.y/this.height;return {x:e,y:t}}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=We(this.pivot,this.angle),t=We(this.scale,this.angle);return {x:qr("width",this.x,Zr(this),e.x,t.x<0,this.anchor.x),y:qr("height",this.y,Qr(this),e.y,t.y<0,this.anchor.y)}}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=We(this.pivot,this.angle),t=We(this.scale,this.angle);return qr("width",this.x,Zr(this),e.x,t.x<0,this.anchor.x)}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=We(this.pivot,this.angle),t=We(this.scale,this.angle);return qr("height",this.y,Qr(this),e.y,t.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:Kr("width",this.x),y:Kr("height",this.y)}}set xPercentagePosition(e){this._align&&(this._align=void 0),this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.x=e,this.reloadPosition();}get xPercentagePosition(){return Kr("width",this.x)}set yPercentagePosition(e){this._align&&(this._align=void 0),this._percentagePosition===void 0&&(this._percentagePosition={}),this._percentagePosition.y=e,this.reloadPosition();}get yPercentagePosition(){return Kr("height",this.y)}get positionType(){return this._align?"align":this._percentagePosition?"percentage":"pixel"}get positionInfo(){return this._align?{x:this._align.x||0,y:this._align.y||0,type:"align"}:this._percentagePosition?{x:this._percentagePosition.x||0,y:this._percentagePosition.y||0,type:"percentage"}:{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=We(this.pivot,this.angle),t=We(this.scale,this.angle);this._align.x!==void 0&&(super.x=bi("width",this._align.x,Zr(this),e.x,t.x<0)),this._align.y!==void 0&&(super.y=bi("height",this._align.y,Qr(this),e.y,t.y<0));}else this._percentagePosition&&(this._percentagePosition.x!==void 0&&(super.x=yi("width",this._percentagePosition.x)),this._percentagePosition.y!==void 0&&(super.y=yi("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;}};Rt.add(Et,Kx);async function a1(r,e,t){e=Co(e),Jr(r,e,{...t,end:async()=>{"anchor"in e&&e.anchor!==void 0&&(r.anchor=e.anchor),"align"in e&&e.align!==void 0&&(r.align=e.align),"percentagePosition"in e&&e.percentagePosition!==void 0&&(r.percentagePosition=e.percentagePosition),"loadIsStarted"in e&&e.loadIsStarted&&await r.load();}});}_e();var wo=class extends hr{constructor(e){super(e),this.pixivnId=this.constructor.prototype.pixivnId||Xu;}pixivnId=Xu;get memory(){return s1(this)}set memory(e){}async setMemory(e){return this.memory=e,await u1(this,e)}_onEvents={};get onEvents(){return this._onEvents}onEvent(e,t){let i=t.prototype.id,s=vi.getInstance(i);return this._onEvents[e]=i,s?(super.on(e,()=>{s.fn(e,this);}),this.interactive||(this.interactive=true,this.eventMode="dynamic")):N.error(`Event ${i} not found`),this}on(e,t,i){return super.on(e,t,i)}};Rt.add(wo,Xu);async function u1(r,e){if(await Jr(r,e),"anchor"in e&&e.anchor!==void 0&&(typeof e.anchor=="number"?r.anchor.set(e.anchor,e.anchor):r.anchor.set(e.anchor.x,e.anchor.y)),"text"in e&&e.text!==void 0&&(r.text=e.text),"resolution"in e&&e.resolution!==void 0&&(r.resolution=e.resolution),"style"in e&&e.style!==void 0&&(r.style=e.style),"roundPixels"in e&&e.roundPixels!==void 0&&(r.roundPixels=e.roundPixels),"onEvents"in e)for(let t in e.onEvents){let i=e.onEvents[t],s=vi.get(i);s&&r.onEvent(t,s);}}var Ht=class{constructor(e,t,i){this.args=e,this.duration=t,this.priority=i,this.id=this.constructor.prototype.id;}id="ticker_id_not_set";args;duration;priority;fn(e,t,i,s){throw new Error("[Pixi\u2019VN] The method TickerBase.fn() must be overridden")}onEndOfTicker(e,t,i){let s="aliasToRemoveAfter"in i&&i.aliasToRemoveAfter||[];typeof s=="string"&&(s=[s]);let n="tickerAliasToResume"in i&&i.tickerAliasToResume||[];typeof n=="string"&&(n=[n]),Ie.onEndOfTicker(t,{aliasToRemoveAfter:s,tickerAliasToResume:n});}};_e();var qu=new jr({cacheSize:5});var BB;(n=>{function r(o,a){a||(a=o.name),qu.get(a)&&N.info(`Ticker "${a}" already exists, it will be overwritten`),o.prototype.id=a,qu.set(a,o);}n.add=r;function e(o){try{let a=qu.get(o);if(!a){N.error(`Event "${o}" not found, did you forget to register it with the tickerDecorator?`);return}return a}catch(a){N.error(`Error while getting Event "${o}"`,a);return}}n.get=e;function t(o,a,u,l){try{let c=qu.get(o);if(!c){N.error(`Ticker "${o}" not found, did you forget to register it with the tickerDecorator?`);return}return new c(a,u,l)}catch(c){N.error(`Error while getting Ticker "${o}"`,c);return}}n.getInstance=t;function i(){return Array.from(qu.values())}n.values=i;function s(o){return qu.has(o)}n.has=s;})(BB||={});var Vt=BB;_e();function Rs(r){return (r instanceof qe||r instanceof Et)&&r.haveEmptyTexture?false:!(r instanceof me&&r.texture?.label=="EMPTY")}function Ms(r,e,t){let{limit:i}=t;r[e]===void 0||!t||r[e]===i||(typeof r[e]=="number"?t.type==="linear"?r[e]=l1(r[e],t):t.type==="exponential"&&(r[e]=c1(r[e],t)):r[e]!==void 0&&typeof r[e]=="object"&&r[e].haveOwnProperty("x")&&r[e].haveOwnProperty("y")&&typeof r[e].x=="number"&&typeof r[e].y=="number"&&(t.type==="linear"?(r[e].x=l1(r[e].x,t),r[e].y=l1(r[e].y,t)):t.type==="exponential"&&(r[e].x=c1(r[e].x,t),r[e].y=c1(r[e].y,t))));}function l1(r,e){let{limit:t,amt:i}=e;if(t!==void 0){if(r>t&&i>0)return t;if(r<t&&i<0)return t}return r+i}function c1(r,e){let{limit:t}=e;if(t!==void 0){if(r>t&&e.percentage>0)return t;if(r<t&&e.percentage<0)return t}return r+r*e.percentage}var _k=5,Ku=class extends Ht{constructor(e={},t,i){super(e,t,i);}fn(e,t,i,s){t.speed===void 0&&(t.duration===void 0?t.speed=_k:t.speed=600/(t.duration*60));let{type:n="hide",startOnlyIfHaveTexture:o,speedProgression:a}=t,u=this.speedConvert(t.speed),l=this.getLimit(t);n==="hide"&&l<0&&(l=0),n==="show"&&l>1&&(l=1),i.filter(c=>{let h=Ie.find(c);return !(!h||o&&!Rs(h))}).forEach(c=>{let h=Ie.find(c);if(h&&h instanceof K){if(n==="show"&&h.alpha<l?h.alpha+=u*e.deltaTime:n==="hide"&&h.alpha>l&&(h.alpha-=u*e.deltaTime),n==="show"&&h.alpha>=l){this.onEndOfTicker(c,s,t);return}else if(n==="hide"&&h.alpha<=l){this.onEndOfTicker(c,s,t);return}if(u<1e-5&&!(a&&a.type=="linear"&&a.amt!=0)){N.warn("The speed of the FadeAlphaTicker must be greater than 0."),this.onEndOfTicker(c,s,t,{editAlpha:false});return}}}),a&&Ms(t,"speed",a);}onEndOfTicker(e,t,i,s={editAlpha:true}){typeof e=="string"&&(e=[e]),e.forEach(n=>{let o=Ie.find(n);if(o&&s.editAlpha){let a=this.getLimit(i);o.alpha=a;}}),super.onEndOfTicker(e,t,i);}getLimit(e){let{type:t="hide",limit:i=t==="hide"?0:1}=e;return i}speedConvert(e){return e/600}};Vt.add(Ku);_e();var bk=10;function yk(r,e){let t=St(r.destination);if(t.type==="align"){let i,s;e instanceof me&&(i=e.anchor.x,s=e.anchor.y);let n=We(e.pivot,e.angle),o=We(e.scale,e.angle);t.x=bi("width",t.x,Zr(e),n.x,o.x<0,i),t.y=bi("height",t.y,Qr(e),n.y,o.y<0,s);}return t.type==="percentage"&&(t.x=yi("width",t.x),t.y=yi("height",t.y)),t}var Bo=class extends Ht{fn(e,t,i,s){t.speed===void 0&&(t.speed=bk);let{speed:n,startOnlyIfHaveTexture:o,speedProgression:a}=t;i.filter(u=>{let l=Ie.find(u);return !(!l||o&&!Rs(l))}).forEach(u=>{let l=Ie.find(u);if(l&&l instanceof K){let c=yk(t,l),h=c.x-l.x,d=c.y-l.y,p=h>0?1:-1,g=d>0?1:-1,b,_;if(typeof n=="number"){let x=this.speedConvert(n);h===0||d===0?b=_=x:(b=Math.abs(h/(h+d))*x,_=Math.abs(d/(h+d))*x);}else b=this.speedConvert(n.x),_=this.speedConvert(n.y);if(b>0){l.x+=p*b*e.deltaTime;let x=c.x-l.x;(p<0&&x>0||p>0&&x<0)&&(l.x=c.x);}if(_>0){l.y+=g*_*e.deltaTime;let x=c.y-l.y;(g<0&&x>0||g>0&&x<0)&&(l.y=c.y);}if(l.x==c.x&&l.y==c.y){this.onEndOfTicker(u,s,t);return}else if(b<1e-5&&_<1e-5&&!(a&&a.type=="linear"&&a.amt!=0)){N.warn("The speed of the MoveTicker must be greater than 0."),this.onEndOfTicker(u,s,t,{editPosition:false});return}}}),a&&Ms(t,"speed",a);}onEndOfTicker(e,t,i,s={editPosition:true}){typeof e=="string"&&(e=[e]),e.forEach(n=>{let o=Ie.find(n);if(o){let a=i.destination;s.editPosition&&(o instanceof qe||o instanceof Et?o.positionInfo=a:(o.x=a.x,o.y=a.y));}}),super.onEndOfTicker(e,t,i);}speedConvert(e){return e*(66/400)}};Vt.add(Bo);_e();var vk=1,Lh=class extends Ht{constructor(e={},t,i){super(e,t,i);}fn(e,t,i,s){t.speed===void 0&&(t.speed=vk);let{clockwise:n=true,speedProgression:o,limit:a}=t,u=this.speedConvert(t.speed);i.filter(l=>{let c=Ie.find(l);return !(!c||t.startOnlyIfHaveTexture&&!Rs(c))}).forEach(l=>{let c=Ie.find(l);if(c&&c instanceof K&&(n?c.rotation+=u*e.deltaTime:c.rotation-=u*e.deltaTime,a!==void 0&&(n&&c.angle>=a?(c.angle=a,this.onEndOfTicker(l,s,t)):!n&&c.angle<=a&&(c.angle=a,this.onEndOfTicker(l,s,t))),u<1e-5&&!(o&&o.type=="linear"&&o.amt!=0))){N.warn("The speed of the RotateTicker must be greater than 0."),this.onEndOfTicker(l,s,t,{editRotation:false});return}}),o&&Ms(t,"speed",o);}onEndOfTicker(e,t,i,s={editRotation:true}){let{limit:n}=i;typeof e=="string"&&(e=[e]),e.forEach(o=>{let a=Ie.find(o);a&&s.editRotation&&n!==void 0&&(a.angle=n);}),super.onEndOfTicker(e,t,i);}speedConvert(e){return e/100}};Vt.add(Lh);_e();var Tk=10,Zu=class extends Ht{constructor(e={},t,i){super(e,t,i);}fn(e,t,i,s){t.speed===void 0&&(t.speed=Tk);let{speed:n,type:o="zoom",startOnlyIfHaveTexture:a,speedProgression:u}=t,l,c;typeof n=="number"?(l=this.speedConvert(n),c=this.speedConvert(n)):(l=this.speedConvert(n.x),c=this.speedConvert(n.y));let h=this.getLimit(t);i.filter(d=>{let p=Ie.find(d);return !(!p||a&&!Rs(p))}).forEach(d=>{let p=Ie.find(d);if(p&&p instanceof K){if(o==="zoom"&&(p.scale.x<h.x||p.scale.y<h.y)?(p.scale.x+=l*e.deltaTime,p.scale.y+=c*e.deltaTime):o==="unzoom"&&(p.scale.x>h.x||p.scale.y>h.y)&&(p.scale.x-=l*e.deltaTime,p.scale.y-=c*e.deltaTime),o==="zoom"){if(p.scale.x>h.x&&(p.scale.x=h.x),p.scale.y>h.y&&(p.scale.y=h.y),p.scale.x>=h.x&&p.scale.y>=h.y){this.onEndOfTicker(d,s,t);return}}else if(o==="unzoom"&&(p.scale.x<h.x&&(p.scale.x=h.x),p.scale.y<h.y&&(p.scale.y=h.y),p.scale.x<=h.x&&p.scale.y<=h.y)){this.onEndOfTicker(d,s,t);return}if((l<1e-5&&c<1e-5||l<1e-5&&p.scale.y==h.y||c<1e-5&&p.scale.x==h.x)&&!(u&&u.type=="linear"&&u.amt!=0)){N.warn("The speed of the ZoomTicker must be greater than 0."),this.onEndOfTicker(d,s,t,{editScale:false});return}}}),u&&Ms(t,"speed",u);}speedConvert(e){return e/600}onEndOfTicker(e,t,i,s={editScale:true}){let{isZoomInOut:n}=i;typeof e=="string"&&(e=[e]),e.forEach(o=>{let a=Ie.find(o);if(a){if(s.editScale){let u=this.getLimit(i);a.scale.x=u.x,a.scale.y=u.y;}if(n){let{pivot:u,position:l}=n;a.pivot=u.x,a.position=l;}}}),super.onEndOfTicker(e,t,i);}getLimit(e){let{type:t="zoom",limit:i}=e,s=t==="zoom"?1/0:0,n=t==="zoom"?1/0:0;return i&&(typeof i=="number"?(s=i,n=i):(s=i.x,n=i.y)),{x:s,y:n}}};Vt.add(Zu);_e();_e();var Ie=new Nh;Nt.init({getScreen:()=>Ie.screen});var Ck={extension:{type:"sceneProperties",name:"additional-positions"},testNode(r){return r instanceof qe||r instanceof qt||r instanceof Et},testProp(r){switch(r){case "xAlign":case "yAlign":case "xPercentagePosition":case "yPercentagePosition":case "positionType":return true;default:return false}},setProperty(r,e,t){if(r instanceof qe||r instanceof qt||r instanceof Et)switch(e){case "xAlign":r.xAlign=t/100;break;case "yAlign":r.yAlign=t/100;break;case "xPercentagePosition":r.xPercentagePosition=t/100;break;case "yPercentagePosition":r.yPercentagePosition=t/100;break}},getProperties(r){return [{value:r.positionType,prop:"positionType",entry:{section:"Transform",type:"text",label:"Position Type"}},{value:r.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:r.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:r.xPercentagePosition*100,prop:"xPercentagePosition",entry:{section:"Transform",type:"range",label:"X Percentage Position",tooltip:"0% is left, 100% is right",options:{min:0,max:100}}},{value:r.yPercentagePosition*100,prop:"yPercentagePosition",entry:{section:"Transform",type:"range",label:"Y Percentage Position",tooltip:"0% is top, 100% is bottom",options:{min:0,max:100}}}]}},RB=Ck;function Pk(r,e){let t=0;return async(...i)=>{let s=Date.now();if(s-t>=e)return t=s,await r(...i)}}var P=class r{constructor(){}static _app=void 0;static get app(){if(!r._app)throw new Error("[Pixi\u2019VN] CanvasManagerStatic.app is undefined");return r._app}static get gameLayer(){let e=this.app.stage.getChildByLabel(Mr);return e||(e=new K,e.label=Mr,this.app.stage.addChild(e)),e}static htmlLayers=[];static canvasWidth=300;static canvasHeight=300;static _isInitialized=false;static async init(e,t,i,s,n){return r.canvasWidth=t,r.canvasHeight=i,r._app=new Wc,r.app.init({resolution:window.devicePixelRatio||1,autoDensity:true,width:t,height:i,...s}).then(()=>{let{app:o=r.app,extensions:a=[],...u}=n||{};mB({app:o,extensions:[RB,...a],...u}),r._isInitialized=true,r.addCanvasIntoHTMLElement(e),window.addEventListener("resize",r.resize),r.resize(),r.gameLayer;})}static addCanvasIntoHTMLElement(e){r._isInitialized?e.appendChild(r.app.canvas):N.error("GameWindowManager is not initialized");}static addHtmlLayer(e,t,i={position:"absolute",pointerEvents:"none"}){let s=document.createElement("div");s.setAttribute("id",e),s.style.position=i.position,s.style.pointerEvents=i.pointerEvents;let n=t.appendChild(s);return r.htmlLayers.push(s),r.resize(),n}static removeHtmlLayer(e){let t=r.htmlLayers.find(i=>i.id===e);t&&(t.remove(),r.htmlLayers=r.htmlLayers.filter(i=>i.id!==e));}static getHtmlLayer(e){return r.htmlLayers.find(t=>t.id===e)}static get screenScale(){let e=Math.max(document.documentElement.clientWidth,window.innerWidth||0),t=Math.max(document.documentElement.clientHeight,window.innerHeight||0);return Math.min(e/r.canvasWidth,t/r.canvasHeight)}static get screenWidth(){return Math.floor(r.screenScale*r.canvasWidth)}static get screenHeight(){return Math.floor(r.screenScale*r.canvasHeight)}static get horizontalMargin(){return (Math.max(document.documentElement.clientWidth,window.innerWidth||0)-r.screenWidth)/2}static get verticalMargin(){return (Math.max(document.documentElement.clientHeight,window.innerHeight||0)-r.screenHeight)/2}static async resize(){await Pk(async()=>{if(r._isInitialized){let i=r.app.canvas.style;i.width=`${r.screenWidth}px`,i.height=`${r.screenHeight}px`,i.marginLeft=`${r.horizontalMargin}px`,i.marginRight=`${r.horizontalMargin}px`,i.marginTop=`${r.verticalMargin}px`,i.marginBottom=`${r.verticalMargin}px`;}let t=r.htmlLayers.map(i=>{i.style.width=`${r.screenWidth}px`,i.style.height=`${r.screenHeight}px`,i.style.marginLeft=`${r.horizontalMargin}px`,i.style.marginRight=`${r.horizontalMargin}px`,i.style.marginTop=`${r.verticalMargin}px`,i.style.marginBottom=`${r.verticalMargin}px`;});await Promise.all(t);},10)();}static get childrenAliasesOrder(){return r.gameLayer.children.filter(e=>e.label).sort((e,t)=>r.gameLayer.getChildIndex(e)-r.gameLayer.getChildIndex(t)).map(e=>e.label)}static get currentTickersWithoutCreatedBySteps(){return Object.fromEntries(Object.entries(r._currentTickers).filter(([e,t])=>!t.createdByTicketSteps))}static _currentTickers={};static _currentTickersSequence={};static _currentTickersTimeouts={};static _tickersToCompleteOnStepEnd={tikersIds:[],stepAlias:[]};static _tickersOnPause={};static generateTickerId(e){try{return (0,MB.default)(JSON.stringify(e)).toString()+"_"+Math.random().toString(36).substring(7)}catch(t){throw new Error(`[Pixi\u2019VN] Error to generate ticker id: ${t}`)}}static addTickerTimeoutInfo(e,t,i,s){typeof e=="string"&&(e=[e]),r._currentTickersTimeouts[i]={aliases:e,ticker:t,canBeDeletedBeforeEnd:s};}static removeTickerTimeoutInfo(e){typeof e!="string"&&(e=e.toString()),r._currentTickersTimeouts[e]&&delete r._currentTickersTimeouts[e];}static removeTickerTimeout(e){typeof e!="string"&&(e=e.toString()),clearTimeout(Number(e)),r.removeTickerTimeoutInfo(e);}static removeTickerTimeoutsByAlias(e,t){Object.entries(r._currentTickersTimeouts).forEach(([i,s])=>{let n=s.aliases.filter(o=>o!==e);if(n.length===0){let o=s.canBeDeletedBeforeEnd;(!t||o)&&r.removeTickerTimeout(i);}else r._currentTickersTimeouts[i].aliases=n;});}};var Qu="aliasToRemoveAfter";var Nh=class{get app(){return P.app}get gameLayer(){return P.gameLayer}get isInitialized(){return P._isInitialized}get htmlLayout(){return P.htmlLayers[0]}set htmlLayout(e){this.addHtmlLayer("ui",e);}get canvasWidth(){return P.canvasWidth}get canvasHeight(){return P.canvasHeight}set canvasWidth(e){P.canvasWidth=e;}set canvasHeight(e){P.canvasHeight=e;}get screen(){return this.app.screen}async init(e,t,i,s,n){if(typeof t=="number"&&typeof i=="number")return await P.init(e,t,i,s,n);if(typeof t!="number"&&typeof i!="number")return await P.init(e,t.width,t.height,t,i);throw new Error("Invalid parameters")}initializeHTMLLayout(e){this.addHtmlLayer("ui",e);}get children(){return P.gameLayer.children}async copyCanvasElementProperty(e,t){if(typeof t=="string"){let i=this.find(t);if(i)t=i;else {N.error(`Canvas element ${t} not found`);return}}if(typeof e=="string"){let i=this.find(e);if(i)e=i;else {N.error(`Canvas element ${e} not found`);return}}e instanceof K&&(e=e.memory),"isRenderGroup"in e&&delete e.isRenderGroup,"scale"in e&&delete e.scale,"visible"in e&&delete e.visible,"boundsArea"in e&&delete e.boundsArea,"text"in e&&delete e.text,"resolution"in e&&delete e.resolution,"style"in e&&delete e.style,"height"in e&&delete e.height,"width"in e&&delete e.width,t instanceof qt?await n1(t,e,{ignoreTexture:true}):t instanceof qe?await Uh(t,e,{ignoreTexture:true}):t instanceof Ti?await Gh(t,e,{ignoreTexture:true}):t instanceof wo?await u1(t,e):t instanceof Et?await a1(t,e):t instanceof K&&await Jr(t,e);}transferTickers(e,t,i="move"){P._currentTickersSequence[e]&&(i==="move"?P._currentTickersSequence[t]=St(P._currentTickersSequence[e]):i==="duplicate"&&(P._currentTickersSequence[t]=St(P._currentTickersSequence[e]))),Object.entries(P._currentTickers).forEach(([s,n])=>{if(n.createdByTicketSteps?.canvasElementAlias===e&&this.removeTicker(s),n.canvasElementAliases.includes(e)&&(i==="move"?n.canvasElementAliases=n.canvasElementAliases.map(o=>o===e?t:o):i==="duplicate"&&n.canvasElementAliases.find(o=>o===e)&&n.canvasElementAliases.push(t),n.args.hasOwnProperty(Qu))){let o=n.args.aliasToRemoveAfter;typeof o=="string"&&(o=[o]),Array.isArray(o)&&(i==="move"?n.args.aliasToRemoveAfter=o.map(a=>a===e?t:a):i==="duplicate"&&o.find(a=>a===e)&&(n.args.aliasToRemoveAfter=[...o,t]));}}),Object.values(P._currentTickersTimeouts).forEach(s=>{s.aliases.includes(e)&&(i==="move"?s.aliases=s.aliases.map(n=>n===e?t:n):i==="duplicate"&&s.aliases.find(n=>n===e)&&s.aliases.push(t));}),P._currentTickersSequence[t]&&Object.keys(P._currentTickersSequence[t]).forEach(s=>{this.runTickersSequence(t,s);}),i==="duplicate"&&P._currentTickersSequence[e]&&Object.keys(P._currentTickersSequence[e]).forEach(s=>{this.runTickersSequence(e,s);});}add(e,t,i={}){if(e===Mr){N.error(`The alias ${Mr} is reserved`);return}let s=this.find(e),n=i?.ignoreOldStyle;s&&!n&&this.copyCanvasElementProperty(s,t);let o=i.zIndex;s&&!this.gameLayer.children.includes(s)?N.error(`The canvas element ${e} exist in the memory but it is not on the canvas, so the zIndex is not set`):s&&(o===void 0&&(o=this.gameLayer.getChildIndex(s)),this.remove(e,{ignoreTickers:true})),o!==void 0?(t.label=e,this.gameLayer.addChildAt(t,o)):(t.label=e,this.gameLayer.addChild(t));}remove(e,t={}){if(e===Mr){N.error(`The alias ${Mr} is reserved`);return}let i=t.ignoreTickers;typeof e=="string"&&(e=[e]),e.forEach(s=>{this.gameLayer.getChildrenByLabel(s).forEach(n=>{this.gameLayer.removeChild(n),!i&&this.unlinkComponentFromTicker(s);});});}find(e){if(e===Mr)return this.gameLayer;let t=this.gameLayer.getChildByLabel(e);if(t)return t}canvasElementIsOnCanvas(e){return this.gameLayer.children.includes(e)}removeAll(){this.gameLayer.removeChildren(),this.removeAllTickers();}editAlias(e,t,i={}){let s=this.find(e);s&&(s.label=t),!i.ignoreTickers&&this.transferTickers(e,t,"move");}get currentTickers(){return P._currentTickers}get currentTickersSteps(){return P._currentTickersSequence}addTicker(e,t){let i=t.id;if(typeof e=="string"&&(e=[e]),!Vt.getInstance(i,t.args,t.duration,t.priority)){N.error(`Ticker ${i} not found`);return}let s={fn:()=>{},id:i,args:St(t.args),canvasElementAliases:e,priority:t.priority,duration:t.duration,onEndOfTicker:()=>{}},n=P.generateTickerId(s);if(this.pushTicker(n,s,t),this.pushEndOfTicker(n,s,t),t.duration){let o=setTimeout(()=>{P.removeTickerTimeoutInfo(o),P._currentTickersTimeouts[o.toString()]&&this.onEndOfTicker(n,{aliasToRemoveAfter:Qu in t.args?t.args.aliasToRemoveAfter||[]:[],tickerAliasToResume:"tickerAliasToResume"in t.args?t.args.tickerAliasToResume||[]:[],ignoreTickerSteps:true});},t.duration*1e3);P.addTickerTimeoutInfo(e,i,o.toString(),true);}return n}pushTicker(e,t,i){P._currentTickers[e]=t,t.fn=s=>{let n=P._currentTickers[e];if(n){let o=n.canvasElementAliases;if(t.createdByTicketSteps){if(this.isTickerPaused(t.createdByTicketSteps.canvasElementAlias,t.createdByTicketSteps.id))return}else o=o.filter(a=>!this.isTickerPaused(a,e));i?.fn(s,n.args,o,e);}},this.app.ticker.add(t.fn,void 0,t.priority);}pushEndOfTicker(e,t,i){t.onEndOfTicker=()=>{i.onEndOfTicker(t.canvasElementAliases,e,t.args);};}addTickersSequence(e,t,i=0){if(t.length==0){N.warn("The steps of the tickers is empty");return}e in P._currentTickersSequence||(P._currentTickersSequence[e]={});let s={currentStepNumber:i,steps:t.map(o=>o===kh||o.hasOwnProperty("type")&&o.type==="pause"?o:{ticker:o.id,args:St(o.args),duration:o.duration})},n=P.generateTickerId(s);return P._currentTickersSequence[e][n]=s,this.runTickersSequence(e,n),n}runTickersSequence(e,t){if(!P._currentTickersSequence[e]||!P._currentTickersSequence[e][t])return;let i=P._currentTickersSequence[e][t].steps[P._currentTickersSequence[e][t].currentStepNumber];if(i===kh&&(i=P._currentTickersSequence[e][t].steps[0],P._currentTickersSequence[e][t].currentStepNumber=0,i===kh)){N.error("TikersSteps has a RepeatType in the first step");return}if(i.hasOwnProperty("type")&&i.type==="pause"){let u=setTimeout(()=>{let l=P._currentTickersTimeouts[u.toString()];l&&l.aliases.forEach(c=>{this.nextTickerStep(c,t);}),P.removeTickerTimeoutInfo(u);},i.duration*1e3);P.addTickerTimeoutInfo(e,"steps",u.toString(),false);return}let s=Vt.getInstance(i.ticker,i.args,i.duration,i.priority);if(!s){N.error(`Ticker ${i.ticker} not found`);return}let n=s.id,o={fn:()=>{},id:n,args:St(s.args),canvasElementAliases:[e],priority:s.priority,duration:s.duration,createdByTicketSteps:{canvasElementAlias:e,id:t},onEndOfTicker:()=>{}},a=P.generateTickerId(o);if(this.pushTicker(a,o,s),s.duration){let u=setTimeout(()=>{let l=P._currentTickersTimeouts[u.toString()];l&&(this.onEndOfTicker(a,{aliasToRemoveAfter:Qu in s.args?s.args.aliasToRemoveAfter||[]:[],tickerAliasToResume:"tickerAliasToResume"in s.args?s.args.tickerAliasToResume||[]:[],ignoreTickerSteps:true}),l.aliases.forEach(c=>{this.nextTickerStep(c,t);})),P.removeTickerTimeoutInfo(u);},s.duration*1e3);P.addTickerTimeoutInfo(e,n,u.toString(),false);}}nextTickerStep(e,t){if(P._currentTickersSequence[e]&&P._currentTickersSequence[e][t]){let i=P._currentTickersSequence[e][t];i.currentStepNumber+1<i.steps.length?(i.currentStepNumber++,P._currentTickersSequence[e][t]=i,this.runTickersSequence(e,t)):t&&P._currentTickersSequence[e]&&P._currentTickersSequence[e][t]&&(delete P._currentTickersSequence[e][t],Object.entries(P._currentTickers).forEach(([s,n])=>{n.createdByTicketSteps?.canvasElementAlias===e&&n.createdByTicketSteps.id===t&&this.removeTicker(s);}));}}onEndOfTicker(e,t){let i=P._currentTickers[e],s=t.ignoreTickerSteps||false;this.remove(t.aliasToRemoveAfter),this.resumeTicker(t.tickerAliasToResume),i&&(this.removeTicker(e),!s&&i.duration==null&&i.createdByTicketSteps&&this.nextTickerStep(i.createdByTicketSteps.canvasElementAlias,i.createdByTicketSteps.id));}unlinkComponentFromTicker(e,t){if(typeof e=="string"&&(e=[e]),!t){e.forEach(s=>{Object.entries(P._currentTickers).forEach(([n,o])=>{o.canvasElementAliases.includes(s)&&(o.canvasElementAliases.length===1?this.removeTicker(n):o.canvasElementAliases=o.canvasElementAliases.filter(a=>a!==s));}),P._currentTickersSequence[s]&&delete P._currentTickersSequence[s],P.removeTickerTimeoutsByAlias(s,false);});return}let i;typeof t=="string"?i=t:t instanceof Ht?i=t.id:i=t.prototype.id,e.forEach(s=>{P._currentTickersSequence[s]&&Object.entries(P._currentTickersSequence[s]).forEach(([n,o])=>{o.steps.find(a=>typeof a=="object"&&"ticker"in a&&a.ticker===i)&&delete P._currentTickersSequence[s][n];});}),Object.entries(P._currentTickers).forEach(([s,n])=>{n.id===i&&(P._currentTickers[s].canvasElementAliases=n.canvasElementAliases.filter(o=>!e.includes(o)));}),Object.entries(P._currentTickersTimeouts).forEach(([s,n])=>{n.ticker===i&&n.canBeDeletedBeforeEnd&&(P._currentTickersTimeouts[s].aliases=n.aliases.filter(o=>!e.includes(o)));}),this.removeTickersWithoutAssociatedCanvasElement();}removeTickersWithoutAssociatedCanvasElement(){Object.entries(P._currentTickers).forEach(([e,t])=>{t.canvasElementAliases=t.canvasElementAliases.filter(i=>this.find(i)),t.canvasElementAliases.length===0&&this.onEndOfTicker(e,{aliasToRemoveAfter:Qu in t.args?t.args.aliasToRemoveAfter:[],tickerAliasToResume:"tickerAliasToResume"in t.args?t.args.tickerAliasToResume:[],ignoreTickerSteps:true});}),Object.entries(P._currentTickersSequence).forEach(([e,t])=>{t===void 0&&delete P._currentTickersSequence[e];}),Object.entries(P._currentTickersTimeouts).forEach(([e,{aliases:t}])=>{t.length===0&&P.removeTickerTimeout(e);});}removeAllTickers(){P._currentTickersSequence={},Object.keys(P._currentTickers).forEach(e=>{this.removeTicker(e);}),P._currentTickers={};for(let e in P._currentTickersTimeouts)P.removeTickerTimeout(e);P._tickersToCompleteOnStepEnd={tikersIds:[],stepAlias:[]},P._tickersOnPause={};}removeTicker(e){typeof e=="string"&&(e=[e]),e.forEach(t=>{let i=P._currentTickers[t];if(i){if(i.args.hasOwnProperty(Qu)){let s=i.args.aliasToRemoveAfter;this.remove(s);}this.app.ticker.remove(i.fn),delete P._currentTickers[t];}});}pauseTicker(e,t={}){let i=P._tickersOnPause[e];if(!i){P._tickersOnPause[e]=t;return}t.tickerIdsExcluded&&(i.tickerIdsExcluded?P._tickersOnPause[e].tickerIdsExcluded=[...i.tickerIdsExcluded,...t.tickerIdsExcluded]:P._tickersOnPause[e].tickerIdsExcluded=t.tickerIdsExcluded),t.tickerIdsIncluded&&(i.tickerIdsIncluded?P._tickersOnPause[e].tickerIdsIncluded=[...i.tickerIdsIncluded,...t.tickerIdsIncluded]:P._tickersOnPause[e].tickerIdsIncluded=t.tickerIdsIncluded);}resumeTicker(e){typeof e=="string"&&(e=[e]),e.forEach(t=>{delete P._tickersOnPause[t];});}isTickerPaused(e,t){let i=P._tickersOnPause[e];if(i){if(t){if("tickerIdsIncluded"in i&&i.tickerIdsIncluded)return i.tickerIdsIncluded.includes(t);if("tickerIdsExcluded"in i&&i.tickerIdsExcluded)return !i.tickerIdsExcluded.includes(t)}return true}return false}completeTickerOnStepEnd(e){e.alias?P._tickersToCompleteOnStepEnd.stepAlias.push({id:e.id,alias:e.alias}):P._tickersToCompleteOnStepEnd.tikersIds.push({id:e.id});}forceCompletionOfTicker(e,t){if(t){let i=P._currentTickersSequence[t];i&&i[e]&&(i[e].steps.includes(kh)?N.error(`The ticker alias: ${t} id: ${e} contains a RepeatType, so it can't be forced to complete`,i[e]):i[e].steps.forEach(s=>{if(typeof s=="object"&&"ticker"in s){let n=Vt.getInstance(s.ticker,s.args,s.duration,s.priority);n&&n.onEndOfTicker([t],e,s.args);}}));}else {let i=P._currentTickers[e];i&&i.onEndOfTicker();}}addLayer(e,t){if(e===Mr){N.error(`The alias ${Mr} is reserved`);return}return t.label=e,P.app.stage.addChild(t)}getLayer(e){return P.app.stage.getChildByLabel(e)}removeLayer(e){P.app.stage.getChildrenByLabel(e);}addHtmlLayer(e,t,i){return P.addHtmlLayer(e,t,i)}removeHtmlLayer(e){return P.removeHtmlLayer(e)}getHtmlLayer(e){return P.getHtmlLayer(e)}async extractImage(){return (await this.app.renderer.extract.image(this.gameLayer)).src}clear(){this.removeAll();}export(){let e={};return this.children.forEach(t=>{t.label&&(e[t.label]=i1(t));}),{tickers:St(P.currentTickersWithoutCreatedBySteps),tickersSteps:St(P._currentTickersSequence),elements:St(e),stage:St(Ao(this.gameLayer)),elementAliasesOrder:St(P.childrenAliasesOrder),tickersOnPause:St(P._tickersOnPause),tickersToCompleteOnStepEnd:St(P._tickersToCompleteOnStepEnd)}}async restore(e){try{let t={};if(e.hasOwnProperty("elementAliasesOrder")&&e.hasOwnProperty("elements")){let i=e.elements,s=e.elementAliasesOrder,n=s.filter(a=>i[a]).map(a=>t_(i[a])),o=await Promise.all(n);this.clear(),o.forEach((a,u)=>{let l=s[u];this.add(l,a),P.childrenAliasesOrder.push(l);});}else {N.error("The data does not have the properties elementAliasesOrder and elements");return}if(e.hasOwnProperty("stage")&&e.hasOwnProperty("stage")?Jr(this.gameLayer,e.stage,{ignoreScale:!0}):N.error("The data does not have the properties stage"),e.hasOwnProperty("tickers")){let i=e.tickers;Object.entries(i).forEach(([s,n])=>{let o=n.canvasElementAliases,a=Vt.getInstance(n.id,n.args,n.duration,n.priority);if(a){let u=this.addTicker(o,a);u&&(t[s]=u);}else N.error(`Ticker ${n.id} not found`);});}if(e.hasOwnProperty("tickersSteps")){let i=e.tickersSteps;Object.entries(i).forEach(([s,n])=>{P._currentTickersSequence[s]=n,Object.keys(n).forEach(o=>{this.runTickersSequence(s,o);});});}if(e.hasOwnProperty("tickersOnPause")){let i=e.tickersOnPause;Object.keys(i).forEach(s=>{let n=i[s];"tickerIdsExcluded"in n&&n.tickerIdsExcluded&&(i[s].tickerIdsExcluded=n.tickerIdsExcluded.map(o=>t[o]||o)),"tickerIdsIncluded"in n&&n.tickerIdsIncluded&&(i[s].tickerIdsIncluded=n.tickerIdsIncluded.map(o=>t[o]||o));}),P._tickersOnPause=i;}if(e.hasOwnProperty("tickersToCompleteOnStepEnd")){let i=e.tickersToCompleteOnStepEnd,s=i.tikersIds.map(o=>({id:t[o.id]||o.id})),n=i.stepAlias.map(o=>({id:o.id,alias:o.alias}));P._tickersToCompleteOnStepEnd={tikersIds:s,stepAlias:n};}}catch(t){N.error("Error importing data",t);}}};module.exports=Nh;
|