UNPKG

@drincs/pixi-vn

Version:

Pixi'VN is a npm package that provides various features for creating visual novels.

6 lines 399 kB
'use strict';var mx=Object.create;var zs=Object.defineProperty;var gx=Object.getOwnPropertyDescriptor;var xx=Object.getOwnPropertyNames;var _x=Object.getPrototypeOf,yx=Object.prototype.hasOwnProperty;var Il=i=>{throw TypeError(i)};var bx=(i,t,e)=>t in i?zs(i,t,{enumerable:true,configurable:true,writable:true,value:e}):i[t]=e;var p=(i,t)=>()=>(i&&(t=i(i=0)),t);var Dl=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),vx=(i,t)=>{for(var e in t)zs(i,e,{get:t[e],enumerable:true});},Sx=(i,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of xx(t))!yx.call(i,s)&&s!==e&&zs(i,s,{get:()=>t[s],enumerable:!(r=gx(t,s))||r.enumerable});return i};var Ll=(i,t,e)=>(e=i!=null?mx(_x(i)):{},Sx(zs(e,"default",{value:i,enumerable:true}),i));var G=(i,t,e)=>bx(i,typeof t!="symbol"?t+"":t,e),Dn=(i,t,e)=>t.has(i)||Il("Cannot "+e);var g=(i,t,e)=>(Dn(i,t,"read from private field"),e?e.call(i):t.get(i)),K=(i,t,e)=>t.has(i)?Il("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),O=(i,t,e,r)=>(Dn(i,t,"write to private field"),t.set(i,e),e),k=(i,t,e)=>(Dn(i,t,"access private method"),e);var Ws=(i,t,e,r)=>({set _(s){O(i,t,s);},get _(){return g(i,t,r)}});var w,Ln,Fi,z,D=p(()=>{w=(i=>(i.Application="application",i.WebGLPipes="webgl-pipes",i.WebGLPipesAdaptor="webgl-pipes-adaptor",i.WebGLSystem="webgl-system",i.WebGPUPipes="webgpu-pipes",i.WebGPUPipesAdaptor="webgpu-pipes-adaptor",i.WebGPUSystem="webgpu-system",i.CanvasSystem="canvas-system",i.CanvasPipesAdaptor="canvas-pipes-adaptor",i.CanvasPipes="canvas-pipes",i.Asset="asset",i.LoadParser="load-parser",i.ResolveParser="resolve-parser",i.CacheParser="cache-parser",i.DetectionParser="detection-parser",i.MaskEffect="mask-effect",i.BlendMode="blend-mode",i.TextureSource="texture-source",i.Environment="environment",i.ShapeBuilder="shape-builder",i.Batcher="batcher",i))(w||{}),Ln=i=>{if(typeof i=="function"||typeof i=="object"&&i.extension){if(!i.extension)throw new Error("Extension class must have an extension object");i={...typeof i.extension!="object"?{type:i.extension}:i.extension,ref:i};}if(typeof i=="object")i={...i};else throw new Error("Invalid extension type");return typeof i.type=="string"&&(i.type=[i.type]),i},Fi=(i,t)=>Ln(i).priority??t,z={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...i){return i.map(Ln).forEach(t=>{t.type.forEach(e=>this._removeHandlers[e]?.(t));}),this},add(...i){return i.map(Ln).forEach(t=>{t.type.forEach(e=>{let r=this._addHandlers,s=this._queue;r[e]?r[e]?.(t):(s[e]=s[e]||[],s[e]?.push(t));});}),this},handle(i,t,e){let r=this._addHandlers,s=this._removeHandlers;if(r[i]||s[i])throw new Error(`Extension type ${i} already has a handler`);r[i]=t,s[i]=e;let o=this._queue;return o[i]&&(o[i]?.forEach(n=>t(n)),delete o[i]),this},handleByMap(i,t){return this.handle(i,e=>{e.name&&(t[e.name]=e.ref);},e=>{e.name&&delete t[e.name];})},handleByNamedList(i,t,e=-1){return this.handle(i,r=>{t.findIndex(o=>o.name===r.name)>=0||(t.push({name:r.name,value:r.ref}),t.sort((o,n)=>Fi(n.value,e)-Fi(o.value,e)));},r=>{let s=t.findIndex(o=>o.name===r.name);s!==-1&&t.splice(s,1);})},handleByList(i,t,e=-1){return this.handle(i,r=>{t.includes(r.ref)||(t.push(r.ref),t.sort((s,o)=>Fi(o,e)-Fi(s,e)));},r=>{let s=t.indexOf(r.ref);s!==-1&&t.splice(s,1);})},mixin(i,...t){for(let e of t)Object.defineProperties(i.prototype,Object.getOwnPropertyDescriptors(e));}};});var Wl=Dl((Eb,Un)=>{var Tx=Object.prototype.hasOwnProperty,Lt="~";function Bi(){}Object.create&&(Bi.prototype=Object.create(null),new Bi().__proto__||(Lt=false));function wx(i,t,e){this.fn=i,this.context=t,this.once=e||false;}function zl(i,t,e,r,s){if(typeof e!="function")throw new TypeError("The listener must be a function");var o=new wx(e,r||i,s),n=Lt?Lt+t:t;return i._events[n]?i._events[n].fn?i._events[n]=[i._events[n],o]:i._events[n].push(o):(i._events[n]=o,i._eventsCount++),i}function js(i,t){--i._eventsCount===0?i._events=new Bi:delete i._events[t];}function Gt(){this._events=new Bi,this._eventsCount=0;}Gt.prototype.eventNames=function(){var t=[],e,r;if(this._eventsCount===0)return t;for(r in e=this._events)Tx.call(e,r)&&t.push(Lt?r.slice(1):r);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t};Gt.prototype.listeners=function(t){var e=Lt?Lt+t:t,r=this._events[e];if(!r)return [];if(r.fn)return [r.fn];for(var s=0,o=r.length,n=new Array(o);s<o;s++)n[s]=r[s].fn;return n};Gt.prototype.listenerCount=function(t){var e=Lt?Lt+t:t,r=this._events[e];return r?r.fn?1:r.length:0};Gt.prototype.emit=function(t,e,r,s,o,n){var a=Lt?Lt+t:t;if(!this._events[a])return false;var h=this._events[a],l=arguments.length,c,u;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,true),l){case 1:return h.fn.call(h.context),true;case 2:return h.fn.call(h.context,e),true;case 3:return h.fn.call(h.context,e,r),true;case 4:return h.fn.call(h.context,e,r,s),true;case 5:return h.fn.call(h.context,e,r,s,o),true;case 6:return h.fn.call(h.context,e,r,s,o,n),true}for(u=1,c=new Array(l-1);u<l;u++)c[u-1]=arguments[u];h.fn.apply(h.context,c);}else {var f=h.length,d;for(u=0;u<f;u++)switch(h[u].once&&this.removeListener(t,h[u].fn,void 0,true),l){case 1:h[u].fn.call(h[u].context);break;case 2:h[u].fn.call(h[u].context,e);break;case 3:h[u].fn.call(h[u].context,e,r);break;case 4:h[u].fn.call(h[u].context,e,r,s);break;default:if(!c)for(d=1,c=new Array(l-1);d<l;d++)c[d-1]=arguments[d];h[u].fn.apply(h[u].context,c);}}return true};Gt.prototype.on=function(t,e,r){return zl(this,t,e,r,false)};Gt.prototype.once=function(t,e,r){return zl(this,t,e,r,true)};Gt.prototype.removeListener=function(t,e,r,s){var o=Lt?Lt+t:t;if(!this._events[o])return this;if(!e)return js(this,o),this;var n=this._events[o];if(n.fn)n.fn===e&&(!s||n.once)&&(!r||n.context===r)&&js(this,o);else {for(var a=0,h=[],l=n.length;a<l;a++)(n[a].fn!==e||s&&!n[a].once||r&&n[a].context!==r)&&h.push(n[a]);h.length?this._events[o]=h.length===1?h[0]:h:js(this,o);}return this};Gt.prototype.removeAllListeners=function(t){var e;return t?(e=Lt?Lt+t:t,this._events[e]&&js(this,e)):(this._events=new Bi,this._eventsCount=0),this};Gt.prototype.off=Gt.prototype.removeListener;Gt.prototype.addListener=Gt.prototype.on;Gt.prefixed=Lt;Gt.EventEmitter=Gt;typeof Un<"u"&&(Un.exports=Gt);});var Vl,q,Nt=p(()=>{Vl=Ll(Wl()),q=Vl.default;});var Px,ke,Mt,se,ql,Nl,On,Mx,Ks,Zl,Ql,Hl,Yl,Xl,ki,Cx,Ax,Ex,Fx,Vn,$l,Bx,zn,Wn,jl,Nn,ae,Kl,Jl,tc=p(()=>{Px={grad:.9,turn:360,rad:360/(2*Math.PI)},ke=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},Mt=function(i,t,e){return t===void 0&&(t=0),e===void 0&&(e=Math.pow(10,t)),Math.round(e*i)/e+0},se=function(i,t,e){return t===void 0&&(t=0),e===void 0&&(e=1),i>e?e:i>t?i:t},ql=function(i){return (i=isFinite(i)?i%360:0)>0?i:i+360},Nl=function(i){return {r:se(i.r,0,255),g:se(i.g,0,255),b:se(i.b,0,255),a:se(i.a)}},On=function(i){return {r:Mt(i.r),g:Mt(i.g),b:Mt(i.b),a:Mt(i.a,3)}},Mx=/^#([0-9a-f]{3,8})$/i,Ks=function(i){var t=i.toString(16);return t.length<2?"0"+t:t},Zl=function(i){var t=i.r,e=i.g,r=i.b,s=i.a,o=Math.max(t,e,r),n=o-Math.min(t,e,r),a=n?o===t?(e-r)/n:o===e?2+(r-t)/n:4+(t-e)/n:0;return {h:60*(a<0?a+6:a),s:o?n/o*100:0,v:o/255*100,a:s}},Ql=function(i){var t=i.h,e=i.s,r=i.v,s=i.a;t=t/360*6,e/=100,r/=100;var o=Math.floor(t),n=r*(1-e),a=r*(1-(t-o)*e),h=r*(1-(1-t+o)*e),l=o%6;return {r:255*[r,a,n,n,h,r][l],g:255*[h,r,r,a,n,n][l],b:255*[n,n,h,r,r,a][l],a:s}},Hl=function(i){return {h:ql(i.h),s:se(i.s,0,100),l:se(i.l,0,100),a:se(i.a)}},Yl=function(i){return {h:Mt(i.h),s:Mt(i.s),l:Mt(i.l),a:Mt(i.a,3)}},Xl=function(i){return Ql((e=(t=i).s,{h:t.h,s:(e*=((r=t.l)<50?r:100-r)/100)>0?2*e/(r+e)*100:0,v:r+e,a:t.a}));var t,e,r;},ki=function(i){return {h:(t=Zl(i)).h,s:(s=(200-(e=t.s))*(r=t.v)/100)>0&&s<200?e*r/100/(s<=100?s:200-s)*100:0,l:s/2,a:t.a};var t,e,r,s;},Cx=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ax=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Ex=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Fx=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Vn={string:[[function(i){var t=Mx.exec(i);return t?(i=t[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?Mt(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?Mt(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var t=Ex.exec(i)||Fx.exec(i);return t?t[2]!==t[4]||t[4]!==t[6]?null:Nl({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(i){var t=Cx.exec(i)||Ax.exec(i);if(!t)return null;var e,r,s=Hl({h:(e=t[1],r=t[2],r===void 0&&(r="deg"),Number(e)*(Px[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Xl(s)},"hsl"]],object:[[function(i){var t=i.r,e=i.g,r=i.b,s=i.a,o=s===void 0?1:s;return ke(t)&&ke(e)&&ke(r)?Nl({r:Number(t),g:Number(e),b:Number(r),a:Number(o)}):null},"rgb"],[function(i){var t=i.h,e=i.s,r=i.l,s=i.a,o=s===void 0?1:s;if(!ke(t)||!ke(e)||!ke(r))return null;var n=Hl({h:Number(t),s:Number(e),l:Number(r),a:Number(o)});return Xl(n)},"hsl"],[function(i){var t=i.h,e=i.s,r=i.v,s=i.a,o=s===void 0?1:s;if(!ke(t)||!ke(e)||!ke(r))return null;var n=(function(a){return {h:ql(a.h),s:se(a.s,0,100),v:se(a.v,0,100),a:se(a.a)}})({h:Number(t),s:Number(e),v:Number(r),a:Number(o)});return Ql(n)},"hsv"]]},$l=function(i,t){for(var e=0;e<t.length;e++){var r=t[e][0](i);if(r)return [r,t[e][1]]}return [null,void 0]},Bx=function(i){return typeof i=="string"?$l(i.trim(),Vn.string):typeof i=="object"&&i!==null?$l(i,Vn.object):[null,void 0]},zn=function(i,t){var e=ki(i);return {h:e.h,s:se(e.s+100*t,0,100),l:e.l,a:e.a}},Wn=function(i){return (299*i.r+587*i.g+114*i.b)/1e3/255},jl=function(i,t){var e=ki(i);return {h:e.h,s:e.s,l:se(e.l+100*t,0,100),a:e.a}},Nn=(function(){function i(t){this.parsed=Bx(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1};}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return Mt(Wn(this.rgba),2)},i.prototype.isDark=function(){return Wn(this.rgba)<.5},i.prototype.isLight=function(){return Wn(this.rgba)>=.5},i.prototype.toHex=function(){return t=On(this.rgba),e=t.r,r=t.g,s=t.b,n=(o=t.a)<1?Ks(Mt(255*o)):"","#"+Ks(e)+Ks(r)+Ks(s)+n;var t,e,r,s,o,n;},i.prototype.toRgb=function(){return On(this.rgba)},i.prototype.toRgbString=function(){return t=On(this.rgba),e=t.r,r=t.g,s=t.b,(o=t.a)<1?"rgba("+e+", "+r+", "+s+", "+o+")":"rgb("+e+", "+r+", "+s+")";var t,e,r,s,o;},i.prototype.toHsl=function(){return Yl(ki(this.rgba))},i.prototype.toHslString=function(){return t=Yl(ki(this.rgba)),e=t.h,r=t.s,s=t.l,(o=t.a)<1?"hsla("+e+", "+r+"%, "+s+"%, "+o+")":"hsl("+e+", "+r+"%, "+s+"%)";var t,e,r,s,o;},i.prototype.toHsv=function(){return t=Zl(this.rgba),{h:Mt(t.h),s:Mt(t.s),v:Mt(t.v),a:Mt(t.a,3)};var t;},i.prototype.invert=function(){return ae({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t;},i.prototype.saturate=function(t){return t===void 0&&(t=.1),ae(zn(this.rgba,t))},i.prototype.desaturate=function(t){return t===void 0&&(t=.1),ae(zn(this.rgba,-t))},i.prototype.grayscale=function(){return ae(zn(this.rgba,-1))},i.prototype.lighten=function(t){return t===void 0&&(t=.1),ae(jl(this.rgba,t))},i.prototype.darken=function(t){return t===void 0&&(t=.1),ae(jl(this.rgba,-t))},i.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},i.prototype.alpha=function(t){return typeof t=="number"?ae({r:(e=this.rgba).r,g:e.g,b:e.b,a:t}):Mt(this.rgba.a,3);var e;},i.prototype.hue=function(t){var e=ki(this.rgba);return typeof t=="number"?ae({h:t,s:e.s,l:e.l,a:e.a}):Mt(e.h)},i.prototype.isEqual=function(t){return this.toHex()===ae(t).toHex()},i})(),ae=function(i){return i instanceof Nn?i:new Nn(i)},Kl=[],Jl=function(i){i.forEach(function(t){Kl.indexOf(t)<0&&(t(Nn,Vn),Kl.push(t));});};});function ec(i,t){var e={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var s in e)r[e[s]]=s;var o={};i.prototype.toName=function(n){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return "transparent";var a,h,l=r[this.toHex()];if(l)return l;if(n?.closest){var c=this.toRgb(),u=1/0,f="black";if(!o.length)for(var d in e)o[d]=new i(e[d]).toRgb();for(var x in e){var y=(a=c,h=o[x],Math.pow(a.r-h.r,2)+Math.pow(a.g-h.g,2)+Math.pow(a.b-h.b,2));y<u&&(u=y,f=x);}return f}},t.string.push([function(n){var a=n.toLowerCase(),h=a==="transparent"?"#0000":e[a];return h?new i(h).toRgb():null},"name"]);}var rc=p(()=>{});var Gr,it,jt=p(()=>{tc();rc();Jl([ec]);Gr=class Gi{constructor(t=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=t;}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(t){return this.value=t,this}set value(t){if(t instanceof Gi)this._value=this._cloneSource(t._value),this._int=t._int,this._components.set(t._components);else {if(t===null)throw new Error("Cannot set Color#value to null");(this._value===null||!this._isSourceEqual(this._value,t))&&(this._value=this._cloneSource(t),this._normalize(this._value));}}get value(){return this._value}_cloneSource(t){return typeof t=="string"||typeof t=="number"||t instanceof Number||t===null?t:Array.isArray(t)||ArrayBuffer.isView(t)?t.slice(0):typeof t=="object"&&t!==null?{...t}:t}_isSourceEqual(t,e){let r=typeof t;if(r!==typeof e)return false;if(r==="number"||r==="string"||t instanceof Number)return t===e;if(Array.isArray(t)&&Array.isArray(e)||ArrayBuffer.isView(t)&&ArrayBuffer.isView(e))return t.length!==e.length?false:t.every((o,n)=>o===e[n]);if(t!==null&&e!==null){let o=Object.keys(t),n=Object.keys(e);return o.length!==n.length?false:o.every(a=>t[a]===e[a])}return t===e}toRgba(){let[t,e,r,s]=this._components;return {r:t,g:e,b:r,a:s}}toRgb(){let[t,e,r]=this._components;return {r:t,g:e,b:r}}toRgbaString(){let[t,e,r]=this.toUint8RgbArray();return `rgba(${t},${e},${r},${this.alpha})`}toUint8RgbArray(t){let[e,r,s]=this._components;return this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb),t[0]=Math.round(e*255),t[1]=Math.round(r*255),t[2]=Math.round(s*255),t}toArray(t){this._arrayRgba||(this._arrayRgba=[]),t||(t=this._arrayRgba);let[e,r,s,o]=this._components;return t[0]=e,t[1]=r,t[2]=s,t[3]=o,t}toRgbArray(t){this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb);let[e,r,s]=this._components;return t[0]=e,t[1]=r,t[2]=s,t}toNumber(){return this._int}toBgrNumber(){let[t,e,r]=this.toUint8RgbArray();return (r<<16)+(e<<8)+t}toLittleEndianNumber(){let t=this._int;return (t>>16)+(t&65280)+((t&255)<<16)}multiply(t){let[e,r,s,o]=Gi._temp.setValue(t)._components;return this._components[0]*=e,this._components[1]*=r,this._components[2]*=s,this._components[3]*=o,this._refreshInt(),this._value=null,this}premultiply(t,e=true){return e&&(this._components[0]*=t,this._components[1]*=t,this._components[2]*=t),this._components[3]=t,this._refreshInt(),this._value=null,this}toPremultiplied(t,e=true){if(t===1)return (255<<24)+this._int;if(t===0)return e?0:this._int;let r=this._int>>16&255,s=this._int>>8&255,o=this._int&255;return e&&(r=r*t+.5|0,s=s*t+.5|0,o=o*t+.5|0),(t*255<<24)+(r<<16)+(s<<8)+o}toHex(){let t=this._int.toString(16);return `#${"000000".substring(0,6-t.length)+t}`}toHexa(){let e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(t){return this._components[3]=this._clamp(t),this}_normalize(t){let e,r,s,o;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){let n=t;e=(n>>16&255)/255,r=(n>>8&255)/255,s=(n&255)/255,o=1;}else if((Array.isArray(t)||t instanceof Float32Array)&&t.length>=3&&t.length<=4)t=this._clamp(t),[e,r,s,o=1]=t;else if((t instanceof Uint8Array||t instanceof Uint8ClampedArray)&&t.length>=3&&t.length<=4)t=this._clamp(t,0,255),[e,r,s,o=255]=t,e/=255,r/=255,s/=255,o/=255;else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){let a=Gi.HEX_PATTERN.exec(t);a&&(t=`#${a[2]}`);}let n=ae(t);n.isValid()&&({r:e,g:r,b:s,a:o}=n.rgba,e/=255,r/=255,s/=255);}if(e!==void 0)this._components[0]=e,this._components[1]=r,this._components[2]=s,this._components[3]=o,this._refreshInt();else throw new Error(`Unable to convert color ${t}`)}_refreshInt(){this._clamp(this._components);let[t,e,r]=this._components;this._int=(t*255<<16)+(e*255<<8)+(r*255|0);}_clamp(t,e=0,r=1){return typeof t=="number"?Math.min(Math.max(t,e),r):(t.forEach((s,o)=>{t[o]=Math.min(Math.max(s,e),r);}),t)}static isColorLike(t){return typeof t=="number"||typeof t=="string"||t instanceof Number||t instanceof Gi||Array.isArray(t)||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t.r!==void 0&&t.g!==void 0&&t.b!==void 0||t.r!==void 0&&t.g!==void 0&&t.b!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0&&t.a!==void 0}};Gr.shared=new Gr;Gr._temp=new Gr;Gr.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;it=Gr;});var ic,sc=p(()=>{ic={cullArea:null,cullable:false,cullableChildren:true};});var oc,nc,ac,Hn=p(()=>{oc=Math.PI*2,nc=180/Math.PI,ac=Math.PI/180;});var Z,Yn,be=p(()=>{Z=class i{constructor(t=0,e=0){this.x=0,this.y=0,this.x=t,this.y=e;}clone(){return new i(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,e=t){return this.x=t,this.y=e,this}toString(){return `[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return Yn.x=0,Yn.y=0,Yn}},Yn=new Z;});var E,kx,Gx,ht=p(()=>{Hn();be();E=class i{constructor(t=1,e=0,r=0,s=1,o=0,n=0){this.array=null,this.a=t,this.b=e,this.c=r,this.d=s,this.tx=o,this.ty=n;}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5];}set(t,e,r,s,o,n){return this.a=t,this.b=e,this.c=r,this.d=s,this.tx=o,this.ty=n,this}toArray(t,e){this.array||(this.array=new Float32Array(9));let r=e||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r}apply(t,e){e=e||new Z;let r=t.x,s=t.y;return e.x=this.a*r+this.c*s+this.tx,e.y=this.b*r+this.d*s+this.ty,e}applyInverse(t,e){e=e||new Z;let r=this.a,s=this.b,o=this.c,n=this.d,a=this.tx,h=this.ty,l=1/(r*n+o*-s),c=t.x,u=t.y;return e.x=n*l*c+-o*l*u+(h*o-a*n)*l,e.y=r*l*u+-s*l*c+(-h*r+a*s)*l,e}translate(t,e){return this.tx+=t,this.ty+=e,this}scale(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this}rotate(t){let e=Math.cos(t),r=Math.sin(t),s=this.a,o=this.c,n=this.tx;return this.a=s*e-this.b*r,this.b=s*r+this.b*e,this.c=o*e-this.d*r,this.d=o*r+this.d*e,this.tx=n*e-this.ty*r,this.ty=n*r+this.ty*e,this}append(t){let e=this.a,r=this.b,s=this.c,o=this.d;return this.a=t.a*e+t.b*s,this.b=t.a*r+t.b*o,this.c=t.c*e+t.d*s,this.d=t.c*r+t.d*o,this.tx=t.tx*e+t.ty*s+this.tx,this.ty=t.tx*r+t.ty*o+this.ty,this}appendFrom(t,e){let r=t.a,s=t.b,o=t.c,n=t.d,a=t.tx,h=t.ty,l=e.a,c=e.b,u=e.c,f=e.d;return this.a=r*l+s*u,this.b=r*c+s*f,this.c=o*l+n*u,this.d=o*c+n*f,this.tx=a*l+h*u+e.tx,this.ty=a*c+h*f+e.ty,this}setTransform(t,e,r,s,o,n,a,h,l){return this.a=Math.cos(a+l)*o,this.b=Math.sin(a+l)*o,this.c=-Math.sin(a-h)*n,this.d=Math.cos(a-h)*n,this.tx=t-(r*this.a+s*this.c),this.ty=e-(r*this.b+s*this.d),this}prepend(t){let e=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){let r=this.a,s=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=s*t.a+this.d*t.c,this.d=s*t.b+this.d*t.d;}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this}decompose(t){let e=this.a,r=this.b,s=this.c,o=this.d,n=t.pivot,a=-Math.atan2(-s,o),h=Math.atan2(r,e),l=Math.abs(a+h);return l<1e-5||Math.abs(oc-l)<1e-5?(t.rotation=h,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=a,t.skew.y=h),t.scale.x=Math.sqrt(e*e+r*r),t.scale.y=Math.sqrt(s*s+o*o),t.position.x=this.tx+(n.x*e+n.y*s),t.position.y=this.ty+(n.x*r+n.y*o),t}invert(){let t=this.a,e=this.b,r=this.c,s=this.d,o=this.tx,n=t*s-e*r;return this.a=s/n,this.b=-e/n,this.c=-r/n,this.d=t/n,this.tx=(r*this.ty-s*o)/n,this.ty=-(t*this.ty-e*o)/n,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){let t=new i;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}equals(t){return t.a===this.a&&t.b===this.b&&t.c===this.c&&t.d===this.d&&t.tx===this.tx&&t.ty===this.ty}toString(){return `[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return Gx.identity()}static get shared(){return kx.identity()}},kx=new E,Gx=new E;});var Ct,Xn=p(()=>{Ct=class i{constructor(t,e,r){this._x=e||0,this._y=r||0,this._observer=t;}clone(t){return new i(t??this._observer,this._x,this._y)}set(t=0,e=t){return (this._x!==t||this._y!==e)&&(this._x=t,this._y=e,this._observer._onUpdate(this)),this}copyFrom(t){return (this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this._observer._onUpdate(this)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return `[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this._observer._onUpdate(this));}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this._observer._onUpdate(this));}};});function Q(i="default"){return $n[i]===void 0&&($n[i]=-1),++$n[i]}var $n,Ut=p(()=>{$n={default:-1};});function R(i,t,e=3){if(hc[t])return;let r=new Error().stack;typeof r>"u"?console.warn("PixiJS Deprecation Warning: ",`${t} Deprecated since v${i}`):(r=r.split(` `).splice(e).join(` `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${t} Deprecated since v${i}`),console.warn(r),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${t} Deprecated since v${i}`),console.warn(r))),hc[t]=true;}var hc,j,lc,gt=p(()=>{hc={},j="8.0.0",lc="8.3.4";});function X(...i){jn!==cc&&(jn++,jn===cc?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...i));}var jn,cc,Rt=p(()=>{jn=0,cc=500;});var lr,Kn=p(()=>{lr=class{constructor(t,e){this._pool=[],this._count=0,this._index=0,this._classType=t,e&&this.prepopulate(e);}prepopulate(t){for(let e=0;e<t;e++)this._pool[this._index++]=new this._classType;this._count+=t;}get(t){let e;return this._index>0?e=this._pool[--this._index]:e=new this._classType,e.init?.(t),e}return(t){t.reset?.(),this._pool[this._index++]=t;}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){this._pool.length=0,this._index=0;}};});var qn,Tt,cr=p(()=>{Kn();qn=class{constructor(){this._poolsByClass=new Map;}prepopulate(t,e){this.getPool(t).prepopulate(e);}get(t,e){return this.getPool(t).get(e)}return(t){this.getPool(t.constructor).return(t);}getPool(t){return this._poolsByClass.has(t)||this._poolsByClass.set(t,new lr(t)),this._poolsByClass.get(t)}stats(){let t={};return this._poolsByClass.forEach(e=>{let r=t[e._classType.name]?e._classType.name+e._classType.ID:e._classType.name;t[r]={free:e.totalFree,used:e.totalUsed,size:e.totalSize};}),t}},Tt=new qn;});var uc,dc=p(()=>{gt();uc={get isCachedAsTexture(){return !!this.renderGroup?.isCachedAsTexture},cacheAsTexture(i){typeof i=="boolean"&&i===false?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(i===true?{}:i));},updateCacheTexture(){this.renderGroup?.updateCacheTexture();},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(i){R("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(i);}};});function qs(i,t,e){let r=i.length,s;if(t>=r||e===0)return;e=t+e>r?r-t:e;let o=r-e;for(s=t;s<o;++s)i[s]=i[s+e];i.length=o;}var Zn=p(()=>{});var fc,pc=p(()=>{Zn();gt();fc={allowChildren:true,removeChildren(i=0,t){let e=t??this.children.length,r=e-i,s=[];if(r>0&&r<=e){for(let n=e-1;n>=i;n--){let a=this.children[n];a&&(s.push(a),a.parent=null);}qs(this.children,i,e);let o=this.renderGroup||this.parentRenderGroup;o&&o.removeChildren(s);for(let n=0;n<s.length;++n){let a=s[n];a.parentRenderLayer?.detach(a),this.emit("childRemoved",a,this,n),s[n].emit("removed",this);}return s.length>0&&this._didViewChangeTick++,s}else if(r===0&&this.children.length===0)return s;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(i){let t=this.getChildAt(i);return this.removeChild(t)},getChildAt(i){if(i<0||i>=this.children.length)throw new Error(`getChildAt: Index (${i}) does not exist.`);return this.children[i]},setChildIndex(i,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);this.getChildIndex(i),this.addChildAt(i,t);},getChildIndex(i){let t=this.children.indexOf(i);if(t===-1)throw new Error("The supplied Container must be a child of the caller");return t},addChildAt(i,t){this.allowChildren||R(j,"addChildAt: Only Containers will be allowed to add children in v8.0.0");let{children:e}=this;if(t<0||t>e.length)throw new Error(`${i}addChildAt: The index ${t} supplied is out of bounds ${e.length}`);if(i.parent){let s=i.parent.children.indexOf(i);if(i.parent===this&&s===t)return i;s!==-1&&i.parent.children.splice(s,1);}t===e.length?e.push(i):e.splice(t,0,i),i.parent=this,i.didChange=true,i._updateFlags=15;let r=this.renderGroup||this.parentRenderGroup;return r&&r.addChild(i),this.sortableChildren&&(this.sortDirty=true),this.emit("childAdded",i,this,t),i.emit("added",this),i},swapChildren(i,t){if(i===t)return;let e=this.getChildIndex(i),r=this.getChildIndex(t);this.children[e]=t,this.children[r]=i;let s=this.renderGroup||this.parentRenderGroup;s&&(s.structureDidChange=true),this._didContainerChangeTick++;},removeFromParent(){this.parent?.removeChild(this);},reparentChild(...i){return i.length===1?this.reparentChildAt(i[0],this.children.length):(i.forEach(t=>this.reparentChildAt(t,this.children.length)),i[0])},reparentChildAt(i,t){if(i.parent===this)return this.setChildIndex(i,t),i;let e=i.worldTransform.clone();i.removeFromParent(),this.addChildAt(i,t);let r=this.worldTransform.clone();return r.invert(),e.prepend(r),i.setFromMatrix(e),i},replaceChild(i,t){i.updateLocalTransform(),this.addChildAt(t,this.getChildIndex(i)),t.setFromMatrix(i.localTransform),t.updateLocalTransform(),this.removeChild(i);}};});var mc,gc=p(()=>{mc={collectRenderables(i,t,e){this.parentRenderLayer&&this.parentRenderLayer!==e||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(i,t,e):this.renderGroup?t.renderPipes.renderGroup.addRenderGroup(this.renderGroup,i):this.collectRenderablesWithEffects(i,t,e));},collectRenderablesSimple(i,t,e){let r=this.children,s=r.length;for(let o=0;o<s;o++)r[o].collectRenderables(i,t,e);},collectRenderablesWithEffects(i,t,e){let{renderPipes:r}=t;for(let s=0;s<this.effects.length;s++){let o=this.effects[s];r[o.pipe].push(o,this,i);}this.collectRenderablesSimple(i,t,e);for(let s=this.effects.length-1;s>=0;s--){let o=this.effects[s];r[o.pipe].pop(o,this,i);}}};});var Ri,xc=p(()=>{Ri=class{constructor(){this.pipe="filter",this.priority=1;}destroy(){for(let t=0;t<this.filters.length;t++)this.filters[t].destroy();this.filters=null,this.filterArea=null;}};});var Qn,Zs,_c=p(()=>{D();cr();Qn=class{constructor(){this._effectClasses=[],this._tests=[],this._initialized=false;}init(){this._initialized||(this._initialized=true,this._effectClasses.forEach(t=>{this.add({test:t.test,maskClass:t});}));}add(t){this._tests.push(t);}getMaskEffect(t){this._initialized||this.init();for(let e=0;e<this._tests.length;e++){let r=this._tests[e];if(r.test(t))return Tt.get(r.maskClass,t)}return t}returnMaskEffect(t){Tt.return(t);}},Zs=new Qn;z.handleByList(w.MaskEffect,Zs._effectClasses);});var yc,bc=p(()=>{xc();_c();yc={_maskEffect:null,_maskOptions:{inverse:false},_filterEffect:null,effects:[],_markStructureAsChanged(){let i=this.renderGroup||this.parentRenderGroup;i&&(i.structureDidChange=true);},addEffect(i){this.effects.indexOf(i)===-1&&(this.effects.push(i),this.effects.sort((e,r)=>e.priority-r.priority),this._markStructureAsChanged(),this._updateIsSimple());},removeEffect(i){let t=this.effects.indexOf(i);t!==-1&&(this.effects.splice(t,1),this._markStructureAsChanged(),this._updateIsSimple());},set mask(i){let t=this._maskEffect;t?.mask!==i&&(t&&(this.removeEffect(t),Zs.returnMaskEffect(t),this._maskEffect=null),i!=null&&(this._maskEffect=Zs.getMaskEffect(i),this.addEffect(this._maskEffect)));},get mask(){return this._maskEffect?.mask},setMask(i){this._maskOptions={...this._maskOptions,...i},i.mask&&(this.mask=i.mask),this._markStructureAsChanged();},set filters(i){!Array.isArray(i)&&i&&(i=[i]);let t=this._filterEffect||(this._filterEffect=new Ri);i=i;let e=i?.length>0,r=t.filters?.length>0,s=e!==r;i=Array.isArray(i)?i.slice(0):i,t.filters=Object.freeze(i),s&&(e?this.addEffect(t):(this.removeEffect(t),t.filters=i??null));},get filters(){return this._filterEffect?.filters},set filterArea(i){this._filterEffect||(this._filterEffect=new Ri),this._filterEffect.filterArea=i;},get filterArea(){return this._filterEffect?.filterArea}};});var vc,Sc=p(()=>{gt();vc={label:null,get name(){return R(j,"Container.name property has been removed, use Container.label instead"),this.label},set name(i){R(j,"Container.name property has been removed, use Container.label instead"),this.label=i;},getChildByName(i,t=false){return this.getChildByLabel(i,t)},getChildByLabel(i,t=false){let e=this.children;for(let r=0;r<e.length;r++){let s=e[r];if(s.label===i||i instanceof RegExp&&i.test(s.label))return s}if(t)for(let r=0;r<e.length;r++){let o=e[r].getChildByLabel(i,true);if(o)return o}return null},getChildrenByLabel(i,t=false,e=[]){let r=this.children;for(let s=0;s<r.length;s++){let o=r[s];(o.label===i||i instanceof RegExp&&i.test(o.label))&&e.push(o);}if(t)for(let s=0;s<r.length;s++)r[s].getChildrenByLabel(i,true,e);return e}};});var Qs,J,Ht=p(()=>{be();Qs=[new Z,new Z,new Z,new Z],J=class i{constructor(t=0,e=0,r=0,s=0){this.type="rectangle",this.x=Number(t),this.y=Number(e),this.width=Number(r),this.height=Number(s);}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new i(0,0,0,0)}clone(){return new i(this.x,this.y,this.width,this.height)}copyFromBounds(t){return this.x=t.minX,this.y=t.minY,this.width=t.maxX-t.minX,this.height=t.maxY-t.minY,this}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,e){return this.width<=0||this.height<=0?false:t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height}strokeContains(t,e,r,s=.5){let{width:o,height:n}=this;if(o<=0||n<=0)return false;let a=this.x,h=this.y,l=r*(1-s),c=r-l,u=a-l,f=a+o+l,d=h-l,x=h+n+l,y=a+c,m=a+o-c,_=h+c,b=h+n-c;return t>=u&&t<=f&&e>=d&&e<=x&&!(t>y&&t<m&&e>_&&e<b)}intersects(t,e){if(!e){let U=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=U)return false;let F=this.y<t.y?t.y:this.y;return (this.bottom>t.bottom?t.bottom:this.bottom)>F}let r=this.left,s=this.right,o=this.top,n=this.bottom;if(s<=r||n<=o)return false;let a=Qs[0].set(t.left,t.top),h=Qs[1].set(t.left,t.bottom),l=Qs[2].set(t.right,t.top),c=Qs[3].set(t.right,t.bottom);if(l.x<=a.x||h.y<=a.y)return false;let u=Math.sign(e.a*e.d-e.b*e.c);if(u===0||(e.apply(a,a),e.apply(h,h),e.apply(l,l),e.apply(c,c),Math.max(a.x,h.x,l.x,c.x)<=r||Math.min(a.x,h.x,l.x,c.x)>=s||Math.max(a.y,h.y,l.y,c.y)<=o||Math.min(a.y,h.y,l.y,c.y)>=n))return false;let f=u*(h.y-a.y),d=u*(a.x-h.x),x=f*r+d*o,y=f*s+d*o,m=f*r+d*n,_=f*s+d*n;if(Math.max(x,y,m,_)<=f*a.x+d*a.y||Math.min(x,y,m,_)>=f*c.x+d*c.y)return false;let b=u*(a.y-l.y),v=u*(l.x-a.x),S=b*r+v*o,M=b*s+v*o,T=b*r+v*n,P=b*s+v*n;return !(Math.max(S,M,T,P)<=b*a.x+v*a.y||Math.min(S,M,T,P)>=b*c.x+v*c.y)}pad(t=0,e=t){return this.x-=t,this.y-=e,this.width+=t*2,this.height+=e*2,this}fit(t){let e=Math.max(this.x,t.x),r=Math.min(this.x+this.width,t.x+t.width),s=Math.max(this.y,t.y),o=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(r-e,0),this.y=s,this.height=Math.max(o-s,0),this}ceil(t=1,e=.001){let r=Math.ceil((this.x+this.width-e)*t)/t,s=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=r-this.x,this.height=s-this.y,this}scale(t,e=t){return this.x*=t,this.y*=e,this.width*=t,this.height*=e,this}enlarge(t){let e=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),s=Math.min(this.y,t.y),o=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=r-e,this.y=s,this.height=o-s,this}getBounds(t){return t||(t=new i),t.copyFrom(this),t}containsRect(t){if(this.width<=0||this.height<=0)return false;let e=t.x,r=t.y,s=t.x+t.width,o=t.y+t.height;return e>=this.x&&e<this.x+this.width&&r>=this.y&&r<this.y+this.height&&s>=this.x&&s<this.x+this.width&&o>=this.y&&o<this.y+this.height}set(t,e,r,s){return this.x=t,this.y=e,this.width=r,this.height=s,this}toString(){return `[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};});var Tc,ft,he=p(()=>{ht();Ht();Tc=new E,ft=class i{constructor(t=1/0,e=1/0,r=-1/0,s=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=Tc,this.minX=t,this.minY=e,this.maxX=r,this.maxY=s;}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new J);let t=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(t.x=0,t.y=0,t.width=0,t.height=0):t.copyFromBounds(this),t}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=Tc,this}set(t,e,r,s){this.minX=t,this.minY=e,this.maxX=r,this.maxY=s;}addFrame(t,e,r,s,o){o||(o=this.matrix);let n=o.a,a=o.b,h=o.c,l=o.d,c=o.tx,u=o.ty,f=this.minX,d=this.minY,x=this.maxX,y=this.maxY,m=n*t+h*e+c,_=a*t+l*e+u;m<f&&(f=m),_<d&&(d=_),m>x&&(x=m),_>y&&(y=_),m=n*r+h*e+c,_=a*r+l*e+u,m<f&&(f=m),_<d&&(d=_),m>x&&(x=m),_>y&&(y=_),m=n*t+h*s+c,_=a*t+l*s+u,m<f&&(f=m),_<d&&(d=_),m>x&&(x=m),_>y&&(y=_),m=n*r+h*s+c,_=a*r+l*s+u,m<f&&(f=m),_<d&&(d=_),m>x&&(x=m),_>y&&(y=_),this.minX=f,this.minY=d,this.maxX=x,this.maxY=y;}addRect(t,e){this.addFrame(t.x,t.y,t.x+t.width,t.y+t.height,e);}addBounds(t,e){this.addFrame(t.minX,t.minY,t.maxX,t.maxY,e);}addBoundsMask(t){this.minX=this.minX>t.minX?this.minX:t.minX,this.minY=this.minY>t.minY?this.minY:t.minY,this.maxX=this.maxX<t.maxX?this.maxX:t.maxX,this.maxY=this.maxY<t.maxY?this.maxY:t.maxY;}applyMatrix(t){let e=this.minX,r=this.minY,s=this.maxX,o=this.maxY,{a:n,b:a,c:h,d:l,tx:c,ty:u}=t,f=n*e+h*r+c,d=a*e+l*r+u;this.minX=f,this.minY=d,this.maxX=f,this.maxY=d,f=n*s+h*r+c,d=a*s+l*r+u,this.minX=f<this.minX?f:this.minX,this.minY=d<this.minY?d:this.minY,this.maxX=f>this.maxX?f:this.maxX,this.maxY=d>this.maxY?d:this.maxY,f=n*e+h*o+c,d=a*e+l*o+u,this.minX=f<this.minX?f:this.minX,this.minY=d<this.minY?d:this.minY,this.maxX=f>this.maxX?f:this.maxX,this.maxY=d>this.maxY?d:this.maxY,f=n*s+h*o+c,d=a*s+l*o+u,this.minX=f<this.minX?f:this.minX,this.minY=d<this.minY?d:this.minY,this.maxX=f>this.maxX?f:this.maxX,this.maxY=d>this.maxY?d:this.maxY;}fit(t){return this.minX<t.left&&(this.minX=t.left),this.maxX>t.right&&(this.maxX=t.right),this.minY<t.top&&(this.minY=t.top),this.maxY>t.bottom&&(this.maxY=t.bottom),this}fitBounds(t,e,r,s){return this.minX<t&&(this.minX=t),this.maxX>e&&(this.maxX=e),this.minY<r&&(this.minY=r),this.maxY>s&&(this.maxY=s),this}pad(t,e=t){return this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new i(this.minX,this.minY,this.maxX,this.maxY)}scale(t,e=t){return this.minX*=t,this.minY*=e,this.maxX*=t,this.maxY*=e,this}get x(){return this.minX}set x(t){let e=this.maxX-this.minX;this.minX=t,this.maxX=t+e;}get y(){return this.minY}set y(t){let e=this.maxY-this.minY;this.minY=t,this.maxY=t+e;}get width(){return this.maxX-this.minX}set width(t){this.maxX=this.minX+t;}get height(){return this.maxY-this.minY}set height(t){this.maxY=this.minY+t;}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}addVertexData(t,e,r,s){let o=this.minX,n=this.minY,a=this.maxX,h=this.maxY;s||(s=this.matrix);let l=s.a,c=s.b,u=s.c,f=s.d,d=s.tx,x=s.ty;for(let y=e;y<r;y+=2){let m=t[y],_=t[y+1],b=l*m+u*_+d,v=c*m+f*_+x;o=b<o?b:o,n=v<n?v:n,a=b>a?b:a,h=v>h?v:h;}this.minX=o,this.minY=n,this.maxX=a,this.maxY=h;}containsPoint(t,e){return this.minX<=t&&this.minY<=e&&this.maxX>=t&&this.maxY>=e}toString(){return `[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}copyFrom(t){return this.minX=t.minX,this.minY=t.minY,this.maxX=t.maxX,this.maxY=t.maxY,this}};});var _t,Kt,ur=p(()=>{ht();Kn();he();_t=new lr(E),Kt=new lr(ft);});var Rx,wc,Pc=p(()=>{ht();he();ur();Rx=new E,wc={getFastGlobalBounds(i,t){t||(t=new ft),t.clear(),this._getGlobalBoundsRecursive(!!i,t,this.parentRenderLayer),t.isValid||t.set(0,0,0,0);let e=this.renderGroup||this.parentRenderGroup;return t.applyMatrix(e.worldTransform),t},_getGlobalBoundsRecursive(i,t,e){let r=t;if(i&&this.parentRenderLayer&&this.parentRenderLayer!==e||this.localDisplayStatus!==7||!this.measurable)return;let s=!!this.effects.length;if((this.renderGroup||s)&&(r=Kt.get().clear()),this.boundsArea)t.addRect(this.boundsArea,this.worldTransform);else {if(this.renderPipeId){let n=this.bounds;r.addFrame(n.minX,n.minY,n.maxX,n.maxY,this.groupTransform);}let o=this.children;for(let n=0;n<o.length;n++)o[n]._getGlobalBoundsRecursive(i,r,e);}if(s){let o=false,n=this.renderGroup||this.parentRenderGroup;for(let a=0;a<this.effects.length;a++)this.effects[a].addBounds&&(o||(o=true,r.applyMatrix(n.worldTransform)),this.effects[a].addBounds(r,true));o&&r.applyMatrix(n.worldTransform.copyTo(Rx).invert()),t.addBounds(r),Kt.return(r);}else this.renderGroup&&(t.addBounds(r,this.relativeGroupTransform),Kt.return(r));}};});function Js(i,t,e){e.clear();let r,s;return i.parent?t?r=i.parent.worldTransform:(s=_t.get().identity(),r=to(i,s)):r=E.IDENTITY,Mc(i,e,r,t),s&&_t.return(s),e.isValid||e.set(0,0,0,0),e}function Mc(i,t,e,r){if(!i.visible||!i.measurable)return;let s;r?s=i.worldTransform:(i.updateLocalTransform(),s=_t.get(),s.appendFrom(i.localTransform,e));let o=t,n=!!i.effects.length;if(n&&(t=Kt.get().clear()),i.boundsArea)t.addRect(i.boundsArea,s);else {i.bounds&&(t.matrix=s,t.addBounds(i.bounds));for(let a=0;a<i.children.length;a++)Mc(i.children[a],t,s,r);}if(n){for(let a=0;a<i.effects.length;a++)i.effects[a].addBounds?.(t);o.addBounds(t,E.IDENTITY),Kt.return(t);}r||_t.return(s);}function to(i,t){let e=i.parent;return e&&(to(e,t),e.updateLocalTransform(),t.append(e.localTransform)),t}var eo=p(()=>{ht();ur();});function ro(i,t){if(i===16777215||!t)return t;if(t===16777215||!i)return i;let e=i>>16&255,r=i>>8&255,s=i&255,o=t>>16&255,n=t>>8&255,a=t&255,h=e*o/255|0,l=r*n/255|0,c=s*a/255|0;return (h<<16)+(l<<8)+c}var Jn=p(()=>{});function ta(i,t){return i===Cc?t:t===Cc?i:ro(i,t)}var Cc,Ac=p(()=>{Jn();Cc=16777215;});function Ii(i){return ((i&255)<<16)+(i&65280)+(i>>16&255)}var Ec,Fc=p(()=>{ht();eo();ur();Ac();Ec={getGlobalAlpha(i){if(i)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let t=this.alpha,e=this.parent;for(;e;)t*=e.alpha,e=e.parent;return t},getGlobalTransform(i=new E,t){if(t)return i.copyFrom(this.worldTransform);this.updateLocalTransform();let e=to(this,_t.get().identity());return i.appendFrom(this.localTransform,e),_t.return(e),i},getGlobalTint(i){if(i)return this.renderGroup?Ii(this.renderGroup.worldColor):this.parentRenderGroup?Ii(ta(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let t=this.localColor,e=this.parent;for(;e;)t=ta(t,e.localColor),e=e.parent;return Ii(t)}};});function io(i,t,e){return t.clear(),e||(e=E.IDENTITY),Bc(i,t,e,i,true),t.isValid||t.set(0,0,0,0),t}function Bc(i,t,e,r,s){let o;if(s)o=_t.get(),o=e.copyTo(o);else {if(!i.visible||!i.measurable)return;i.updateLocalTransform();let h=i.localTransform;o=_t.get(),o.appendFrom(h,e);}let n=t,a=!!i.effects.length;if(a&&(t=Kt.get().clear()),i.boundsArea)t.addRect(i.boundsArea,o);else {i.renderPipeId&&(t.matrix=o,t.addBounds(i.bounds));let h=i.children;for(let l=0;l<h.length;l++)Bc(h[l],t,o,r,false);}if(a){for(let h=0;h<i.effects.length;h++)i.effects[h].addLocalBounds?.(t,r);n.addBounds(t,E.IDENTITY),Kt.return(t);}_t.return(o);}var ea=p(()=>{ht();ur();});function ra(i,t){let e=i.children;for(let r=0;r<e.length;r++){let s=e[r],o=s.uid,n=(s._didViewChangeTick&65535)<<16|s._didContainerChangeTick&65535,a=t.index;(t.data[a]!==o||t.data[a+1]!==n)&&(t.data[t.index]=o,t.data[t.index+1]=n,t.didChange=true),t.index=a+2,s.children.length&&ra(s,t);}return t.didChange}var kc=p(()=>{});var Ix,Gc,Rc=p(()=>{ht();he();eo();ea();kc();Ix=new E,Gc={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(i,t){let e=Math.sign(this.scale.x)||1;t!==0?this.scale.x=i/t*e:this.scale.x=e;},_setHeight(i,t){let e=Math.sign(this.scale.y)||1;t!==0?this.scale.y=i/t*e:this.scale.y=e;},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:false,localBounds:new ft});let i=this._localBoundsCacheData;return i.index=1,i.didChange=false,i.data[0]!==this._didViewChangeTick&&(i.didChange=true,i.data[0]=this._didViewChangeTick),ra(this,i),i.didChange&&io(this,i.localBounds,Ix),i.localBounds},getBounds(i,t){return Js(this,i,t||new ft)}};});var Ic,Dc=p(()=>{Ic={_onRender:null,set onRender(i){let t=this.renderGroup||this.parentRenderGroup;if(!i){this._onRender&&t?.removeOnRender(this),this._onRender=null;return}this._onRender||t?.addOnRender(this),this._onRender=i;},get onRender(){return this._onRender}};});function Dx(i,t){return i._zIndex-t._zIndex}var Lc,Uc=p(()=>{Lc={_zIndex:0,sortDirty:false,sortableChildren:false,get zIndex(){return this._zIndex},set zIndex(i){this._zIndex!==i&&(this._zIndex=i,this.depthOfChildModified());},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=true,this.parent.sortDirty=true),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=true);},sortChildren(){this.sortDirty&&(this.sortDirty=false,this.children.sort(Dx));}};});var Oc,zc=p(()=>{be();ur();Oc={getGlobalPosition(i=new Z,t=false){return this.parent?this.parent.toGlobal(this._position,i,t):(i.x=this._position.x,i.y=this._position.y),i},toGlobal(i,t,e=false){let r=this.getGlobalTransform(_t.get(),e);return t=r.apply(i,t),_t.return(r),t},toLocal(i,t,e,r){t&&(i=t.toGlobal(i,e,r));let s=this.getGlobalTransform(_t.get(),r);return e=s.applyInverse(i,e),_t.return(s),e}};});var Rr,ia=p(()=>{Ut();Rr=class{constructor(){this.uid=Q("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0;}reset(){this.instructionSize=0;}add(t){this.instructions[this.instructionSize++]=t;}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"]);}};});function Ge(i){return i+=i===0?1:0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1}function sa(i){return !(i&i-1)&&!!i}var Di=p(()=>{});function so(i){let t={};for(let e in i)i[e]!==void 0&&(t[e]=i[e]);return t}var oa=p(()=>{});function Lx(i){let t=Wc[i];return t===void 0&&(Wc[i]=Q("resource")),t}var Wc,Vc,oe,Ir=p(()=>{Nt();Ut();gt();Wc=Object.create(null);Vc=class Nc extends q{constructor(t={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=false,t={...Nc.defaultOptions,...t},this.addressMode=t.addressMode,this.addressModeU=t.addressModeU??this.addressModeU,this.addressModeV=t.addressModeV??this.addressModeV,this.addressModeW=t.addressModeW??this.addressModeW,this.scaleMode=t.scaleMode,this.magFilter=t.magFilter??this.magFilter,this.minFilter=t.minFilter??this.minFilter,this.mipmapFilter=t.mipmapFilter??this.mipmapFilter,this.lodMinClamp=t.lodMinClamp,this.lodMaxClamp=t.lodMaxClamp,this.compare=t.compare,this.maxAnisotropy=t.maxAnisotropy??1;}set addressMode(t){this.addressModeU=t,this.addressModeV=t,this.addressModeW=t;}get addressMode(){return this.addressModeU}set wrapMode(t){R(j,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=t;}get wrapMode(){return this.addressMode}set scaleMode(t){this.magFilter=t,this.minFilter=t,this.mipmapFilter=t;}get scaleMode(){return this.magFilter}set maxAnisotropy(t){this._maxAnisotropy=Math.min(t,16),this._maxAnisotropy>1&&(this.scaleMode="linear");}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this.emit("change",this),this._sharedResourceId=null;}_generateResourceId(){let t=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;return this._sharedResourceId=Lx(t),this._resourceId}destroy(){this.destroyed=true,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners();}};Vc.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};oe=Vc;});var Hc,wt,Re=p(()=>{Nt();Di();oa();Ut();Ir();Hc=class Yc extends q{constructor(t={}){super(),this.options=t,this.uid=Q("textureSource"),this._resourceType="textureSource",this._resourceId=Q("resource"),this.uploadMethodId="unknown",this._resolution=1,this.pixelWidth=1,this.pixelHeight=1,this.width=1,this.height=1,this.sampleCount=1,this.mipLevelCount=1,this.autoGenerateMipmaps=false,this.format="rgba8unorm",this.dimension="2d",this.ant