PageSourceSearch

https://hellooo.cards/_next/static/chunks/791.61200325bb9cf1ce.js

js hellooo.cards collected 2026-10-02 01:19:26 UTC 59,296 bytes, 198 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[791],{4972:function(e,t,r){var i=r(7);class s{static init(e){Object.defineProperty(this,"resizeTo",{set(e){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=e,e&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{let e,t;if(this._resizeTo){if(this._cancelResize(),this._resizeTo===globalThis.window)e=globalThis.innerWidth,t=globalThis.innerHeight;else{let{clientWidth:r,clientHeight:i}=this._resizeTo;e=r,t=i}this.renderer.resize(e,t),this.render()}},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}s.extension=i.nw.Application;var a=r(149),n=r(9625);class o{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set(e){this._ticker&&this._ticker.remove(this.render,this),this._ticker=e,e&&e.add(this.render,this,a.u.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?n.v.shared:new n.v,e.autoStart&&this.start()}static destroy(){if(this._ticker){let e=this._ticker;this.ticker=null,e.destroy()}}}o.extension=i.nw.Application,i.Rw.add(s),i.Rw.add(o)},4498:function(e,t,r){var i=r(7);class s{constructor(e){this._renderer=e}push(e,t,r){this._renderer.renderPipes.batch.break(r),r.add({renderPipeId:"filter",canBundle:!1,action:"pushFilter",container:t,filterEffect:e})}pop(e,t,r){this._renderer.renderPipes.batch.break(r),r.add({renderPipeId:"filter",action:"popFilter",canBundle:!1})}execute(e){"pushFilter"===e.action?this._renderer.filter.push(e):"popFilter"===e.action&&this._renderer.filter.pop()}destroy(){this._renderer=null}}s.extension={type:[i.nw.WebGLPipes,i.nw.WebGPUPipes,i.nw.CanvasPipes],name:"filter"};var a=r(493),n=r(6250),o=r(3963),l=r(5792),u=r(7328),d=r(8583),h=r(4704),c=r(4147),p=r(8721),f=r(1131);let g=new a.y;var m=r(5788);let x=new l.Z({attributes:{aPosition:{buffer:new Float32Array([0,0,1,0,1,1,0,1]),format:"float32x2",stride:8,offset:0}},indexBuffer:new Uint32Array([0,1,2,0,2,3])});class _{constructor(e){this._filterStackIndex=0,this._filterStack=[],this._filterGlobalUniforms=new u.o({uInputSize:{value:new Float32Array(4),type:"vec4<f32>"},uInputPixel:{value:new Float32Array(4),type:"vec4<f32>"},uInputClamp:{value:new Float32Array(4),type:"vec4<f32>"},uOutputFrame:{value:new Float32Array(4),type:"vec4<f32>"},uGlobalFrame:{value:new Float32Array(4),type:"vec4<f32>"},uOutputTexture:{value:new Float32Array(4),type:"vec4<f32>"}}),this._globalFilterBindGroup=new o.v({}),this.renderer=e}get activeBackTexture(){return this._activeFilterData?.backTexture}push(e){let t=this.renderer,r=e.filterEffect.filters;this._filterStack[this._filterStackIndex]||(this._filterStack[this._filterStackIndex]=this._getFilterData());let i=this._filterStack[this._filterStackIndex];if(this._filterStackIndex++,0===r.length){i.skip=!0;return}let s=i.bounds;if(e.renderables)!function(e,t){t.clear();let r=t.matrix;for(let r=0;r<e.length;r++){let i=e[r];i.globalDisplayStatus<7||(t.matrix=i.worldTransform,i.addBounds(t))}t.matrix=r}(e.renderables,s);else if(e.filterEffect.filterArea)s.clear(),s.addRect(e.filterEffect.filterArea),s.applyMatrix(e.container.worldTransform);else{var a;a=e.container,s.clear(),function e(t,r){if(7!==t.localDisplayStatus||!t.measurable)return;let i=!!t.effects.length,s=r;if((t.renderGroup||i)&&(s=f.W.get().clear()),t.boundsArea)r.addRect(t.boun
1dsArea,t.worldTransform);else{if(t.renderPipeId){let e=t.bounds;s.addFrame(e.minX,e.minY,e.maxX,e.maxY,t.groupTransform)}let r=t.children;for(let t=0;t<r.length;t++)e(r[t],s)}if(i){let e=!1;for(let r=0;r<t.effects.length;r++)t.effects[r].addBounds&&(e||(e=!0,s.applyMatrix(t.parentRenderGroup.worldTransform)),t.effects[r].addBounds(s,!0));e&&(s.applyMatrix(t.parentRenderGroup.worldTransform.copyTo(g).invert()),r.addBounds(s,t.relativeGroupTransform)),r.addBounds(s),f.W.return(s)}else t.renderGroup&&(r.addBounds(s,t.relativeGroupTransform),f.W.return(s))}(a,s),s.isValid||s.set(0,0,0,0),a.renderGroup?s.applyMatrix(a.renderGroup.localTransform):s.applyMatrix(a.parentRenderGroup.worldTransform)}let n=t.renderTarget.renderTarget.colorTexture.source,o=1/0,l=0,u=!0,d=!1,c=!1;for(let e=0;e<r.length;e++){let i=r[e];if(o=Math.min(o,"inherit"===i.resolution?n._resolution:i.resolution),l+=i.padding,"off"===i.antialias?u=!1:"inherit"===i.antialias&&u&&(u=n.antialias),!(i.compatibleRenderers&t.type)){c=!1;break}if(i.blendRequired&&!(t.backBuffer?.useBackBuffer??!0)){(0,m.Z)("Blend filter requires backBuffer on WebGL renderer to be enabled. Set `useBackBuffer: true` in the renderer options."),c=!1;break}c=i.enabled||c,d=d||i.blendRequired}if(!c){i.skip=!0;return}let p=t.renderTarget.rootViewPort;if(s.scale(o).fitBounds(0,p.width,0,p.height).ceil().scale(1/o).pad(0|l),!s.isPositive){i.skip=!0;return}i.skip=!1,i.bounds=s,i.blendRequired=d,i.container=e.container,i.filterEffect=e.filterEffect,i.previousRenderSurface=t.renderTarget.renderSurface,i.inputTexture=h.z.getOptimalTexture(s.width,s.height,o,u),t.renderTarget.bind(i.inputTexture,!0),t.globalUniforms.push({offset:s})}pop(){let e=this.renderer;this._filterStackIndex--;let t=this._filterStack[this._filterStackIndex];if(t.skip)return;this._activeFilterData=t;let r=t.inputTexture,i=t.bounds,s=d.x.EMPTY;if(e.renderTarget.finishRenderPass(),t.blendRequired){let r=this._filterStackIndex>0?this._filterStack[this._filterStackIndex-1].bounds:null,a=e.renderTarget.getRenderTarget(t.previousRenderSurface);s=this.getBackTexture(a,i,r)}t.backTexture=s;let a=t.filterEffect.filters;if(this._globalFilterBindGroup.setResource(r.source.style,2),this._globalFilterBindGroup.setResource(s.source,3),e.globalUniforms.pop(),1===a.length)a[0].apply(this,r,t.previousRenderSurface,!1),h.z.returnTexture(r);else{let e=t.inputTexture,r=h.z.getOptimalTexture(i.width,i.height,e.source._resolution,!1),s=0;for(s=0;s<a.length-1;++s){a[s].apply(this,e,r,!0);let t=e;e=r,r=t}a[s].apply(this,e,t.previousRenderSurface,!1),h.z.returnTexture(e),h.z.returnTexture(r)}t.blendRequired&&h.z.returnTexture(s)}getBackTexture(e,t,r){let i=e.colorTexture.source._resolution,s=h.z.getOptimalTexture(t.width,t.height,i,!1),a=t.minX,n=t.minY;r&&(a-=r.minX,n-=r.minY),a=Math.floor(a*i),n=Math.floor(n*i);let o=Math.ceil(t.width*i),l=Math.ceil(t.height*i);return this.renderer.renderTarget.copyToTexture(e,s,{x:a,y:n},{width:o,height:l},{x:0,y:0}),s}applyFilter(e,t,r,i){let s=this.renderer,a=this._filterStack[this._filterStackIndex],o=a.bounds,l=n.E.shared,u=a.previousRenderSurface===r,h=this.renderer.renderTarget.rootRenderTarget.colorTexture.source._resolution,p=this._filterStackIndex-1;for(;p>0&&this._filterStack[p].skip;)--p;p>0&&(h=this._filterStack[p].inputTexture.source._resolution);let f=this._filterGlobalUniforms,g=f.uniforms,m=g.uOutputFrame,_=g.uInputSize,b=g.uInputPixel,y=g.uInputClamp,T=g.uGlobalFrame,v=g.uOutputTexture;if(u){let e=this._filterStackIndex;for(;e>0;){e--;let t=this._filterStack[this._filterStackIndex-1];if(!t.skip){l.x=t.bounds.minX,l.y=t.bounds.minY;break}}m[0]=o.minX-l.x,m[1]=o.minY-l.y}else m[0]=0,m[1]=0;m[2]=t.frame.width,m[3]=t.frame.height,_[0]=t.source.width,_[1]=t.source.height,_[2]=1/_[0],_[3]=1/_[1],b[0]=t.source.pixelWidth,b[1]=t.source.pixelHeight,b[2]=1/b[0],b[3]=1/b[1],y[0]=.5*b[2],y[1]=.5*b[3],y[2]=t.frame.width*_[2]-.5*b[2],y[3]=t.frame.height*_[3]-.5*b[3];let w=this.renderer.renderTarget.rootRenderTarget.colorTexture;T[0]=l.x*h,T[1]=l.y*h,T[2]=w.source.width*h,T[3]=w.source.height*h;let S=this.renderer.renderTarget.getRenderTarget(r);if(s.renderTarget.bind(r,!!i),r instanceof d.x?(v[0]=r.frame.width,v[1]=r.frame.height):(v[0]=S.width,v[1]=S.height),v[2]=S.isRoot?-1:1,f.update(
1),s.renderPipes.uniformBatch){let e=s.renderPipes.uniformBatch.getUboResource(f);this._globalFilterBindGroup.setResource(e,0)}else this._globalFilterBindGroup.setResource(f,0);this._globalFilterBindGroup.setResource(t.source,1),this._globalFilterBindGroup.setResource(t.source.style,2),e.groups[0]=this._globalFilterBindGroup,s.encoder.draw({geometry:x,shader:e,state:e._state,topology:"triangle-list"}),s.type===c.g.WEBGL&&s.renderTarget.finishRenderPass()}_getFilterData(){return{skip:!1,inputTexture:null,bounds:new p.Y,container:null,filterEffect:null,blendRequired:!1,previousRenderSurface:null}}calculateSpriteMatrix(e,t){let r=this._activeFilterData,i=e.set(r.inputTexture._source.width,0,0,r.inputTexture._source.height,r.bounds.minX,r.bounds.minY),s=t.worldTransform.copyTo(a.y.shared);return s.invert(),i.prepend(s),i.scale(1/t.texture.frame.width,1/t.texture.frame.height),i.translate(t.anchor.x,t.anchor.y),i}}_.extension={type:[i.nw.WebGLSystem,i.nw.WebGPUSystem],name:"filter"},i.Rw.add(_),i.Rw.add(s)},8978:function(e,t,r){r.d(t,{$g:function(){return a},Kt:function(){return s},XH:function(){return i}});let i={name:"local-uniform-bit",vertex:{header:`
2
3            struct LocalUniforms {
4                uTransformMatrix:mat3x3<f32>,
5                uColor:vec4<f32>,
6                uRound:f32,
7            }
8
9            @group(1) @binding(0) var<uniform> localUniforms : LocalUniforms;
10        `,main:`
11            vColor *= localUniforms.uColor;
12            modelMatrix *= localUniforms.uTransformMatrix;
13        `,end:`
14            if(localUniforms.uRound == 1)
15            {
16                vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
17            }
18        `}},s={...i,vertex:{...i.vertex,header:i.vertex.header.replace("group(1)","group(2)")}},a={name:"local-uniform-bit",vertex:{header:`
19
20            uniform mat3 uTransformMatrix;
21            uniform vec4 uColor;
22            uniform float uRound;
23        `,main:`
24            vColor *= uColor;
25            modelMatrix = uTransformMatrix;
26        `,end:`
27            if(uRound == 1.)
28            {
29                gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
30            }
31        `}}},5918:function(e,t,r){r.d(t,{Z:function(){return a}});let i={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8,min:9,max:10},s=class e{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(1&this.data)}set blend(e){!!(1&this.data)!==e&&(this.data^=1)}get offsets(){return!!(2&this.data)}set offsets(e){!!(2&this.data)!==e&&(this.data^=2)}set cullMode(e){if("none"===e){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace="front"===e}get cullMode(){return this.culling?this.clockwiseFrontFace?"front":"back":"none"}get culling(){return!!(4&this.data)}set culling(e){!!(4&this.data)!==e&&(this.data^=4)}get depthTest(){return!!(8&this.data)}set depthTest(e){!!(8&this.data)!==e&&(this.data^=8)}get depthMask(){return!!(32&this.data)}set depthMask(e){!!(32&this.data)!==e&&(this.data^=32)}get clockwiseFrontFace(){return!!(16&this.data)}set clockwiseFrontFace(e){!!(16&this.data)!==e&&(this.data^=16)}get blendMode(){return this._blendMode}set blendMode(e){this.blend="none"!==e,this._blendMode=e,this._blendModeId=i[e]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){let t=new e;return t.depthTest=!1,t.blend=!0,t}};s.default2d=s.for2d();let a=s},4704:function(e,t,r){r.d(t,{z:function(){return l}});var i=r(5770),s=r(8744),a=r(8583);let n=0;class o{constructor(e){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1}createTexture(e,t,r){let i=new s.p({...this.textureOptions,width:e,height:t,resolution:1,antialias:r,autoGarbageCollect:!0});return new a.x({source:i,label:`texturePool_${n++}`})}getOptimalTexture(e,t,r=1,s){let a=Math.ceil(e*r-1e-6),n=Math.ceil(t*r-1e-6),o=((a=(0,i.a9)(a))<<17)+((n=(0,i.a9)(n))<<1)+(s?1:0);this._texturePool[o]||(this._texturePool[o]=[]);let l=this._texturePool[o].pop();return l||(l=this.createTexture(a,n,s)),l.source._resolution=r,l.source.width=a/r,l.source.height=n/r,l.source.pixelWidth=a,l.source.pixelHeight=n,l.frame.x=0,l.frame.y=0,l.frame.width=e,l.frame.height=t,l.updateUvs(),this._poolKeyHash[l.uid]=o,l}
31getSameSizeTexture(e,t=!1){let r=e.source;return this.getOptimalTexture(e.width,e.height,r._resolution,t)}returnTexture(e){let t=this._poolKeyHash[e.uid];this._texturePool[t].push(e)}clear(e){if(e=!1!==e)for(let e in this._texturePool){let t=this._texturePool[e];if(t)for(let e=0;e<t.length;e++)t[e].destroy(!0)}this._texturePool={}}}let l=new o},6884:function(e,t,r){r.d(t,{V:function(){return i}});function i(e,t,r){let i=(e>>24&255)/255;t[r++]=(255&e)/255*i,t[r++]=(e>>8&255)/255*i,t[r++]=(e>>16&255)/255*i,t[r++]=i}},1897:function(e,t,r){var i=r(7),s=r(5752),a=r(5918),n=r(7852),o=r(6884),l=r(2279);class u{constructor(e,t){this.state=a.Z.for2d(),this._graphicsBatchesHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this.renderer=e,this._adaptor=t,this._adaptor.init()}validateRenderable(e){let t=e.context,r=!!this._graphicsBatchesHash[e.uid],i=this.renderer.graphicsContext.updateGpuContext(t);return!!i.isBatchable||r!==i.isBatchable}addRenderable(e,t){let r=this.renderer.graphicsContext.updateGpuContext(e.context);e._didGraphicsUpdate&&(e._didGraphicsUpdate=!1,this._rebuild(e)),r.isBatchable?this._addToBatcher(e,t):(this.renderer.renderPipes.batch.break(t),t.add(e))}updateRenderable(e){let t=this._graphicsBatchesHash[e.uid];if(t)for(let e=0;e<t.length;e++){let r=t[e];r._batcher.updateElement(r)}}destroyRenderable(e){this._graphicsBatchesHash[e.uid]&&this._removeBatchForRenderable(e.uid),e.off("destroyed",this._destroyRenderableBound)}execute(e){if(!e.isRenderable)return;let t=this.renderer,r=e.context;if(!t.graphicsContext.getGpuContext(r).batches.length)return;let i=r.customShader||this._adaptor.shader;this.state.blendMode=e.groupBlendMode;let s=i.resources.localUniforms.uniforms;s.uTransformMatrix=e.groupTransform,s.uRound=t._roundPixels|e._roundPixels,(0,o.V)(e.groupColorAlpha,s.uColor,0),this._adaptor.execute(this,e)}_rebuild(e){let t=!!this._graphicsBatchesHash[e.uid],r=this.renderer.graphicsContext.updateGpuContext(e.context);t&&this._removeBatchForRenderable(e.uid),r.isBatchable&&this._initBatchesForRenderable(e),e.batched=r.isBatchable}_addToBatcher(e,t){let r=this.renderer.renderPipes.batch,i=this._getBatchesForRenderable(e);for(let e=0;e<i.length;e++){let s=i[e];r.addToBatch(s,t)}}_getBatchesForRenderable(e){return this._graphicsBatchesHash[e.uid]||this._initBatchesForRenderable(e)}_initBatchesForRenderable(e){let t=e.context,r=this.renderer.graphicsContext.getGpuContext(t),i=this.renderer._roundPixels|e._roundPixels,s=r.batches.map(t=>{let r=n.u.get(l.I);return t.copyTo(r),r.renderable=e,r.roundPixels=i,r});return void 0===this._graphicsBatchesHash[e.uid]&&e.on("destroyed",this._destroyRenderableBound),this._graphicsBatchesHash[e.uid]=s,s}_removeBatchForRenderable(e){this._graphicsBatchesHash[e].forEach(e=>{n.u.return(e)}),this._graphicsBatchesHash[e]=null}
31destroy(){for(let e in this.renderer=null,this._adaptor.destroy(),this._adaptor=null,this.state=null,this._graphicsBatchesHash)this._removeBatchForRenderable(e);this._graphicsBatchesHash=null}}u.extension={type:[i.nw.WebGLPipes,i.nw.WebGPUPipes,i.nw.CanvasPipes],name:"graphics"},i.Rw.add(u),i.Rw.add(s.hJ)},2498:function(e,t,r){var i=r(7),s=r(493),a=r(3963),n=r(7328),o=r(9046),l=r(7852),u=r(6884),d=r(2164);class h{constructor(e,t){this.localUniforms=new n.o({uTransformMatrix:{value:new s.y,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),this.localUniformsBindGroup=new a.v({0:this.localUniforms}),this._meshDataHash=Object.create(null),this._gpuBatchableMeshHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this.renderer=e,this._adaptor=t,this._adaptor.init()}validateRenderable(e){let t=this._getMeshData(e),r=t.batched,i=e.batched;if(t.batched=i,r!==i)return!0;if(i){let r=e._geometry;if(r.indices.length!==t.indexSize||r.positions.length!==t.vertexSize)return t.indexSize=r.indices.length,t.vertexSize=r.positions.length,!0;let i=this._getBatchableMesh(e),s=e.texture;if(i.texture._source!==s._source&&i.texture._source!==s._source)return!i._batcher.checkAndUpdateTexture(i,s)}return!1}addRenderable(e,t){let r=this.renderer.renderPipes.batch,{batched:i}=this._getMeshData(e);if(i){let i=this._getBatchableMesh(e);i.texture=e._texture,i.geometry=e._geometry,r.addToBatch(i,t)}else r.break(t),t.add(e)}updateRenderable(e){if(e.batched){let t=this._gpuBatchableMeshHash[e.uid];t.texture=e._texture,t.geometry=e._geometry,t._batcher.updateElement(t)}}destroyRenderable(e){this._meshDataHash[e.uid]=null;let t=this._gpuBatchableMeshHash[e.uid];t&&(l.u.return(t),this._gpuBatchableMeshHash[e.uid]=null),e.off("destroyed",this._destroyRenderableBound)}execute(e){if(!e.isRenderable)return;e.state.blendMode=(0,o.a)(e.groupBlendMode,e.texture._source);let t=this.localUniforms;t.uniforms.uTransformMatrix=e.groupTransform,t.uniforms.uRound=this.renderer._roundPixels|e._roundPixels,t.update(),(0,u.V)(e.groupColorAlpha,t.uniforms.uColor,0),this._adaptor.execute(this,e)}_getMeshData(e){return this._meshDataHash[e.uid]||this._initMeshData(e)}_initMeshData(e){return this._meshDataHash[e.uid]={batched:e.batched,indexSize:e._geometry.indices?.length,vertexSize:e._geometry.positions?.length},e.on("destroyed",this._destroyRenderableBound),this._meshDataHash[e.uid]}_getBatchableMesh(e){return this._gpuBatchableMeshHash[e.uid]||this._initBatchableMesh(e)}_initBatchableMesh(e){let t=l.u.get(d.X);return t.renderable=e,t.texture=e._texture,t.transform=e.groupTransform,t.roundPixels=this.renderer._roundPixels|e._roundPixels,this._gpuBatchableMeshHash[e.uid]=t,t}destroy(){for(let e in this._gpuBatchableMeshHash)this._gpuBatchableMeshHash[e]&&l.u.return(this._gpuBatchableMeshHash[e]);this._gpuBatchableMeshHash=null,this._meshDataHash=null,this.localUniforms=null,this.localUniformsBindGroup=null,this._adaptor.de
31stroy(),this._adaptor=null,this.renderer=null}}h.extension={type:[i.nw.WebGLPipes,i.nw.WebGPUPipes,i.nw.CanvasPipes],name:"mesh"},i.Rw.add(h)},2164:function(e,t,r){r.d(t,{X:function(){return i}});class i{constructor(){this.batcherName="default",this.packAsQuad=!1,this.indexOffset=0,this.attributeOffset=0,this.roundPixels=0,this._batcher=null,this._batch=null,this._uvUpdateId=-1,this._textureMatrixUpdateId=-1}get blendMode(){return this.renderable.groupBlendMode}reset(){this.renderable=null,this.texture=null,this._batcher=null,this._batch=null,this.geometry=null,this._uvUpdateId=-1,this._textureMatrixUpdateId=-1}get uvs(){let e=this.geometry.getBuffer("aUV"),t=e.data,r=t,i=this.texture.textureMatrix;return i.isSimple||(r=this._transformedUvs,(this._textureMatrixUpdateId!==i._updateID||this._uvUpdateId!==e._updateID)&&((!r||r.length<t.length)&&(r=this._transformedUvs=new Float32Array(t.length)),this._textureMatrixUpdateId=i._updateID,this._uvUpdateId=e._updateID,i.multiplyUvs(t,r))),r}get positions(){return this.geometry.positions}get indices(){return this.geometry.indices}get color(){return this.renderable.groupColorAlpha}get groupTransform(){return this.renderable.groupTransform}get attributeSize(){return this.geometry.positions.length/2}get indexSize(){return this.geometry.indices.length}}},6952:function(e,t,r){r.d(t,{x:function(){return l}});var i=r(4007),s=r(6801),a=r(5792),n=r(5122);let o=class e extends a.Z{constructor(...t){let r=t[0]??{};r instanceof Float32Array&&((0,n.a1)(n.PD,"use new MeshGeometry({ positions, uvs, indices }) instead"),r={positions:r,uvs:t[1],indices:t[2]});let a=(r={...e.defaultOptions,...r}).positions||new Float32Array([0,0,1,0,1,1,0,1]),o=r.uvs||new Float32Array([0,0,1,0,1,1,0,1]),l=r.indices||new Uint32Array([0,1,2,0,2,3]),u=r.shrinkBuffersToFit;super({attributes:{aPosition:{buffer:new i.l({data:a,label:"attribute-mesh-positions",shrinkToFit:u,usage:s.F.VERTEX|s.F.COPY_DST}),format:"float32x2",stride:8,offset:0},aUV:{buffer:new i.l({data:o,label:"attribute-mesh-uvs",shrinkToFit:u,usage:s.F.VERTEX|s.F.COPY_DST}),format:"float32x2",stride:8,offset:0}},indexBuffer:new i.l({data:l,label:"index-mesh-buffer",shrinkToFit:u,usage:s.F.INDEX|s.F.COPY_DST}),topology:r.topology}),this.batchMode="auto"}get positions(){return this.attributes.aPosition.buffer.data}set positions(e){this.attributes.aPosition.buffer.data=e}get uvs(){return this.attributes.aUV.buffer.data}set uvs(e){this.attributes.aUV.buffer.data=e}get indices(){return this.indexBuffer.data}set indices(e){this.indexBuffer.data=e}};o.defaultOptions={topology:"triangle-list",shrinkBuffersToFit:!1};let l=o},8832:function(e,t,r){var i=r(7),s=r(7852),a=r(2164),n=r(5122),o=r(6952);let l=class e extends o.x{constructor(...e){super({});let t=e[0]??{};"number"==typeof t&&((0,n.a1)(n.PD,"PlaneGeometry constructor changed please use { width, height, verticesX, verticesY } instead"),t={width:t,height:e[1],verticesX:e[2],verticesY:e[3]}),this.build(t)}build(t){t={...e.defaultOptions,...t},this.verticesX=this.verticesX??t.verticesX,this.verticesY=this.verticesY??t.verticesY,this.width=this.width??t.width,this.height=this.height??t.height;let r=this.verticesX*this.verticesY,i=[],s=[],a=[],n=this.verticesX-1,o=this.verticesY-1,l=this.width/n,u=this.height/o;for(let e=0;e<r;e++){let t=e%this.verticesX,r=e/this.verticesX|0;i.push(t*l,r*u),s.push(t/n,r/o)}let d=n*o;for(let e=0;e<d;e++){let t=e%n,r=e/n|0,i=r*this.verticesX+t,s=r*this.verticesX+t+1,o=(r+1)*this.verticesX+t,l=(r+1)*this.verticesX+t+1;a.push(i,s,o,s,l,o)}this.buffers[0].data=new Float32Array(i),this.buffers[1].data=new Float32Array(s),this.indexBuffer.data=new Uint32Array(a),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()}};l.defaultOptions={width:100,height:100,verticesX:10,verticesY:10};let u=l,d=class e extends u{constructor(t={}){t={...e.defaultOptions,...t},super({width:t.width,height:t.height,verticesX:4,verticesY:4}),this.update(t)}update(e){this.width=e.width??this.width,this.height=e.height??this.height,this._originalWidth=e.originalWidth??this._originalWidth,this._originalHeight=e.originalHeight??this._originalHeight,this._leftWi
31dth=e.leftWidth??this._leftWidth,this._rightWidth=e.rightWidth??this._rightWidth,this._topHeight=e.topHeight??this._topHeight,this._bottomHeight=e.bottomHeight??this._bottomHeight,this.updateUvs(),this.updatePositions()}updatePositions(){let e=this.positions,t=this._leftWidth+this._rightWidth,r=this.width>t?1:this.width/t,i=this._topHeight+this._bottomHeight,s=Math.min(r,this.height>i?1:this.height/i);e[9]=e[11]=e[13]=e[15]=this._topHeight*s,e[17]=e[19]=e[21]=e[23]=this.height-this._bottomHeight*s,e[25]=e[27]=e[29]=e[31]=this.height,e[2]=e[10]=e[18]=e[26]=this._leftWidth*s,e[4]=e[12]=e[20]=e[28]=this.width-this._rightWidth*s,e[6]=e[14]=e[22]=e[30]=this.width,this.getBuffer("aPosition").update()}updateUvs(){let e=this.uvs;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1;let t=1/this._originalWidth,r=1/this._originalHeight;e[2]=e[10]=e[18]=e[26]=t*this._leftWidth,e[9]=e[11]=e[13]=e[15]=r*this._topHeight,e[4]=e[12]=e[20]=e[28]=1-t*this._rightWidth,e[17]=e[19]=e[21]=e[23]=1-r*this._bottomHeight,this.getBuffer("aUV").update()}};d.defaultOptions={width:100,height:100,leftWidth:10,topHeight:10,rightWidth:10,bottomHeight:10,originalWidth:100,originalHeight:100};class h{constructor(e){this._gpuSpriteHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=e}addRenderable(e,t){let r=this._getGpuSprite(e);e._didSpriteUpdate&&this._updateBatchableSprite(e,r),this._renderer.renderPipes.batch.addToBatch(r,t)}updateRenderable(e){let t=this._gpuSpriteHash[e.uid];e._didSpriteUpdate&&this._updateBatchableSprite(e,t),t._batcher.updateElement(t)}validateRenderable(e){let t=e._texture,r=this._getGpuSprite(e);return r.texture._source!==t._source&&!r._batcher.checkAndUpdateTexture(r,t)}destroyRenderable(e){let t=this._gpuSpriteHash[e.uid];s.u.return(t.geometry),s.u.return(t),this._gpuSpriteHash[e.uid]=null,e.off("destroyed",this._destroyRenderableBound)}_updateBatchableSprite(e,t){e._didSpriteUpdate=!1,t.geometry.update(e),t.texture=e._texture}_getGpuSprite(e){return this._gpuSpriteHash[e.uid]||this._initGPUSprite(e)}_initGPUSprite(e){let t=s.u.get(a.X);return t.geometry=s.u.get(d),t.renderable=e,t.transform=e.groupTransform,t.texture=e._texture,t.roundPixels=this._renderer._roundPixels|e._roundPixels,e._didSpriteUpdate=!0,this._gpuSpriteHash[e.uid]=t,e.on("destroyed",this._destroyRenderableBound),t}destroy(){for(let e in this._gpuSpriteHash)this._gpuSpriteHash[e].geometry.destroy();this._gpuSpriteHash=null,this._renderer=null}}h.extension={type:[i.nw.WebGLPipes,i.nw.WebGPUPipes,i.nw.CanvasPipes],name:"nineSliceSprite"},i.Rw.add(h)},8669:function(e,t,r){let i,s;var a=r(7),n=r(9046),o=r(5918),l=r(4147),u=r(6884),d=r(2164),h=r(6952),c=r(493),p=r(7978),f=r(8978),g=r(5564),m=r(4027),x=r(7328),_=r(8583);let b={name:"tiling-bit",vertex:{header:`
32            struct TilingUniforms {
33                uMapCoord:mat3x3<f32>,
34                uClampFrame:vec4<f32>,
35                uClampOffset:vec2<f32>,
36                uTextureTransform:mat3x3<f32>,
37                uSizeAnchor:vec4<f32>
38            };
39
40            @group(2) @binding(0) var<uniform> tilingUniforms: TilingUniforms;
41            @group(2) @binding(1) var uTexture: texture_2d<f32>;
42            @group(2) @binding(2) var uSampler: sampler;
43        `,main:`
44            uv = (tilingUniforms.uTextureTransform * vec3(uv, 1.0)).xy;
45
46            position = (position - tilingUniforms.uSizeAnchor.zw) * tilingUniforms.uSizeAnchor.xy;
47        `},fragment:{header:`
48            struct TilingUniforms {
49                uMapCoord:mat3x3<f32>,
50                uClampFrame:vec4<f32>,
51                uClampOffset:vec2<f32>,
52                uTextureTransform:mat3x3<f32>,
53                uSizeAnchor:vec4<f32>
54            };
55
56            @group(2) @binding(0) var<uniform> tilingUniforms: TilingUniforms;
57            @group(2) @binding(1) var uTexture: texture_2d<f32>;
58            @group(2) @binding(2) var uSampler: sampler;
59        `,main:`
60
61            var coord = vUV + ceil(tilingUniforms.uClampOffset - vUV);
62            coord = (tilingUniforms.uMapCoord * vec3(coord, 1.0)).xy;
63            var unclamped = coord;
64            coord = clamp(coord, tilingUniforms.uClampFrame.xy, tilingUniforms.uClampFrame.zw);
65
66            var bias = 0.;
67
68            if(unclamped.x == coord.x && unclamped.y == coord.y)
69            {
70                bias = -32.;
71            } 
72
73            outColor = textureSampleBias(uTexture, uSampler, coord, bias);
74        `}},y={name:"tiling-bit",vertex:{header:`
75            uniform mat3 uTextureTransform;
76            uniform vec4 uSizeAnchor;
77        
78        `,main:`
79            uv = (uTextureTransform * vec3(aUV, 1.0)).xy;
80
81            position = (position - uSizeAnchor.zw) * uSizeAnchor.xy;
82        `},fragment:{header:`
83            uniform sampler2D uTexture;
84            uniform mat3 uMapCoord;
85            uniform vec4 uClampFrame;
86            uniform vec2 uClampOffset;
87        `,main:`
88
89        vec2 coord = vUV + ceil(uClampOffset - vUV);
90        coord = (uMapCoord * vec3(coord, 1.0)).xy;
91        vec2 unclamped = coord;
92        coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);
93        
94        outColor = texture(uTexture, coord, unclamped == coord ? 0.0 : -32.0);// lod-bias very negative to force lod 0
95    
96        `}};class T extends m.e{constructor(){i??(i=(0,p.d)({name:"tiling-sprite-shader",bits:[f.XH,b,g.j]})),s??(s=(0,p.o)({name:"tiling-sprite-shader",bits:[f.$g,y,g.X]})),super({glProgram:s,gpuProgram:i,resources:{localUniforms:new x.o({uTransformMatrix:{value:new c.y,type:"mat3x3<f32>"},uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uRound:{value:0,type:"f32"}}),tilingUniforms:new x.o({uMapCoord:{value:new c.y,type:"mat3x3<f32>"},uClampFrame:{value:new Float32Array([0,0,1,1]),type:"vec4<f32>"},uClampOffset:{value:new Float32Array([0,0]),type:"vec2<f32>"},uTextureTransform:{value:new c.y,type:"mat3x3<f32>"},uSizeAnchor:{value:new Float32Array([100,100,.5,.5]),type:"vec4<f32>"}}),uTexture:_.x.EMPTY.source,uSampler:_.x.EMPTY.source.style}})}updateUniforms(e,t,r,i,s,a){let n=this.resources.tilingUniforms,o=a.width,l=a.height,u=a.textureMatrix,d=n.uniforms.uTextureTransform;d.set(r.a*o/e,r.b*o/t,r.c*l/e,r.d*l/t,r.tx/e,r.ty/t),d.invert(),n.uniforms.uMapCoord=u.mapCoord,n.uniforms.uClampFrame=u.uClampFrame,n.uniforms.uClampOffset=u.uClampOffset,n.uniforms.uTextureTransform=d,n.uniforms.uSizeAnchor[0]=e,n.uniforms.uSizeAnchor[1]=t,n.uniforms.uSizeAnchor[2]=i,n.uniforms.uSizeAnchor[3]=s,a&&(this.resources.uTexture=a.source,this.resources.uSampler=a.source.style)}}class v extends h.x{constructor(){super({positions:new Float32Array([0,0,1,0,1,1,0,1]),uvs:new Float32Array([0,0,1,0,1,1,0,1]),indices:new Uint32Array([0,1,2,0,2,3])})}}let w=new v;class S{constructor(e){this._state=o.Z.default2d,this._tilingSpriteDataHash=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=e}validateRenderable(e){let t=this._getTilingSpriteData(e),r=t.canBatch;this._updateCanBatch(e);let i=t.canBatch;if(i&&i===r){let{batchableMesh:r}=t;if(r&&r.texture._source!==e.texture._source)return!r._batcher.checkAndUpdateTexture(r,e.texture)}return r!==i}addRenderable(e,t){let r=this._renderer.renderPipes.batch;this._updateCanBatch(e);let i=this._getTilingSpriteData(e),{geometry:s,canBatch:a}=i;if(a){i.batchableMesh||(i.batchableMesh=new d.X);let a=i.batchableMesh;e._didTilingSpriteUpdate&&(e._didTilingSpriteUpdate=!1,this._updateBatchableMesh(e),a.geometry=s,a.renderable=e,a.transform=e.groupTransform,a.texture=e._texture),a.roundPixels=this._renderer._roundPixels|e._roundPixels,r.addToBatch(a,t)}else r.break(t),i.shader||(i.shader=new T),this.updateRenderable(e),t.add(e)}execute(e){let{shader:t}=this._tilingSpriteDataHash[e.uid];t.groups[0]=this._renderer.globalUniforms.bindGroup;let r=t.resources.localUniforms.uniforms;r.uTransformMatrix=e.groupTransform,r.uRound=this._renderer._roundPixels|e._roundPixels,(0,u.V)(e.groupColorAlpha,r.uColor,0),this._state.blendMode=(0,n.a)(e.groupBlendMode,e.texture._source),this._renderer.encoder.draw({geometry:w,shader:t,state:this._state})}updateRenderable(e){let t=this._getTilingSpriteData(e),{canBatch:r}=t;if(r){let{batchableMesh:r}=t;e._didTilingSpriteUpdate&&this._updateBatchableMesh(e),r._batcher.updateElement(r)}else if(e._didTilingSpriteUpdate){let{shader:r}=t;r.updateUniforms(e.width,e.height,e._tileTransform.matrix,e.anchor.x,e.anchor.y,e.texture)}e._didTilingSpriteUpdate=!1}destroyRenderable(e){let t=this._getTilingSpriteData(e);t.batchableMesh=null,t.shader?.destroy(),this._tilingSpriteDataHash[e.uid]=null,e.off("destroyed",this._destroyRenderableBound)}_getTilingSpriteData(e){return this._tilingSpriteDataHash[e.uid]||this._initTilingSpriteData(e)}_initTilingSpriteData(e){let t=new h.x({indices:w.indices,positions:w.positions.slice(),uvs:w.uvs.slice()});return this._tilingSpriteDataHash[e.uid]={canBatch:!0,renderable:e,geometry:t},e.on("destroyed",this._destroyRenderableBound),this._tilingSpriteDataHash[e.uid]}_updateBatchableMesh(e){let{geometry:t}=this._getTilingSpriteData(e),r=e.texture.source.style;
96"repeat"!==r.addressMode&&(r.addressMode="repeat",r.update()),function(e,t){let r=e.texture,i=r.frame.width,s=r.frame.height,a=0,n=0;e._applyAnchorToTexture&&(a=e.anchor.x,n=e.anchor.y),t[0]=t[6]=-a,t[2]=t[4]=1-a,t[1]=t[3]=-n,t[5]=t[7]=1-n;let o=c.y.shared;o.copyFrom(e._tileTransform.matrix),o.tx/=e.width,o.ty/=e.height,o.invert(),o.scale(e.width/i,e.height/s),function(e,t,r,i){let s=0,a=e.length/2,n=i.a,o=i.b,l=i.c,u=i.d,d=i.tx,h=i.ty;for(r*=2;s<a;){let t=e[r],i=e[r+1];e[r]=n*t+l*i+d,e[r+1]=o*t+u*i+h,r+=2,s++}}(t,2,0,o)}(e,t.uvs),function(e,t){let r=e.anchor.x,i=e.anchor.y;t[0]=-r*e.width,t[1]=-i*e.height,t[2]=(1-r)*e.width,t[3]=-i*e.height,t[4]=(1-r)*e.width,t[5]=(1-i)*e.height,t[6]=-r*e.width,t[7]=(1-i)*e.height}(e,t.positions)}destroy(){for(let e in this._tilingSpriteDataHash)this.destroyRenderable(this._tilingSpriteDataHash[e].renderable);this._tilingSpriteDataHash=null,this._renderer=null}_updateCanBatch(e){let t=this._getTilingSpriteData(e),r=e.texture,i=!0;return this._renderer.type===l.g.WEBGL&&(i=this._renderer.context.supports.nonPowOf2wrapping),t.canBatch=r.textureMatrix.isSimple&&(i||r.source.isPowerOfTwo),t.canBatch}}S.extension={type:[a.nw.WebGLPipes,a.nw.WebGPUPipes,a.nw.CanvasPipes],name:"tilingSprite"},a.Rw.add(S)},999:function(e,t,r){r.d(t,{c:function(){return i}});class i{constructor(){this.batcherName="default",this.attributeSize=4,this.indexSize=6,this.packAsQuad=!0,this.roundPixels=0,this._attributeStart=0,this._batcher=null,this._batch=null}get blendMode(){return this.renderable.groupBlendMode}get color(){return this.renderable.groupColorAlpha}reset(){this.renderable=null,this.texture=null,this._batcher=null,this._batch=null,this.bounds=null}}},7900:function(e,t,r){let i,s;var a=r(7),n=r(6075),o=r(7852),l=r(1352),u=r(493),d=r(9905),h=r(7978),c=r(7091),p=r(4035),f=r(5564),g=r(657),m=r(4027),x=r(7328);let _={name:"local-uniform-msdf-bit",vertex:{header:`
97            struct LocalUniforms {
98                uColor:vec4<f32>,
99                uTransformMatrix:mat3x3<f32>,
100                uDistance: f32,
101                uRound:f32,
102            }
103
104            @group(2) @binding(0) var<uniform> localUniforms : LocalUniforms;
105        `,main:`
106            vColor *= localUniforms.uColor;
107            modelMatrix *= localUniforms.uTransformMatrix;
108        `,end:`
109            if(localUniforms.uRound == 1)
110            {
111                vPosition = vec4(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
112            }
113        `},fragment:{header:`
114            struct LocalUniforms {
115                uColor:vec4<f32>,
116                uTransformMatrix:mat3x3<f32>,
117                uDistance: f32
118            }
119
120            @group(2) @binding(0) var<uniform> localUniforms : LocalUniforms;
121         `,main:` 
122            outColor = vec4<f32>(calculateMSDFAlpha(outColor, localUniforms.uColor, localUniforms.uDistance));
123        `}},b={name:"local-uniform-msdf-bit",vertex:{header:`
124            uniform mat3 uTransformMatrix;
125            uniform vec4 uColor;
126            uniform float uRound;
127        `,main:`
128            vColor *= uColor;
129            modelMatrix *= uTransformMatrix;
130        `,end:`
131            if(uRound == 1.)
132            {
133                gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
134            }
135        `},fragment:{header:`
136            uniform float uDistance;
137         `,main:` 
138            outColor = vec4(calculateMSDFAlpha(outColor, vColor, uDistance));
139        `}},y={name:"msdf-bit",fragment:{header:`
140            fn calculateMSDFAlpha(msdfColor:vec4<f32>, shapeColor:vec4<f32>, distance:f32) -> f32 {
141                
142                // MSDF
143                var median = msdfColor.r + msdfColor.g + msdfColor.b -
144                    min(msdfColor.r, min(msdfColor.g, msdfColor.b)) -
145                    max(msdfColor.r, max(msdfColor.g, msdfColor.b));
146            
147                // SDF
148                median = min(median, msdfColor.a);
149
150                var screenPxDistance = distance * (median - 0.5);
151                var alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);
152                if (median < 0.01) {
153                    alpha = 0.0;
154                } else if (median > 0.99) {
155                    alpha = 1.0;
156                }
157
158                // Gamma correction for coverage-like alpha
159                var luma: f32 = dot(shapeColor.rgb, vec3<f32>(0.299, 0.587, 0.114));
160                var gamma: f32 = mix(1.0, 1.0 / 2.2, luma);
161                var coverage: f32 = pow(shapeColor.a * alpha, gamma);
162
163                return coverage;
164             
165            }
166        `}},T={name:"msdf-bit",fragment:{header:`
167            float calculateMSDFAlpha(vec4 msdfColor, vec4 shapeColor, float distance) {
168                
169                // MSDF
170                float median = msdfColor.r + msdfColor.g + msdfColor.b -
171                                min(msdfColor.r, min(msdfColor.g, msdfColor.b)) -
172                                max(msdfColor.r, max(msdfColor.g, msdfColor.b));
173               
174                // SDF
175                median = min(median, msdfColor.a);
176            
177                float screenPxDistance = distance * (median - 0.5);
178                float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);
179           
180                if (median < 0.01) {
181                    alpha = 0.0;
182                } else if (median > 0.99) {
183                    alpha = 1.0;
184                }
185
186                // Gamma correction for coverage-like alpha
187                float luma = dot(shapeColor.rgb, vec3(0.299, 0.587, 0.114));
188                float gamma = mix(1.0, 1.0 / 2.2, luma);
189                float coverage = pow(shapeColor.a * alpha, gamma);  
190              
191                return coverage;
192            }
193        `}};class v extends m.e{constructor(){let e=new x.o({uColor:{value:new Float32Array([1,1,1,1]),type:"vec4<f32>"},uTransformMatrix:{value:new u.y,type:"mat3x3<f32>"},uDistance:{value:4,type:"f32"},uRound:{value:0,type:"f32"}}),t=(0,d.N)();i??(i=(0,h.d)({name:"sdf-shader",bits:[c.M,(0,p.m)(t),_,y,f.j]})),s??(s=(0,h.o)({name:"sdf-shader",bits:[c.T,(0,p.h)(t),b,T,f.X]})),super({glProgram:s,gpuProgram:i,resources:{localUniforms:e,batchSamplers:(0,g.O)(t)}})}}var w=r(5578),S=r(5878);class C{constructor(e){this._gpuBitmapText={},this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=e}validateRenderable(e){let t=this._getGpuBitmapText(e);return e._didTextUpdate&&(e._didTextUpdate=!1,this._updateContext(e,t)),this._renderer.renderPipes.graphics.validateRenderable(t)}addRenderable(e,t){let r=this._getGpuBitmapText(e);R(e,r),e._didTextUpdate&&(e._didTextUpdate=!1,this._updateContext(e,r)),this._renderer.renderPipes.graphics.addRenderable(r,t),r.context.customShader&&this._updateDistanceField(e)}destroyRenderable(e){e.off("destroyed",this._destroyRenderableBound),this._destroyRenderableByUid(e.uid)}_destroyRenderableByUid(e){let t=this._gpuBitmapText[e].context;t.customShader&&(o.u.return(t.customShader),t.customShader=null),o.u.return(this._gpuBitmapText[e]),this._gpuBitmapText[e]=null}updateRenderable(e){let t=this._getGpuBitmapText(e);R(e,t),this._renderer.renderPipes.graphics.updateRenderable(t),t.context.customShader&&this._updateDistanceField(e)}_updateContext(e,t){let{context:r}=t,i=w.W.getFont(e.text,e._style);r.clear(),"none"===i.distanceField.type||r.customShader||(r.customShader=o.u.get(v));let s=Array.from(e.text),a=e._style,n=i.baseLineOffset,l=(0,S._)(s,a,i,!0),u=0,d=a.padding,h=l.scale,c=l.width,p=l.height+l.offsetY;a._stroke&&(c+=a._stroke.width/h,p+=a._stroke.width/h),r.translate(-e._anchor._x*c-d,-e._anchor._y*p-d).scale(h,h);let f=i.applyFillAsTint?a._fill.color:16777215;for(let e=0;e<l.lines.length;e++){let t=l.lines[e];for(let e=0;e<t.charPositions.length;e++){let a=s[u++],o=i.chars[a];o?.texture&&r.texture(o.texture,f||"black",Math.round(t.charPositions[e]+o.xOffset),Math.round(n+o.yOffset))}n+=i.lineHeight}}_getGpuBitmapText(e){return this._gpuBitmapText[e.uid]||this.initGpuText(e)}initGpuText(e){let t=o.u.get(l.T);return this._gpuBitmapText[e.uid]=t,this._updateContext(e,t),e.on("destroyed",this._destroyRenderableBound),this._gpuBitmapText[e.uid]}_updateDistanceField(e){let t=this._getGpuBitmapText(e).context,r=e._style.fontFamily,i=n.C.get(`${r}-bitmap`),{a:s,b:a,c:o,d:l}=e.groupTransform,u=i.baseRenderedFontSize/e._style.fontSize,d=(Math.abs(Math.sqrt(s*s+a*a))+Math.abs(Math.sqrt(o*o+l*l)))/2*i.distanceField.range*(1/u);t.customShader.resources.localUniforms.uniforms.uDistance=d}destroy(){for(let e in this._gpuBitmapText)this._destroyRenderableByUid(e);this._gpuBitmapText=null,this._renderer=null}}function R(e,t){t.groupTransform=e.groupTransform,t.groupColorAlpha=e.groupColorAlpha,t.groupColor=e.groupColor,t.groupBlendMode=e.groupBlendMode,t.globalDisplayStatus=e.globalDisplayStatus,t.groupTransform=e.groupTransform,t.localDisplayStatus=e.localDisplayStatus,t.groupAlpha=e.groupAlpha,t._roundPixels=e._roundPixels}C.extension={type:[a.nw.WebGLPipes,a.nw.WebGPUPipes,a.nw.CanvasPipes],name:"bitmapText"},a.Rw.add(C)},2126:function(e,t,r){let i;var s=r(7),a=r(8583),n=r(2659),o=r(7852),l=r(999);class u{constructor(e){this._gpuText=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=e,this._renderer.runners.resolutionChange.add(this)}resolutionChange(){for(let e in this._gpuText){let t=this._gpuText[e];if(!t)continue;let r=t.batchableSprite.renderable;r._autoResolution&&(r._resolution=this._renderer.resolution,r.onViewUpdate())}}validateRenderable(e){let t=this._getGpuText(e),r=e._getKey();return t.textureNeedsUploading?(t.textureNeedsUploading=!1,!0):t.currentKey!==r}addRenderable(e,t){let r=this._getGpuText(e).batchableSprite;e._didTextUpdate&&this._updateText(e),this._renderer.renderPipes.batch.addToBatch(r,t)}updateRenderable(e){let t=this._getGpuText(e).batchableSprite;e._didTextUpdate&&this._updateText(e),t._batcher.updateElement(t)}destroyRenderable(e){e.off("destroyed",this._destroyRenderableBound),this._destroyRenderableById(e.uid)}_destroyRenderableById(e){let t=this._gpuText[e];this._renderer.htmlText.decreaseReferenceCount(t.currentKey),o.u.return(t.batchableSprite),this._gpuText[e]=null}_updateText(e){let t=e._getKey(),r=this._getGpuText(e),i=r.batchableSprite;r.currentKey!==t&&this._updateGpuText(e).catch(e=>{console.error(e)}),e._didTextUpdate=!1;let s=e._style.padding;
193(0,n.w)(i.bounds,e._anchor,i.texture,s)}async _updateGpuText(e){e._didTextUpdate=!1;let t=this._getGpuText(e);if(t.generatingTexture)return;let r=e._getKey();this._renderer.htmlText.decreaseReferenceCount(t.currentKey),t.generatingTexture=!0,t.currentKey=r;let i=e.resolution??this._renderer.resolution,s=await this._renderer.htmlText.getManagedTexture(e.text,i,e._style,e._getKey()),a=t.batchableSprite;a.texture=t.texture=s,t.generatingTexture=!1,t.textureNeedsUploading=!0,e.onViewUpdate();let o=e._style.padding;(0,n.w)(a.bounds,e._anchor,a.texture,o)}_getGpuText(e){return this._gpuText[e.uid]||this.initGpuText(e)}initGpuText(e){let t={texture:a.x.EMPTY,currentKey:"--",batchableSprite:o.u.get(l.c),textureNeedsUploading:!1,generatingTexture:!1},r=t.batchableSprite;return r.renderable=e,r.transform=e.groupTransform,r.texture=a.x.EMPTY,r.bounds={minX:0,maxX:1,minY:0,maxY:0},r.roundPixels=this._renderer._roundPixels|e._roundPixels,e._resolution=e._autoResolution?this._renderer.resolution:e.resolution,this._gpuText[e.uid]=t,e.on("destroyed",this._destroyRenderableBound),t}destroy(){for(let e in this._gpuText)this._destroyRenderableById(e);this._gpuText=null,this._renderer=null}}u.extension={type:[s.nw.WebGLPipes,s.nw.WebGPUPipes,s.nw.CanvasPipes],name:"htmlText"};var d=r(4704),h=r(4147),c=r(1791),p=r(5788),f=r(1776);let g="http://www.w3.org/2000/svg",m="http://www.w3.org/1999/xhtml";class x{constructor(){this.svgRoot=document.createElementNS(g,"svg"),this.foreignObject=document.createElementNS(g,"foreignObject"),this.domElement=document.createElementNS(m,"div"),this.styleElement=document.createElementNS(m,"style"),this.image=new Image;let{foreignObject:e,svgRoot:t,styleElement:r,domElement:i}=this;e.setAttribute("width","10000"),e.setAttribute("height","10000"),e.style.overflow="hidden",t.appendChild(e),e.appendChild(r),e.appendChild(i)}}var _=r(8285),b=r(1792),y=r(6910);function T(e){let t=y.I.shared.setValue(e.color).setAlpha(e.alpha).toHexa(),r=Math.round(Math.cos(e.angle)*e.distance),i=Math.round(Math.sin(e.angle)*e.distance),s=`${r}px ${i}px`;return e.blur>0?`text-shadow: ${s} ${e.blur}px ${t}`:`text-shadow: ${s} ${t}`}function v(e){return`-webkit-text-stroke-width: ${e.width}px;-webkit-text-stroke-color: ${y.I.shared.setValue(e.color).toHex()};text-stroke-width: ${e.width}px;text-stroke-color: ${y.I.shared.setValue(e.color).toHex()};paint-order: stroke`}let w={fontSize:"font-size: {{VALUE}}px",fontFamily:"font-family: {{VALUE}}",fontWeight:"font-weight: {{VALUE}}",fontStyle:"font-style: {{VALUE}}",fontVariant:"font-variant: {{VALUE}}",letterSpacing:"letter-spacing: {{VALUE}}px",align:"text-align: {{VALUE}}",padding:"padding: {{VALUE}}px",whiteSpace:"white-space: {{VALUE}}",lineHeight:"line-height: {{VALUE}}px",wordWrapWidth:"max-width: {{VALUE}}px"},S={fill:e=>`color: ${y.I.shared.setValue(e).toHex()}`,breakWords:e=>`word-wrap: ${e?"break-all":"break-word"}`,stroke:v,dropShadow:T};class C extends _.p{constructor(e={}){super(e),this._cssOverrides=[],this.cssOverrides??(this.cssOverrides=e.cssOverrides),this.tagStyles=e.tagStyles??{}}set cssOverrides(e){this._cssOverrides=e instanceof Array?e:[e],this.update()}get cssOverrides(){return this._cssOverrides}_generateKey(){return this._styleKey=(0,b.L)(this)+this._cssOverrides.join("-"),this._styleKey}update(){this._cssStyle=null,super.update()}clone(){return new C({align:this.align,breakWords:this.breakWords,dropShadow:this.dropShadow?{...this.dropShadow}:null,fill:this._fill,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth,cssOverrides:this.cssOverrides})}get cssStyle(){return this._cssStyle||(this._cssStyle=function(e){let t=e._stroke,r=e._fill,i=[`color: ${y.I.shared.setValue(r.color).toHex()}`,`font-size: ${e.fontSize}px`,`font-family: ${e.fontFamily}`,`font-weight: ${e.fontWeight}`,`font-style: ${e.fontStyle}`,`font-variant: ${e.fontVariant}`,`letter-spacing: ${e.letterSpacing}px`,`text-align: ${e.align}`,`padding: ${e.padding}px`,`white-space: ${"pre"===e.whiteSpace&&e.wordWrap?"pre-wrap":e.whiteSpace}`,...e.lineHeight?[`line-height: ${e.lineHeight}px`]:[],...e.wordWrap?[`word-wrap: ${e.breakWords?"break-all":"break-word"}`,`max-width: ${e.wordWrapWidth}px`]:[],...t?[v(t)]:[],...e.dropShadow?[T(e.dropShadow)]:[],...e.cssOverrides].join(";"),s=[`div { ${i} }`];return function(e,t){for(let r in e){let i=e[r],s=[];for(let e in i)S[e]?s.push(S[e](i[e])):w[e]&&s.push(w[e].replace("{{VALUE}}",i[e]));t.push(`${r} { ${s.join(";")} }`)}}(e.tagStyles,s),s.join(" ")}(this)),this._cssStyle}addOverride(...e){let t=e.filter(e=>!this.cssOverrides.includes(e));t.length>0&&(this.cssOverrides.push(...t),this.update())}removeOverride(...e){let t=e.filter(e=>this.cssOverrides.includes(e));t.length>0&&(this.cssOverrides=this.cssOverrides.filter(e=>!t.includes(e)),this.update())}set fill(e){"string"!=typeof e&&"number"!=typeof e&&(0,p.Z)("[HTMLTextStyle] only color fill is not supported by HTMLText"),super.fill=e}set stroke(e){e&&"string"!=typeof e&&"number"!=typeof e&&(0,p.Z)("[HTMLTextStyle] only color stroke is not supported by HTMLText"),super.stroke=e}}var R=r(6075);async function M(e){let t=await c.z.get().fetch(e),r=await t.blob(),i=new FileReader;return await new Promise((e,t)=>
193{i.onloadend=()=>e(i.result),i.onerror=t,i.readAsDataURL(r)})}async function B(e,t){let r=await M(t);return`@font-face {
194        font-family: "${e.fontFamily}";
195        src: url('${r}');
196        font-weight: ${e.fontWeight};
197        font-style: ${e.fontStyle};
198    }`}let U=new Map;async function P(e,t,r){let i=e.filter(e=>R.C.has(`${e}-and-url`)).map((e,i)=>{if(!U.has(e)){let{url:s}=R.C.get(`${e}-and-url`);0===i?U.set(e,B({fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:e},s)):U.set(e,B({fontWeight:r.fontWeight,fontStyle:r.fontStyle,fontFamily:e},s))}return U.get(e)});return(await Promise.all(i)).join("\n")}var k=r(5485),F=r(4555);class A{constructor(e){this._activeTextures={},this._renderer=e,this._createCanvas=e.type===h.g.WEBGPU}getTexture(e){return this._buildTexturePromise(e.text,e.resolution,e.style)}getManagedTexture(e,t,r,i){if(this._activeTextures[i])return this._increaseReferenceCount(i),this._activeTextures[i].promise;let s=this._buildTexturePromise(e,t,r).then(e=>(this._activeTextures[i].texture=e,e));return this._activeTextures[i]={texture:null,promise:s,usageCount:1},s}async _buildTexturePromise(e,t,r){var s;let a=o.u.get(x),n=function(e,t){let r=t.fontFamily,i=[],s={},a=e.match(/font-family:([^;"\s]+)/g);function n(e){s[e]||(i.push(e),s[e]=!0)}if(Array.isArray(r))for(let e=0;e<r.length;e++)n(r[e]);else n(r);for(let e in a&&a.forEach(e=>{n(e.split(":")[1].trim())}),t.tagStyles)n(t.tagStyles[e].fontFamily);return i}(e,r),l=await P(n,r,C.defaultTextStyle),u=function(e,t,r,s){let{domElement:a,styleElement:n,svgRoot:o}=s=s||i||(i=new x);a.innerHTML=`<style>${t.cssStyle};</style><div style='padding:0'>${e}</div>`,a.setAttribute("style","transform-origin: top left; display: inline-block"),r&&(n.textContent=r),document.body.appendChild(o);let l=a.getBoundingClientRect();o.remove();let u=F.c.measureFont(t.fontStyle).descent,d=2*t.padding;return{width:l.width-d,height:l.height+u-d}}(e,r,l,a),d=Math.ceil(Math.ceil(Math.max(1,u.width)+2*r.padding)*t),h=Math.ceil(Math.ceil(Math.max(1,u.height)+2*r.padding)*t),p=a.image;p.width=(0|d)+2,p.height=(0|h)+2;let g=function(e,t,r,i,s){let{domElement:a,styleElement:n,svgRoot:o}=s;a.innerHTML=`<style>${t.cssStyle}</style><div style='padding:0;'>${e}</div>`,a.setAttribute("style",`transform: scale(${r});transform-origin: top left; display: inline-block`),n.textContent=i;let{width:l,height:u}=s.image;return o.setAttribute("width",l.toString()),o.setAttribute("height",u.toString()),new XMLSerializer().serializeToString(o)}(e,r,t,l,a);await (s=function(){let{userAgent:e}=c.z.get().getNavigator();return/^((?!chrome|android).)*safari/i.test(e)}()&&n.length>0,new Promise(async e=>{s&&await new Promise(e=>setTimeout(e,100)),p.onload=()=>{e()},p.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(g)}`,p.crossOrigin="anonymous"}));let m=p;this._createCanvas&&(m=function(e,t){let r=k.h.getOptimalCanvasAndContext(e.width,e.height,t),{context:i}=r;return i.clearRect(0,0,e.width,e.height),i.drawImage(e,0,0),k.h.returnCanvasAndContext(r),r.canvas}(p,t));let _=(0,f.H)(m,p.width-2,p.height-2,t);return this._createCanvas&&this._renderer.texture.initSource(_.source),o.u.return(a),_}_increaseReferenceCount(e){this._activeTextures[e].usageCount++}decreaseReferenceCount(e){let t=this._activeTextures[e];t&&(t.usageCount--,0===t.usageCount&&(t.texture?this._cleanUp(t):t.promise.then(e=>{t.texture=e,this._cleanUp(t)}).catch(()=>{(0,p.Z)("HTMLTextSystem: Failed to clean texture")}),this._activeTextures[e]=null))}_cleanUp(e){d.z.returnTexture(e.texture),e.texture.source.resource=null,e.texture.source.uploadMethodId="unknown"}getReferenceCount(e){return this._activeTextures[e].usageCount}destroy(){this._activeTextures=null}}A.extension={type:[s.nw.WebGLSystem,s.nw.WebGPUSystem,s.nw.CanvasSystem],name:"htmlText"},A.defaultFontOptions={fontFamily:"Arial",fontStyle:"normal",fontWeight:"normal"},s.Rw.add(A),s.Rw.add(u)},2541:function(e,t,r){var i=r(7),s=r(2659),a=r(7852),n=r(999);class o{constructor(e){this._gpuText=Object.create(null),this._destroyRenderableBound=this.destroyRenderable.bind(this),this._renderer=e,this._renderer.runners.resolutionChange.add(this)}resolutionChange(){for(let e in this._gpuText){let t=this._gpuText[e];if(!t)continue;let r=t.batchableSprite.renderable;r._autoResolution&&(r._resolution=this._renderer.resolution,r.onViewUpdate())}}validateRenderable(e){let t=this._getGpuText(e),r=e._getKey();if(t.currentKey!==r){let{width:r,height:i}=this._renderer.canvasText.getTextureSize(e.text,e.resolution,e._style);return 1!==this._renderer.canvasText.getReferenceCount(t.currentKey)||r!==t.texture._source.width||i!==t.texture._source.height}return!1}
198addRenderable(e,t){let r=this._getGpuText(e).batchableSprite;e._didTextUpdate&&this._updateText(e),this._renderer.renderPipes.batch.addToBatch(r,t)}updateRenderable(e){let t=this._getGpuText(e).batchableSprite;e._didTextUpdate&&this._updateText(e),t._batcher.updateElement(t)}destroyRenderable(e){e.off("destroyed",this._destroyRenderableBound),this._destroyRenderableById(e.uid)}_destroyRenderableById(e){let t=this._gpuText[e];this._renderer.canvasText.decreaseReferenceCount(t.currentKey),a.u.return(t.batchableSprite),this._gpuText[e]=null}_updateText(e){let t=e._getKey(),r=this._getGpuText(e),i=r.batchableSprite;r.currentKey!==t&&this._updateGpuText(e),e._didTextUpdate=!1;let a=e._style.padding;(0,s.w)(i.bounds,e._anchor,i.texture,a)}_updateGpuText(e){let t=this._getGpuText(e),r=t.batchableSprite;t.texture&&this._renderer.canvasText.decreaseReferenceCount(t.currentKey),t.texture=r.texture=this._renderer.canvasText.getManagedTexture(e),t.currentKey=e._getKey(),r.texture=t.texture}_getGpuText(e){return this._gpuText[e.uid]||this.initGpuText(e)}initGpuText(e){let t={texture:null,currentKey:"--",batchableSprite:a.u.get(n.c)};return t.batchableSprite.renderable=e,t.batchableSprite.transform=e.groupTransform,t.batchableSprite.bounds={minX:0,maxX:1,minY:0,maxY:0},t.batchableSprite.roundPixels=this._renderer._roundPixels|e._roundPixels,this._gpuText[e.uid]=t,e._resolution=e._autoResolution?this._renderer.resolution:e.resolution,this._updateText(e),e.on("destroyed",this._destroyRenderableBound),t}destroy(){for(let e in this._gpuText)this._destroyRenderableById(e);this._gpuText=null,this._renderer=null}}o.extension={type:[i.nw.WebGLPipes,i.nw.WebGPUPipes,i.nw.CanvasPipes],name:"text"};var l=r(6910),u=r(5770),d=r(5485),h=r(4704),c=r(9619);function p(e,t,r){for(let i=0,s=4*r*t;i<t;++i,s+=4)if(0!==e[s+3])return!1;return!0}function f(e,t,r,i,s){let a=4*t;for(let t=i,n=i*a+4*r;t<=s;++t,n+=a)if(0!==e[n+3])return!1;return!0}var g=r(5122),m=r(8285),x=r(1776),_=r(4555),b=r(1195),y=r(8701);class T{constructor(e){this._activeTextures={},this._renderer=e}getTextureSize(e,t,r){let i=_.c.measureText(e||" ",r),s=Math.ceil(Math.ceil(Math.max(1,i.width)+2*r.padding)*t),a=Math.ceil(Math.ceil(Math.max(1,i.height)+2*r.padding)*t);return s=Math.ceil(s-1e-6),a=Math.ceil(a-1e-6),{width:s=(0,u.a9)(s),height:a=(0,u.a9)(a)}}getTexture(e,t,r,i){"string"==typeof e&&((0,g.a1)("8.0.0","CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),e={text:e,style:r,resolution:t}),e.style instanceof m.p||(e.style=new m.p(e.style));let{texture:s,canvasAndContext:a}=this.createTextureAndCanvas(e);return this._renderer.texture.initSource(s._source),d.h.returnCanvasAndContext(a),s}createTextureAndCanvas(e){let{text:t,style:r}=e,i=e.resolution??this._renderer.resolution,s=_.c.measureText(t||" ",r),a=Math.ceil(Math.ceil(Math.max(1,s.width)+2*r.padding)*i),n=Math.ceil(Math.ceil(Math.max(1,s.height)+2*r.padding)*i),o=d.h.getOptimalCanvasAndContext(a,n),{canvas:l}=o;this.renderTextToCanvas(t,r,i,o);let u=(0,x.H)(l,a,n,i);if(r.trim){let e=function(e,t=1){let{width:r,height:i}=e,s=e.getContext("2d",{willReadFrequently:!0});if(null===s)throw TypeError("Failed to get canvas 2D context");let a=s.getImageData(0,0,r,i).data,n=0,o=0,l=r-1,u=i-1;for(;o<i&&p(a,r,o);)++o;if(o===i)return c.A.EMPTY;for(;p(a,r,u);)--u;for(;f(a,r,n,o,u);)++n;for(;f(a,r,l,o,u);)--l;return++l,++u,new c.A(n/t,o/t,(l-n)/t,(u-o)/t)}(l,i);u.frame.copyFrom(e),u.updateUvs()}return{texture:u,canvasAndContext:o}}getManagedTexture(e){e._resolution=e._autoResolution?this._renderer.resolution:e.resolution;let t=e._getKey();if(this._activeTextures[t])return this._increaseReferenceCount(t),this._activeTextures[t].texture;let{texture:r,canvasAndContext:i}=this.createTextureAndCanvas(e);return this._activeTextures[t]={canvasAndContext:i,texture:r,usageCount:1},r}_increaseReferenceCount(e){this._activeTextures[e].usageCount++}decreaseReferenceCount(e){let t=this._activeTextures[e];if(t.usageCount--,0===t.usageCount){d.h.returnCanvasAndContext(t.canvasAndContext),h.z.returnTexture(t.texture);let r=t.texture.source;r.resource=null,r.uploadMethodId="unknown",r.alphaMode="no-premultiply-alpha",this._activeTextures[e]=null}}getReferenceCount(e){return this._activeTextures[e].usageCount}renderTextToCanvas(e,t,r,i){let s,a;let{canvas:n,context:o}=i,u=(0,b.M)(t),d=_.c.measureText(e||" ",t),h=d.lines,c=d.lineHeight,p=d.lineWidths,f=d.maxLineWidth,g=d.fontProperties,m=n.height;o.resetTransform(),o.scale(r,r);let x=2*t.padding;if(o.clearRect(0,0,d.width+4+x,d.height+4+x),t._stroke?.width){let e=t._stroke;o.lineWidth=e.width,o.miterLimit=e.miterLimit,o.lineJoin=e.join,o.lineCap=e.cap}o.font=u;let T=t.dropShadow?2:1;for(let e=0;e<T;++e){let n=t.dropShadow&&0===e,u=n?Math.ceil(Math.max(1,m)+2*t.padding):0,d=u*r;if(n){o.fillStyle="black",o.strokeStyle="black";let e=t.dropShadow,i=e.color,s=e.alpha;o.shadowColor=l.I.shared.setValue(i).setAlpha(s).toRgbaString();let a=e.blur*r,n=e.distance*r;o.shadowBlur=a,o.shadowOffsetX=Math.cos(e.angle)*n,o.shadowOffsetY=Math.sin(e.angle)*n+d}else o.globalAlpha=t._fill?.alpha??1,o.fillStyle=t._fill?(0,y.m)(t._fill,o):null,t._stroke?.width&&(o.strokeStyle=(0,y.m)(t._stroke,o)),o.shadowColor="black";let x=(c-g.fontSize)/2;c-g.fontSize<0&&(x=0);let _=t._stroke?.width??0;for(let e=0;e<h.length;e++)s=_/2,a=_/2+e*c+g.ascent+x,"right"===t.align?s+=f-p[e]:"center"===t.align&&(s+=(f-p[e])/2),t._stroke?.width&&this._drawLetterSpacing(h[e],t,i,s+t.padding,a+t.padding-u,!0),void 0!==t._fill&&this._drawLetterSpacing(h[e],t,i,s+t.padding,a+t.padding-u)}}_drawLetterSpacing(e,t,r,i,s,a=!1){let{context:n}=r,o=t.letterSpacing,l=!1;if(_.c.experimentalLetterSpacingSupported&&(_.c.experimentalLetterSpacing?(n.letterSpacing=`${o}px`,n.textLetterSpacing=`${o}px`,l=!0):(n.letterSpacing="0px",n.textLetterSpacing="0px")),0===o||l){a?n.strokeText(e,i,s):n.fillText(e,i,s);return}let u=i,d=_.c.graphemeSegmenter(e),h=n.measureText(e).width,c=0;for(let e=0;e<d.length;++e){let t=d[e];a?n.strokeText(t,u,s):n.fillText(t,u,s);let r="";for(let t=e+1;t<d.length;++t)r+=d[t];u+=h-(c=n.measureText(r).width)+o,h=c}}destroy(){this._activeTextures=null}}T.extension={type:[i.nw.WebGLSystem,i.nw.WebGPUSystem,i.nw.CanvasSystem],name:"canvasText"},i.Rw.add(T),i.Rw.add(o)},1776:function(e,t,r){r.d(t,{H:function(){return a}});var i=r(4704);let s=new(r(8721)).Y;function a(e,t,r,a){s.minX=0,s.minY=0,s.maxX=e.width/a|0,s.maxY=e.height/a|0;let n=i.z.getOptimalTexture(s.width,s.height,a,!1);return n.source.uploadMethodId="image",n.source.resource=e,n.source.alphaMode="premultiply-alpha-on-upload",n.frame.width=t/a,n.frame.height=r/a,n.source.emit("update",n.source),n.updateUvs(),n}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.