reacthub-pixitweenjs 0.2.105 → 0.2.106-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(Ht,W){typeof exports=="object"&&typeof module<"u"?W(exports,require("react"),require("@pixi/react"),require("pixi.js"),require("reacthub-react-bindings"),require("gsap"),require("@pixi/sound")):typeof define=="function"&&define.amd?define(["exports","react","@pixi/react","pixi.js","reacthub-react-bindings","gsap","@pixi/sound"],W):(Ht=typeof globalThis<"u"?globalThis:Ht||self,W(Ht["reacthub-pixitweenjs"]={},Ht.React,Ht.PIXIReact,Ht.PIXI,Ht.reacthubReactBindings,Ht.gsap,Ht.PIXI.sound))})(this,function(Ht,W,Yt,rv,nv,oe,iv){"use strict";function ac(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const st=ac(W),Fr=ac(rv);var We=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function sv(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}var oc={exports:{}},Ls={};/**
1
+ (function(zt,q){typeof exports=="object"&&typeof module<"u"?q(exports,require("react"),require("@pixi/react"),require("pixi.js"),require("reacthub-react-bindings"),require("gsap"),require("@pixi/sound")):typeof define=="function"&&define.amd?define(["exports","react","@pixi/react","pixi.js","reacthub-react-bindings","gsap","@pixi/sound"],q):(zt=typeof globalThis<"u"?globalThis:zt||self,q(zt["reacthub-pixitweenjs"]={},zt.React,zt.PIXIReact,zt.PIXI,zt.reacthubReactBindings,zt.gsap,zt.PIXI.sound))})(this,function(zt,q,Qt,rv,nv,oe,iv){"use strict";function ac(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const it=ac(q),Fr=ac(rv);var We=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function sv(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}),r}var oc={exports:{}},Ls={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,18 +6,18 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var av=W,ov=Symbol.for("react.element"),uv=Symbol.for("react.fragment"),lv=Object.prototype.hasOwnProperty,hv=av.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cv={key:!0,ref:!0,__self:!0,__source:!0};function uc(e,t,r){var n,s={},a=null,u=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(u=t.ref);for(n in t)lv.call(t,n)&&!cv.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:ov,type:e,key:a,ref:u,props:s,_owner:hv.current}}Ls.Fragment=uv,Ls.jsx=uc,Ls.jsxs=uc,oc.exports=Ls;var Mt=oc.exports,pn=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(pn||{});let lc;function hc(){return lc=document.body,lc}function we(e,t,r){let n;return W.useEffect(()=>{n=n||hc();const s=a=>{const u=a.detail;t(u)};return n.addEventListener(e,s,!1),()=>{n==null||n.removeEventListener(e,s,!1)}},r),s=>{n=s}}function Vn(e,t){const r=hc(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function fv(){let e;function t(r){e=r}return t.emit=function(r,n){const s=new CustomEvent(r,{bubbles:!0,detail:n});e==null||e.dispatchEvent(s)},t}const gn=st.createContext({}),ue={STOP:"GSAP_STOP",PAUSE:"GSAP_PAUSE",PLAY:"GSAP_PLAY",RESUME:"GSAP_RESUME",RESTART:"GSAP_RESTART",REPEAT:"GSAP_REPEAT",SEEK:"GSAP_SEEK",RESET:"GSAP_RESET",COMPLETE:"GSAP_COMPLETE",SEEK_START:"GSAP_SEEK_START",SEEK_END:"GSAP_SEEK_END",SCRUBBER_SEEK:"GSAP_SCRUBBER_SEEK",SCRUBBER_PROGRESS_UPDATE:"GSAP_SCRUBBER_PROGRESS_UPDATE",SCRUBBER_PLAY:"GSAP_SCRUBBER_PLAY",SCRUBBER_PAUSE:"GSAP_SCRUBBER_PAUSE",SCRUBBER_CLICKED:"GSAP_SCRUBBER_CLICKED",TRANSFORMER_DRAG_START:"TRANSFORMER_DRAG_START",TRANSFORMER_DRAG_END:"TRANSFORMER_DRAG_END",REVERSE_MODE_START:"REVERSE_MODE_START",REVERSE_MODE_END:"REVERSE_MODE_END"},dv=({children:e})=>{const[t,r]=W.useState(0),n=W.useRef(),s=W.useRef(),a=W.useRef(.001),u=W.useRef(!1),l=W.useRef(!1);W.useLayoutEffect(()=>(s.current=oe.context(()=>{n.current&&n.current.progress(0).kill(),n.current&&n.current.clear(),n.current&&oe.killTweensOf(n.current),n.current=oe.timeline({paused:!0,defaults:{duration:0}})}),()=>{n.current&&(n.current.progress(0).kill(),oe.killTweensOf(n.current)),s.current.revert()}),[]);const c=W.useCallback(()=>{if(n.current){let I=n.current.time();I<a.current?u.current=!0:u.current=!1,a.current=I}},[]);W.useEffect(()=>{if(n.current){const w=n.current;w.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){w.pause(),c()}).eventCallback("onUpdate",function(){c()}).eventCallback("onComplete",function(){w.pause(),w.revert(),Vn(ue.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),c()})}},[]);const f=W.useCallback(()=>{n.current&&n.current.revert()},[]),p=W.useCallback(()=>{n.current&&n.current.restart()},[]),m=W.useCallback(()=>{if(n.current){const w=n.current;w.repeat(1),w.restart()}},[]),g=W.useCallback(w=>{n.current&&n.current.seek(w)},[]),x=W.useCallback(()=>{n.current&&n.current.seek(4)},[]),y=W.useCallback(()=>{const w=n.current;return w?w.totalDuration():0},[]),S=()=>{n.current&&(n.current.pause(),Vn(ue.PAUSE))},T=()=>{n.current&&(n.current.resume(),Vn(ue.RESUME))};return we(ue.SEEK_START,()=>{l.current=!0}),we(ue.SCRUBBER_PLAY,()=>{T()}),we(ue.SCRUBBER_PAUSE,()=>{S()}),we(ue.SCRUBBER_SEEK,w=>{g(w)}),we(ue.SEEK_END,()=>{l.current=!1}),we(ue.REVERSE_MODE_START,()=>{u.current=!0}),we(ue.REVERSE_MODE_END,()=>{u.current=!1}),we(ue.SCRUBBER_PROGRESS_UPDATE,w=>{}),Mt.jsx(gn.Provider,{value:{gsapCtx:s,tl:n,handlePlay:T,handlePause:S,handleReset:f,handleSeek:g,handleSeekTest:x,handleRestart:p,handleRepeat:m,playerTimeRef:a,getTimelineDuration:y,totalDuration:t,setTotalDuration:r,reverseModeRef:u,dragModeRef:l},children:e})},pv=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:s,mouseoverEvent:a,onDoubleClick:u,uniqueId:l="",isText:c=!1})=>{const f=Fr.utils.string2hex("#F3C409"),p=Fr.utils.string2hex("#F3C409"),m=st.useRef({isDragging:!1}),g=300,x=st.useRef(0),y=st.useCallback(()=>{a&&!m.current.isDragging&&a(!0)},[a]),S=st.useCallback(()=>{a&&!m.current.isDragging&&a(!1)},[a]),T=st.useCallback(()=>{m.current.isDragging=!0;const A=new Date().getTime();A-x.current<g&&u&&u(),x.current=A},[]),w=st.useCallback(A=>{m.current.isDragging=!0,s&&s(A),Vn(ue.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[s]),I=st.useCallback(()=>{if(t.current===null)return;const A=t.current.x,R=t.current.y,N=t.current.width,B=t.current.height,L=t.current.rotation,O=[t.current.scale.x,t.current.scale.y],z=O[0]<0?-1:1,X=O[1]<0?-1:1;n&&(n({uniqueId:l,transformation:{x:Math.round(A),y:Math.round(R),width:Math.round(Math.max(5,N)),height:Math.round(Math.max(5,B)),rotation:L,scale:c?O:[z,X]}}),Vn(ue.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),m.current.isDragging=!1},[n]);return st.useEffect(()=>(e.current&&(e.current.on("mouseover",y),e.current.on("mouseout",S),e.current.on("mousedown",T)),()=>{e.current&&(e.current.off("mouseover",y),e.current.off("mouseout",S),e.current.off("mousedown",T))}),[]),Mt.jsx(nv.Transformer,{ref:e,group:r?[t.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:2,color:p},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:f,shape:"circle",radius:10},transformchange:w,transformcommit:I})};var gv=Object.prototype;function mv(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||gv;return e===r}var cc=mv;function vv(e,t){return function(r){return e(t(r))}}var yv=vv,_v=yv,xv=_v(Object.keys,Object),bv=xv,Tv=cc,wv=bv,Sv=Object.prototype,Av=Sv.hasOwnProperty;function Cv(e){if(!Tv(e))return wv(e);var t=[];for(var r in Object(e))Av.call(e,r)&&r!="constructor"&&t.push(r);return t}var fc=Cv,Ev=typeof We=="object"&&We&&We.Object===Object&&We,dc=Ev,Iv=dc,Rv=typeof self=="object"&&self&&self.Object===Object&&self,Pv=Iv||Rv||Function("return this")(),Tr=Pv,Mv=Tr,Ov=Mv.Symbol,ks=Ov,pc=ks,gc=Object.prototype,Fv=gc.hasOwnProperty,Nv=gc.toString,Gi=pc?pc.toStringTag:void 0;function Lv(e){var t=Fv.call(e,Gi),r=e[Gi];try{e[Gi]=void 0;var n=!0}catch{}var s=Nv.call(e);return n&&(t?e[Gi]=r:delete e[Gi]),s}var kv=Lv,Bv=Object.prototype,Dv=Bv.toString;function Uv(e){return Dv.call(e)}var $v=Uv,mc=ks,Gv=kv,zv=$v,Hv="[object Null]",Vv="[object Undefined]",vc=mc?mc.toStringTag:void 0;function jv(e){return e==null?e===void 0?Vv:Hv:vc&&vc in Object(e)?Gv(e):zv(e)}var zi=jv;function Xv(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Hi=Xv,Wv=zi,qv=Hi,Yv="[object AsyncFunction]",Kv="[object Function]",Zv="[object GeneratorFunction]",Jv="[object Proxy]";function Qv(e){if(!qv(e))return!1;var t=Wv(e);return t==Kv||t==Zv||t==Yv||t==Jv}var yc=Qv,ty=Tr,ey=ty["__core-js_shared__"],ry=ey,$o=ry,_c=function(){var e=/[^.]+$/.exec($o&&$o.keys&&$o.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ny(e){return!!_c&&_c in e}var iy=ny,sy=Function.prototype,ay=sy.toString;function oy(e){if(e!=null){try{return ay.call(e)}catch{}try{return e+""}catch{}}return""}var xc=oy,uy=yc,ly=iy,hy=Hi,cy=xc,fy=/[\\^$.*+?()[\]{}|]/g,dy=/^\[object .+?Constructor\]$/,py=Function.prototype,gy=Object.prototype,my=py.toString,vy=gy.hasOwnProperty,yy=RegExp("^"+my.call(vy).replace(fy,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _y(e){if(!hy(e)||ly(e))return!1;var t=uy(e)?yy:dy;return t.test(cy(e))}var xy=_y;function by(e,t){return e==null?void 0:e[t]}var Ty=by,wy=xy,Sy=Ty;function Ay(e,t){var r=Sy(e,t);return wy(r)?r:void 0}var jn=Ay,Cy=jn,Ey=Tr,Iy=Cy(Ey,"DataView"),Ry=Iy,Py=jn,My=Tr,Oy=Py(My,"Map"),Go=Oy,Fy=jn,Ny=Tr,Ly=Fy(Ny,"Promise"),ky=Ly,By=jn,Dy=Tr,Uy=By(Dy,"Set"),$y=Uy,Gy=jn,zy=Tr,Hy=Gy(zy,"WeakMap"),Vy=Hy,zo=Ry,Ho=Go,Vo=ky,jo=$y,Xo=Vy,bc=zi,Xn=xc,Tc="[object Map]",jy="[object Object]",wc="[object Promise]",Sc="[object Set]",Ac="[object WeakMap]",Cc="[object DataView]",Xy=Xn(zo),Wy=Xn(Ho),qy=Xn(Vo),Yy=Xn(jo),Ky=Xn(Xo),mn=bc;(zo&&mn(new zo(new ArrayBuffer(1)))!=Cc||Ho&&mn(new Ho)!=Tc||Vo&&mn(Vo.resolve())!=wc||jo&&mn(new jo)!=Sc||Xo&&mn(new Xo)!=Ac)&&(mn=function(e){var t=bc(e),r=t==jy?e.constructor:void 0,n=r?Xn(r):"";if(n)switch(n){case Xy:return Cc;case Wy:return Tc;case qy:return wc;case Yy:return Sc;case Ky:return Ac}return t});var Ec=mn;function Zy(e){return e!=null&&typeof e=="object"}var Vi=Zy,Jy=zi,Qy=Vi,t_="[object Arguments]";function e_(e){return Qy(e)&&Jy(e)==t_}var r_=e_,Ic=r_,n_=Vi,Rc=Object.prototype,i_=Rc.hasOwnProperty,s_=Rc.propertyIsEnumerable,a_=Ic(function(){return arguments}())?Ic:function(e){return n_(e)&&i_.call(e,"callee")&&!s_.call(e,"callee")},Wo=a_,o_=Array.isArray,wr=o_,u_=9007199254740991;function l_(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=u_}var qo=l_,h_=yc,c_=qo;function f_(e){return e!=null&&c_(e.length)&&!h_(e)}var Bs=f_,Ds={exports:{}};function d_(){return!1}var p_=d_;Ds.exports,function(e,t){var r=Tr,n=p_,s=t&&!t.nodeType&&t,a=s&&!0&&e&&!e.nodeType&&e,u=a&&a.exports===s,l=u?r.Buffer:void 0,c=l?l.isBuffer:void 0,f=c||n;e.exports=f}(Ds,Ds.exports);var Yo=Ds.exports,g_=zi,m_=qo,v_=Vi,y_="[object Arguments]",__="[object Array]",x_="[object Boolean]",b_="[object Date]",T_="[object Error]",w_="[object Function]",S_="[object Map]",A_="[object Number]",C_="[object Object]",E_="[object RegExp]",I_="[object Set]",R_="[object String]",P_="[object WeakMap]",M_="[object ArrayBuffer]",O_="[object DataView]",F_="[object Float32Array]",N_="[object Float64Array]",L_="[object Int8Array]",k_="[object Int16Array]",B_="[object Int32Array]",D_="[object Uint8Array]",U_="[object Uint8ClampedArray]",$_="[object Uint16Array]",G_="[object Uint32Array]",Kt={};Kt[F_]=Kt[N_]=Kt[L_]=Kt[k_]=Kt[B_]=Kt[D_]=Kt[U_]=Kt[$_]=Kt[G_]=!0,Kt[y_]=Kt[__]=Kt[M_]=Kt[x_]=Kt[O_]=Kt[b_]=Kt[T_]=Kt[w_]=Kt[S_]=Kt[A_]=Kt[C_]=Kt[E_]=Kt[I_]=Kt[R_]=Kt[P_]=!1;function z_(e){return v_(e)&&m_(e.length)&&!!Kt[g_(e)]}var H_=z_;function V_(e){return function(t){return e(t)}}var j_=V_,Us={exports:{}};Us.exports,function(e,t){var r=dc,n=t&&!t.nodeType&&t,s=n&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===n,u=a&&r.process,l=function(){try{var c=s&&s.require&&s.require("util").types;return c||u&&u.binding&&u.binding("util")}catch{}}();e.exports=l}(Us,Us.exports);var X_=Us.exports,W_=H_,q_=j_,Pc=X_,Mc=Pc&&Pc.isTypedArray,Y_=Mc?q_(Mc):W_,Ko=Y_,K_=fc,Z_=Ec,J_=Wo,Q_=wr,tx=Bs,ex=Yo,rx=cc,nx=Ko,ix="[object Map]",sx="[object Set]",ax=Object.prototype,ox=ax.hasOwnProperty;function ux(e){if(e==null)return!0;if(tx(e)&&(Q_(e)||typeof e=="string"||typeof e.splice=="function"||ex(e)||nx(e)||J_(e)))return!e.length;var t=Z_(e);if(t==ix||t==sx)return!e.size;if(rx(e))return!K_(e).length;for(var r in e)if(ox.call(e,r))return!1;return!0}var lx=ux;const Zo=Hn(lx);var Jo=(e=>(e.NONE="none",e.NORMAL="normal",e.LENSFLARE="lensflare",e.FILMSTRIP="filmstrip",e.GRUNGE="grunge",e.BRICKS="bricks",e))(Jo||{});const Oc={normal:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/eyecast_lensflare_overlay_50.jpg",blendmode:"ADD",alpha:0},lensflare:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/eyecast_lensflare_overlay_50.jpg",blendmode:"ADD",alpha:1},filmstrip:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/frames_filmstrip_5.png",blendmode:"ADD",alpha:1},grunge:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/pixi_overlay_grunge_60.jpg",blendmode:"ADD",alpha:1},bricks:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/bricks_Overlay_100.jpg",blendmode:"MULTIPLY",alpha:1}},hx=e=>{const{overlay:t,width:r,height:n,x:s,y:a}=e,{src:u,blendmode:l}=Oc[t]||Oc.normal;return Mt.jsx(Yt.TilingSprite,{image:u,width:r,height:n,x:s,y:a,tilePosition:{x:0,y:0},tileScale:.5,alpha:.5,anchor:.5})},cx=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Wn=st.forwardRef((e,t)=>{const[r,n]=st.useState(!1),[s,a]=W.useState(!1),[u,l]=W.useState(!1),c=W.useRef(null),f=W.useRef(null),p=W.useRef(null),m=W.useRef(null),{uniqueId:g,visible:x,transformation:{x:y,y:S,width:T,height:w,scale:I=[1,1],rotation:A=0,effect:R,overlay:N},applyTransformer:B,disabled:L,pointerdown:O,pointerout:z,pointerover:X,isText:tt,isDragging:it,isGif:V,onDoubleClick:j,isTextEditMode:xt}=e;we(ue.COMPLETE,()=>{c.current}),st.useImperativeHandle(t,()=>({getIsTransformerDragging:()=>s,getIsMouseOverTransformer:()=>u}),[s,u]),st.useEffect(()=>{c.current&&n(!0)},[]);const kt=st.useCallback(()=>{l(!0),X&&X()},[]),G=st.useCallback(()=>{a(!0)},[]),rt=st.useCallback(H=>{e.onAnchorTransformationEnd&&e.onAnchorTransformationEnd(H),a(!1)},[]),gt=Yt.withFilters(Yt.Container,{matrix:Fr.filters.ColorMatrixFilter});return Mt.jsxs(Yt.Container,{ref:f,children:[Mt.jsxs(Yt.Container,{ref:c,position:[y,S],pivot:[y,S],width:T,height:w,scale:I,rotation:A,...!L&&x&&!s&&!it&&{interactive:!0,buttonMode:!0,pointerdown:O,pointerover:X,pointerout:z},children:[!V&&Mt.jsx(gt,{scale:1,apply:({matrix:H})=>{R===pn.BlackAndWhite?H.desaturate():R===pn.Sepia?H.sepia():R===pn.RetroVintage||R===pn.NightVision?H.negative():R===pn.Normal&&H.reset()},matrix:{enabled:!0,matrix:cx},children:Mt.jsx(Yt.Container,{ref:p,children:e.children})}),V&&Mt.jsx(Yt.Container,{ref:p,children:e.children}),!Zo(N)&&N!==Jo.NONE&&N!==Jo.NORMAL&&Mt.jsx(hx,{overlay:N,width:T,height:w,x:y,y:S})]}),B&&x&&!xt&&Mt.jsx(pv,{pixiTransformerRef:m,imageRef:c,isMounted:r,transformCommit:rt,transformChange:G,mouseoverEvent:kt,uniqueId:g,isText:tt,onDoubleClick:j})]})});Wn.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};var vn=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(vn||{}),Fc=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(Fc||{}),Qo=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(Qo||{}),ht=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR",e))(ht||{}),Kr=(e=>(e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e))(Kr||{}),Z=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(Z||{}),qn=(e=>(e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e))(qn||{}),Nt=(e=>(e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT",e))(Nt||{}),tu=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(tu||{}),Sr=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(Sr||{}),ji=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(ji||{}),yn=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(yn||{}),Zr=(e=>(e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",e))(Zr||{}),_n=(e=>(e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT",e))(_n||{}),eu=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(eu||{}),qe=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(qe||{}),de=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(de||{}),fe=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(fe||{}),Ar=(e=>(e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e))(Ar||{});const _t={ADAPTER:{createCanvas:(e,t)=>{const r=document.createElement("canvas");return r.width=e,r.height=t,r},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(e,t)=>fetch(e,t),parseXML:e=>new DOMParser().parseFromString(e,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var ru=/iPhone/i,Nc=/iPod/i,Lc=/iPad/i,kc=/\biOS-universal(?:.+)Mac\b/i,nu=/\bAndroid(?:.+)Mobile\b/i,Bc=/Android/i,Yn=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,$s=/Silk/i,Nr=/Windows Phone/i,Dc=/\bWindows(?:.+)ARM\b/i,Uc=/BlackBerry/i,$c=/BB10/i,Gc=/Opera Mini/i,zc=/\b(CriOS|Chrome)(?:.+)Mobile/i,Hc=/Mobile(?:.+)Firefox\b/i,Vc=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function fx(e){return function(t){return t.test(e)}}function jc(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var r=t.userAgent,n=r.split("[FBAN");typeof n[1]<"u"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]<"u"&&(r=n[0]);var s=fx(r),a={apple:{phone:s(ru)&&!s(Nr),ipod:s(Nc),tablet:!s(ru)&&(s(Lc)||Vc(t))&&!s(Nr),universal:s(kc),device:(s(ru)||s(Nc)||s(Lc)||s(kc)||Vc(t))&&!s(Nr)},amazon:{phone:s(Yn),tablet:!s(Yn)&&s($s),device:s(Yn)||s($s)},android:{phone:!s(Nr)&&s(Yn)||!s(Nr)&&s(nu),tablet:!s(Nr)&&!s(Yn)&&!s(nu)&&(s($s)||s(Bc)),device:!s(Nr)&&(s(Yn)||s($s)||s(nu)||s(Bc))||s(/\bokhttp\b/i)},windows:{phone:s(Nr),tablet:s(Dc),device:s(Nr)||s(Dc)},other:{blackberry:s(Uc),blackberry10:s($c),opera:s(Gc),firefox:s(Hc),chrome:s(zc),device:s(Uc)||s($c)||s(Gc)||s(Hc)||s(zc)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}const Kn=(jc.default??jc)(globalThis.navigator);_t.RETINA_PREFIX=/@([0-9\.]+)x/,_t.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Xc={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function s(c,f,p){this.fn=c,this.context=f,this.once=p||!1}function a(c,f,p,m,g){if(typeof p!="function")throw new TypeError("The listener must be a function");var x=new s(p,m||c,g),y=r?r+f:f;return c._events[y]?c._events[y].fn?c._events[y]=[c._events[y],x]:c._events[y].push(x):(c._events[y]=x,c._eventsCount++),c}function u(c,f){--c._eventsCount===0?c._events=new n:delete c._events[f]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var f=[],p,m;if(this._eventsCount===0)return f;for(m in p=this._events)t.call(p,m)&&f.push(r?m.slice(1):m);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(p)):f},l.prototype.listeners=function(f){var p=r?r+f:f,m=this._events[p];if(!m)return[];if(m.fn)return[m.fn];for(var g=0,x=m.length,y=new Array(x);g<x;g++)y[g]=m[g].fn;return y},l.prototype.listenerCount=function(f){var p=r?r+f:f,m=this._events[p];return m?m.fn?1:m.length:0},l.prototype.emit=function(f,p,m,g,x,y){var S=r?r+f:f;if(!this._events[S])return!1;var T=this._events[S],w=arguments.length,I,A;if(T.fn){switch(T.once&&this.removeListener(f,T.fn,void 0,!0),w){case 1:return T.fn.call(T.context),!0;case 2:return T.fn.call(T.context,p),!0;case 3:return T.fn.call(T.context,p,m),!0;case 4:return T.fn.call(T.context,p,m,g),!0;case 5:return T.fn.call(T.context,p,m,g,x),!0;case 6:return T.fn.call(T.context,p,m,g,x,y),!0}for(A=1,I=new Array(w-1);A<w;A++)I[A-1]=arguments[A];T.fn.apply(T.context,I)}else{var R=T.length,N;for(A=0;A<R;A++)switch(T[A].once&&this.removeListener(f,T[A].fn,void 0,!0),w){case 1:T[A].fn.call(T[A].context);break;case 2:T[A].fn.call(T[A].context,p);break;case 3:T[A].fn.call(T[A].context,p,m);break;case 4:T[A].fn.call(T[A].context,p,m,g);break;default:if(!I)for(N=1,I=new Array(w-1);N<w;N++)I[N-1]=arguments[N];T[A].fn.apply(T[A].context,I)}}return!0},l.prototype.on=function(f,p,m){return a(this,f,p,m,!1)},l.prototype.once=function(f,p,m){return a(this,f,p,m,!0)},l.prototype.removeListener=function(f,p,m,g){var x=r?r+f:f;if(!this._events[x])return this;if(!p)return u(this,x),this;var y=this._events[x];if(y.fn)y.fn===p&&(!g||y.once)&&(!m||y.context===m)&&u(this,x);else{for(var S=0,T=[],w=y.length;S<w;S++)(y[S].fn!==p||g&&!y[S].once||m&&y[S].context!==m)&&T.push(y[S]);T.length?this._events[x]=T.length===1?T[0]:T:u(this,x)}return this},l.prototype.removeAllListeners=function(f){var p;return f?(p=r?r+f:f,this._events[p]&&u(this,p)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(Xc);var dx=Xc.exports;const Gs=Hn(dx);var iu={exports:{}};iu.exports=zs,iu.exports.default=zs;function zs(e,t,r){r=r||2;var n=t&&t.length,s=n?t[0]*r:e.length,a=Wc(e,0,s,r,!0),u=[];if(!a||a.next===a.prev)return u;var l,c,f,p,m,g,x;if(n&&(a=yx(e,t,a,r)),e.length>80*r){l=f=e[0],c=p=e[1];for(var y=r;y<s;y+=r)m=e[y],g=e[y+1],m<l&&(l=m),g<c&&(c=g),m>f&&(f=m),g>p&&(p=g);x=Math.max(f-l,p-c),x=x!==0?32767/x:0}return Xi(a,u,r,l,c,x,0),u}function Wc(e,t,r,n,s){var a,u;if(s===ou(e,t,r,n)>0)for(a=t;a<r;a+=n)u=Kc(a,e[a],e[a+1],u);else for(a=r-n;a>=t;a-=n)u=Kc(a,e[a],e[a+1],u);return u&&Hs(u,u.next)&&(qi(u),u=u.next),u}function xn(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(Hs(r,r.next)||re(r.prev,r,r.next)===0)){if(qi(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function Xi(e,t,r,n,s,a,u){if(e){!u&&a&&wx(e,n,s,a);for(var l=e,c,f;e.prev!==e.next;){if(c=e.prev,f=e.next,a?gx(e,n,s,a):px(e)){t.push(c.i/r|0),t.push(e.i/r|0),t.push(f.i/r|0),qi(e),e=f.next,l=f.next;continue}if(e=f,e===l){u?u===1?(e=mx(xn(e),t,r),Xi(e,t,r,n,s,a,2)):u===2&&vx(e,t,r,n,s,a):Xi(xn(e),t,r,n,s,a,1);break}}}}function px(e){var t=e.prev,r=e,n=e.next;if(re(t,r,n)>=0)return!1;for(var s=t.x,a=r.x,u=n.x,l=t.y,c=r.y,f=n.y,p=s<a?s<u?s:u:a<u?a:u,m=l<c?l<f?l:f:c<f?c:f,g=s>a?s>u?s:u:a>u?a:u,x=l>c?l>f?l:f:c>f?c:f,y=n.next;y!==t;){if(y.x>=p&&y.x<=g&&y.y>=m&&y.y<=x&&Zn(s,l,a,c,u,f,y.x,y.y)&&re(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function gx(e,t,r,n){var s=e.prev,a=e,u=e.next;if(re(s,a,u)>=0)return!1;for(var l=s.x,c=a.x,f=u.x,p=s.y,m=a.y,g=u.y,x=l<c?l<f?l:f:c<f?c:f,y=p<m?p<g?p:g:m<g?m:g,S=l>c?l>f?l:f:c>f?c:f,T=p>m?p>g?p:g:m>g?m:g,w=su(x,y,t,r,n),I=su(S,T,t,r,n),A=e.prevZ,R=e.nextZ;A&&A.z>=w&&R&&R.z<=I;){if(A.x>=x&&A.x<=S&&A.y>=y&&A.y<=T&&A!==s&&A!==u&&Zn(l,p,c,m,f,g,A.x,A.y)&&re(A.prev,A,A.next)>=0||(A=A.prevZ,R.x>=x&&R.x<=S&&R.y>=y&&R.y<=T&&R!==s&&R!==u&&Zn(l,p,c,m,f,g,R.x,R.y)&&re(R.prev,R,R.next)>=0))return!1;R=R.nextZ}for(;A&&A.z>=w;){if(A.x>=x&&A.x<=S&&A.y>=y&&A.y<=T&&A!==s&&A!==u&&Zn(l,p,c,m,f,g,A.x,A.y)&&re(A.prev,A,A.next)>=0)return!1;A=A.prevZ}for(;R&&R.z<=I;){if(R.x>=x&&R.x<=S&&R.y>=y&&R.y<=T&&R!==s&&R!==u&&Zn(l,p,c,m,f,g,R.x,R.y)&&re(R.prev,R,R.next)>=0)return!1;R=R.nextZ}return!0}function mx(e,t,r){var n=e;do{var s=n.prev,a=n.next.next;!Hs(s,a)&&qc(s,n,n.next,a)&&Wi(s,a)&&Wi(a,s)&&(t.push(s.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),qi(n),qi(n.next),n=e=a),n=n.next}while(n!==e);return xn(n)}function vx(e,t,r,n,s,a){var u=e;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&Cx(u,l)){var c=Yc(u,l);u=xn(u,u.next),c=xn(c,c.next),Xi(u,t,r,n,s,a,0),Xi(c,t,r,n,s,a,0);return}l=l.next}u=u.next}while(u!==e)}function yx(e,t,r,n){var s=[],a,u,l,c,f;for(a=0,u=t.length;a<u;a++)l=t[a]*n,c=a<u-1?t[a+1]*n:e.length,f=Wc(e,l,c,n,!1),f===f.next&&(f.steiner=!0),s.push(Ax(f));for(s.sort(_x),a=0;a<s.length;a++)r=xx(s[a],r);return r}function _x(e,t){return e.x-t.x}function xx(e,t){var r=bx(e,t);if(!r)return t;var n=Yc(r,e);return xn(n,n.next),xn(r,r.next)}function bx(e,t){var r=t,n=e.x,s=e.y,a=-1/0,u;do{if(s<=r.y&&s>=r.next.y&&r.next.y!==r.y){var l=r.x+(s-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(l<=n&&l>a&&(a=l,u=r.x<r.next.x?r:r.next,l===n))return u}r=r.next}while(r!==t);if(!u)return null;var c=u,f=u.x,p=u.y,m=1/0,g;r=u;do n>=r.x&&r.x>=f&&n!==r.x&&Zn(s<p?n:a,s,f,p,s<p?a:n,s,r.x,r.y)&&(g=Math.abs(s-r.y)/(n-r.x),Wi(r,e)&&(g<m||g===m&&(r.x>u.x||r.x===u.x&&Tx(u,r)))&&(u=r,m=g)),r=r.next;while(r!==c);return u}function Tx(e,t){return re(e.prev,e,t.prev)<0&&re(t.next,e,e.next)<0}function wx(e,t,r,n){var s=e;do s.z===0&&(s.z=su(s.x,s.y,t,r,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==e);s.prevZ.nextZ=null,s.prevZ=null,Sx(s)}function Sx(e){var t,r,n,s,a,u,l,c,f=1;do{for(r=e,e=null,a=null,u=0;r;){for(u++,n=r,l=0,t=0;t<f&&(l++,n=n.nextZ,!!n);t++);for(c=f;l>0||c>0&&n;)l!==0&&(c===0||!n||r.z<=n.z)?(s=r,r=r.nextZ,l--):(s=n,n=n.nextZ,c--),a?a.nextZ=s:e=s,s.prevZ=a,a=s;r=n}a.nextZ=null,f*=2}while(u>1);return e}function su(e,t,r,n,s){return e=(e-r)*s|0,t=(t-n)*s|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function Ax(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function Zn(e,t,r,n,s,a,u,l){return(s-u)*(t-l)>=(e-u)*(a-l)&&(e-u)*(n-l)>=(r-u)*(t-l)&&(r-u)*(a-l)>=(s-u)*(n-l)}function Cx(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!Ex(e,t)&&(Wi(e,t)&&Wi(t,e)&&Ix(e,t)&&(re(e.prev,e,t.prev)||re(e,t.prev,t))||Hs(e,t)&&re(e.prev,e,e.next)>0&&re(t.prev,t,t.next)>0)}function re(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Hs(e,t){return e.x===t.x&&e.y===t.y}function qc(e,t,r,n){var s=js(re(e,t,r)),a=js(re(e,t,n)),u=js(re(r,n,e)),l=js(re(r,n,t));return!!(s!==a&&u!==l||s===0&&Vs(e,r,t)||a===0&&Vs(e,n,t)||u===0&&Vs(r,e,n)||l===0&&Vs(r,t,n))}function Vs(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function js(e){return e>0?1:e<0?-1:0}function Ex(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&qc(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Wi(e,t){return re(e.prev,e,e.next)<0?re(e,t,e.next)>=0&&re(e,e.prev,t)>=0:re(e,t,e.prev)<0||re(e,e.next,t)<0}function Ix(e,t){var r=e,n=!1,s=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&s<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function Yc(e,t){var r=new au(e.i,e.x,e.y),n=new au(t.i,t.x,t.y),s=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=s,s.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function Kc(e,t,r,n){var s=new au(e,t,r);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function qi(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function au(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}zs.deviation=function(e,t,r,n){var s=t&&t.length,a=s?t[0]*r:e.length,u=Math.abs(ou(e,0,a,r));if(s)for(var l=0,c=t.length;l<c;l++){var f=t[l]*r,p=l<c-1?t[l+1]*r:e.length;u-=Math.abs(ou(e,f,p,r))}var m=0;for(l=0;l<n.length;l+=3){var g=n[l]*r,x=n[l+1]*r,y=n[l+2]*r;m+=Math.abs((e[g]-e[y])*(e[x+1]-e[g+1])-(e[g]-e[x])*(e[y+1]-e[g+1]))}return u===0&&m===0?0:Math.abs((m-u)/u)};function ou(e,t,r,n){for(var s=0,a=t,u=r-n;a<r;a+=n)s+=(e[u]-e[a])*(e[a+1]+e[u+1]),u=a;return s}zs.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,s=0;s<e.length;s++){for(var a=0;a<e[s].length;a++)for(var u=0;u<t;u++)r.vertices.push(e[s][a][u]);s>0&&(n+=e[s-1].length,r.holes.push(n))}return r};var Rx=iu.exports;const Px=Hn(Rx);var Xs={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Xs.exports,function(e,t){(function(r){var n=t&&!t.nodeType&&t,s=e&&!e.nodeType&&e,a=typeof We=="object"&&We;(a.global===a||a.window===a||a.self===a)&&(r=a);var u,l=2147483647,c=36,f=1,p=26,m=38,g=700,x=72,y=128,S="-",T=/^xn--/,w=/[^\x20-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,A={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=c-f,N=Math.floor,B=String.fromCharCode,L;function O(H){throw new RangeError(A[H])}function z(H,K){for(var ct=H.length,yt=[];ct--;)yt[ct]=K(H[ct]);return yt}function X(H,K){var ct=H.split("@"),yt="";ct.length>1&&(yt=ct[0]+"@",H=ct[1]),H=H.replace(I,".");var wt=H.split("."),Pt=z(wt,K).join(".");return yt+Pt}function tt(H){for(var K=[],ct=0,yt=H.length,wt,Pt;ct<yt;)wt=H.charCodeAt(ct++),wt>=55296&&wt<=56319&&ct<yt?(Pt=H.charCodeAt(ct++),(Pt&64512)==56320?K.push(((wt&1023)<<10)+(Pt&1023)+65536):(K.push(wt),ct--)):K.push(wt);return K}function it(H){return z(H,function(K){var ct="";return K>65535&&(K-=65536,ct+=B(K>>>10&1023|55296),K=56320|K&1023),ct+=B(K),ct}).join("")}function V(H){return H-48<10?H-22:H-65<26?H-65:H-97<26?H-97:c}function j(H,K){return H+22+75*(H<26)-((K!=0)<<5)}function xt(H,K,ct){var yt=0;for(H=ct?N(H/g):H>>1,H+=N(H/K);H>R*p>>1;yt+=c)H=N(H/R);return N(yt+(R+1)*H/(H+m))}function kt(H){var K=[],ct=H.length,yt,wt=0,Pt=y,Ft=x,Vt,Ut,Zt,J,q,at,St,Et,Jt;for(Vt=H.lastIndexOf(S),Vt<0&&(Vt=0),Ut=0;Ut<Vt;++Ut)H.charCodeAt(Ut)>=128&&O("not-basic"),K.push(H.charCodeAt(Ut));for(Zt=Vt>0?Vt+1:0;Zt<ct;){for(J=wt,q=1,at=c;Zt>=ct&&O("invalid-input"),St=V(H.charCodeAt(Zt++)),(St>=c||St>N((l-wt)/q))&&O("overflow"),wt+=St*q,Et=at<=Ft?f:at>=Ft+p?p:at-Ft,!(St<Et);at+=c)Jt=c-Et,q>N(l/Jt)&&O("overflow"),q*=Jt;yt=K.length+1,Ft=xt(wt-J,yt,J==0),N(wt/yt)>l-Pt&&O("overflow"),Pt+=N(wt/yt),wt%=yt,K.splice(wt++,0,Pt)}return it(K)}function G(H){var K,ct,yt,wt,Pt,Ft,Vt,Ut,Zt,J,q,at=[],St,Et,Jt,gr;for(H=tt(H),St=H.length,K=y,ct=0,Pt=x,Ft=0;Ft<St;++Ft)q=H[Ft],q<128&&at.push(B(q));for(yt=wt=at.length,wt&&at.push(S);yt<St;){for(Vt=l,Ft=0;Ft<St;++Ft)q=H[Ft],q>=K&&q<Vt&&(Vt=q);for(Et=yt+1,Vt-K>N((l-ct)/Et)&&O("overflow"),ct+=(Vt-K)*Et,K=Vt,Ft=0;Ft<St;++Ft)if(q=H[Ft],q<K&&++ct>l&&O("overflow"),q==K){for(Ut=ct,Zt=c;J=Zt<=Pt?f:Zt>=Pt+p?p:Zt-Pt,!(Ut<J);Zt+=c)gr=Ut-J,Jt=c-J,at.push(B(j(J+gr%Jt,0))),Ut=N(gr/Jt);at.push(B(j(Ut,0))),Pt=xt(ct,Et,yt==wt),ct=0,++yt}++ct,++K}return at.join("")}function rt(H){return X(H,function(K){return T.test(K)?kt(K.slice(4).toLowerCase()):K})}function gt(H){return X(H,function(K){return w.test(K)?"xn--"+G(K):K})}if(u={version:"1.4.1",ucs2:{decode:tt,encode:it},decode:kt,encode:G,toASCII:gt,toUnicode:rt},n&&s)if(e.exports==n)s.exports=u;else for(L in u)u.hasOwnProperty(L)&&(n[L]=u[L]);else r.punycode=u})(We)}(Xs,Xs.exports);var Mx=Xs.exports,Ox=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var s=42;t[r]=s;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,r);if(u.value!==s||u.enumerable!==!0)return!1}return!0},Zc=typeof Symbol<"u"&&Symbol,Fx=Ox,Nx=function(){return typeof Zc!="function"||typeof Symbol!="function"||typeof Zc("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Fx()},Jc={foo:{}},Lx=Object,kx=function(){return{__proto__:Jc}.foo===Jc.foo&&!({__proto__:null}instanceof Lx)},Bx="Function.prototype.bind called on incompatible ",uu=Array.prototype.slice,Dx=Object.prototype.toString,Ux="[object Function]",$x=function(t){var r=this;if(typeof r!="function"||Dx.call(r)!==Ux)throw new TypeError(Bx+r);for(var n=uu.call(arguments,1),s,a=function(){if(this instanceof s){var p=r.apply(this,n.concat(uu.call(arguments)));return Object(p)===p?p:this}else return r.apply(t,n.concat(uu.call(arguments)))},u=Math.max(0,r.length-n.length),l=[],c=0;c<u;c++)l.push("$"+c);if(s=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var f=function(){};f.prototype=r.prototype,s.prototype=new f,f.prototype=null}return s},Gx=$x,lu=Function.prototype.bind||Gx,zx=lu,Hx=zx.call(Function.call,Object.prototype.hasOwnProperty),Tt,Jn=SyntaxError,Qc=Function,Qn=TypeError,hu=function(e){try{return Qc('"use strict"; return ('+e+").constructor;")()}catch{}},bn=Object.getOwnPropertyDescriptor;if(bn)try{bn({},"")}catch{bn=null}var cu=function(){throw new Qn},Vx=bn?function(){try{return arguments.callee,cu}catch{try{return bn(arguments,"callee").get}catch{return cu}}}():cu,ti=Nx(),jx=kx(),me=Object.getPrototypeOf||(jx?function(e){return e.__proto__}:null),ei={},Xx=typeof Uint8Array>"u"||!me?Tt:me(Uint8Array),Tn={"%AggregateError%":typeof AggregateError>"u"?Tt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Tt:ArrayBuffer,"%ArrayIteratorPrototype%":ti&&me?me([][Symbol.iterator]()):Tt,"%AsyncFromSyncIteratorPrototype%":Tt,"%AsyncFunction%":ei,"%AsyncGenerator%":ei,"%AsyncGeneratorFunction%":ei,"%AsyncIteratorPrototype%":ei,"%Atomics%":typeof Atomics>"u"?Tt:Atomics,"%BigInt%":typeof BigInt>"u"?Tt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Tt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Tt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Tt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Tt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Tt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Tt:FinalizationRegistry,"%Function%":Qc,"%GeneratorFunction%":ei,"%Int8Array%":typeof Int8Array>"u"?Tt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Tt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Tt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ti&&me?me(me([][Symbol.iterator]())):Tt,"%JSON%":typeof JSON=="object"?JSON:Tt,"%Map%":typeof Map>"u"?Tt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ti||!me?Tt:me(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Tt:Promise,"%Proxy%":typeof Proxy>"u"?Tt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Tt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Tt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ti||!me?Tt:me(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Tt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ti&&me?me(""[Symbol.iterator]()):Tt,"%Symbol%":ti?Symbol:Tt,"%SyntaxError%":Jn,"%ThrowTypeError%":Vx,"%TypedArray%":Xx,"%TypeError%":Qn,"%Uint8Array%":typeof Uint8Array>"u"?Tt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Tt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Tt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Tt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Tt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Tt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Tt:WeakSet};if(me)try{null.error}catch(e){var Wx=me(me(e));Tn["%Error.prototype%"]=Wx}var qx=function e(t){var r;if(t==="%AsyncFunction%")r=hu("async function () {}");else if(t==="%GeneratorFunction%")r=hu("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=hu("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var s=e("%AsyncGenerator%");s&&me&&(r=me(s.prototype))}return Tn[t]=r,r},tf={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Yi=lu,Ws=Hx,Yx=Yi.call(Function.call,Array.prototype.concat),Kx=Yi.call(Function.apply,Array.prototype.splice),ef=Yi.call(Function.call,String.prototype.replace),qs=Yi.call(Function.call,String.prototype.slice),Zx=Yi.call(Function.call,RegExp.prototype.exec),Jx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Qx=/\\(\\)?/g,t1=function(t){var r=qs(t,0,1),n=qs(t,-1);if(r==="%"&&n!=="%")throw new Jn("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Jn("invalid intrinsic syntax, expected opening `%`");var s=[];return ef(t,Jx,function(a,u,l,c){s[s.length]=l?ef(c,Qx,"$1"):u||a}),s},e1=function(t,r){var n=t,s;if(Ws(tf,n)&&(s=tf[n],n="%"+s[0]+"%"),Ws(Tn,n)){var a=Tn[n];if(a===ei&&(a=qx(n)),typeof a>"u"&&!r)throw new Qn("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:s,name:n,value:a}}throw new Jn("intrinsic "+t+" does not exist!")},fu=function(t,r){if(typeof t!="string"||t.length===0)throw new Qn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Qn('"allowMissing" argument must be a boolean');if(Zx(/^%?[^%]*%?$/,t)===null)throw new Jn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=t1(t),s=n.length>0?n[0]:"",a=e1("%"+s+"%",r),u=a.name,l=a.value,c=!1,f=a.alias;f&&(s=f[0],Kx(n,Yx([0,1],f)));for(var p=1,m=!0;p<n.length;p+=1){var g=n[p],x=qs(g,0,1),y=qs(g,-1);if((x==='"'||x==="'"||x==="`"||y==='"'||y==="'"||y==="`")&&x!==y)throw new Jn("property names with quotes must have matching quotes");if((g==="constructor"||!m)&&(c=!0),s+="."+g,u="%"+s+"%",Ws(Tn,u))l=Tn[u];else if(l!=null){if(!(g in l)){if(!r)throw new Qn("base intrinsic for "+t+" exists, but the property is not available.");return}if(bn&&p+1>=n.length){var S=bn(l,g);m=!!S,m&&"get"in S&&!("originalValue"in S.get)?l=S.get:l=l[g]}else m=Ws(l,g),l=l[g];m&&!c&&(Tn[u]=l)}}return l},rf={exports:{}};(function(e){var t=lu,r=fu,n=r("%Function.prototype.apply%"),s=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||t.call(s,n),u=r("%Object.getOwnPropertyDescriptor%",!0),l=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}e.exports=function(m){var g=a(t,s,arguments);if(u&&l){var x=u(g,"length");x.configurable&&l(g,"length",{value:1+c(0,m.length-(arguments.length-1))})}return g};var f=function(){return a(t,n,arguments)};l?l(e.exports,"apply",{value:f}):e.exports.apply=f})(rf);var r1=rf.exports,nf=fu,sf=r1,n1=sf(nf("String.prototype.indexOf")),i1=function(t,r){var n=nf(t,!!r);return typeof n=="function"&&n1(t,".prototype.")>-1?sf(n):n};const s1=sv(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var du=typeof Map=="function"&&Map.prototype,pu=Object.getOwnPropertyDescriptor&&du?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ys=du&&pu&&typeof pu.get=="function"?pu.get:null,af=du&&Map.prototype.forEach,gu=typeof Set=="function"&&Set.prototype,mu=Object.getOwnPropertyDescriptor&&gu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ks=gu&&mu&&typeof mu.get=="function"?mu.get:null,of=gu&&Set.prototype.forEach,a1=typeof WeakMap=="function"&&WeakMap.prototype,Ki=a1?WeakMap.prototype.has:null,o1=typeof WeakSet=="function"&&WeakSet.prototype,Zi=o1?WeakSet.prototype.has:null,u1=typeof WeakRef=="function"&&WeakRef.prototype,uf=u1?WeakRef.prototype.deref:null,l1=Boolean.prototype.valueOf,h1=Object.prototype.toString,c1=Function.prototype.toString,f1=String.prototype.match,vu=String.prototype.slice,Jr=String.prototype.replace,d1=String.prototype.toUpperCase,lf=String.prototype.toLowerCase,hf=RegExp.prototype.test,cf=Array.prototype.concat,Cr=Array.prototype.join,p1=Array.prototype.slice,ff=Math.floor,yu=typeof BigInt=="function"?BigInt.prototype.valueOf:null,_u=Object.getOwnPropertySymbols,xu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ri=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Se=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ri||"symbol")?Symbol.toStringTag:null,df=Object.prototype.propertyIsEnumerable,pf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function gf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||hf.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-ff(-e):ff(e);if(n!==e){var s=String(n),a=vu.call(t,s.length+1);return Jr.call(s,r,"$&_")+"."+Jr.call(Jr.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Jr.call(t,r,"$&_")}var bu=s1,mf=bu.custom,vf=xf(mf)?mf:null,g1=function e(t,r,n,s){var a=r||{};if(Qr(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Qr(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=Qr(a,"customInspect")?a.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Qr(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Qr(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=a.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Tf(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return l?gf(t,c):c}if(typeof t=="bigint"){var f=String(t)+"n";return l?gf(t,f):f}var p=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=p&&p>0&&typeof t=="object")return Tu(t)?"[Array]":"[Object]";var m=F1(a,n);if(typeof s>"u")s=[];else if(bf(s,t)>=0)return"[Circular]";function g(V,j,xt){if(j&&(s=p1.call(s),s.push(j)),xt){var kt={depth:a.depth};return Qr(a,"quoteStyle")&&(kt.quoteStyle=a.quoteStyle),e(V,kt,n+1,s)}return e(V,a,n+1,s)}if(typeof t=="function"&&!_f(t)){var x=S1(t),y=Zs(t,g);return"[Function"+(x?": "+x:" (anonymous)")+"]"+(y.length>0?" { "+Cr.call(y,", ")+" }":"")}if(xf(t)){var S=ri?Jr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):xu.call(t);return typeof t=="object"&&!ri?Ji(S):S}if(P1(t)){for(var T="<"+lf.call(String(t.nodeName)),w=t.attributes||[],I=0;I<w.length;I++)T+=" "+w[I].name+"="+yf(m1(w[I].value),"double",a);return T+=">",t.childNodes&&t.childNodes.length&&(T+="..."),T+="</"+lf.call(String(t.nodeName))+">",T}if(Tu(t)){if(t.length===0)return"[]";var A=Zs(t,g);return m&&!O1(A)?"["+Su(A,m)+"]":"[ "+Cr.call(A,", ")+" ]"}if(y1(t)){var R=Zs(t,g);return!("cause"in Error.prototype)&&"cause"in t&&!df.call(t,"cause")?"{ ["+String(t)+"] "+Cr.call(cf.call("[cause]: "+g(t.cause),R),", ")+" }":R.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Cr.call(R,", ")+" }"}if(typeof t=="object"&&u){if(vf&&typeof t[vf]=="function"&&bu)return bu(t,{depth:p-n});if(u!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(A1(t)){var N=[];return af&&af.call(t,function(V,j){N.push(g(j,t,!0)+" => "+g(V,t))}),wf("Map",Ys.call(t),N,m)}if(I1(t)){var B=[];return of&&of.call(t,function(V){B.push(g(V,t))}),wf("Set",Ks.call(t),B,m)}if(C1(t))return wu("WeakMap");if(R1(t))return wu("WeakSet");if(E1(t))return wu("WeakRef");if(x1(t))return Ji(g(Number(t)));if(T1(t))return Ji(g(yu.call(t)));if(b1(t))return Ji(l1.call(t));if(_1(t))return Ji(g(String(t)));if(!v1(t)&&!_f(t)){var L=Zs(t,g),O=pf?pf(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",X=!O&&Se&&Object(t)===t&&Se in t?vu.call(tn(t),8,-1):z?"Object":"",tt=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",it=tt+(X||z?"["+Cr.call(cf.call([],X||[],z||[]),": ")+"] ":"");return L.length===0?it+"{}":m?it+"{"+Su(L,m)+"}":it+"{ "+Cr.call(L,", ")+" }"}return String(t)};function yf(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function m1(e){return Jr.call(String(e),/"/g,"&quot;")}function Tu(e){return tn(e)==="[object Array]"&&(!Se||!(typeof e=="object"&&Se in e))}function v1(e){return tn(e)==="[object Date]"&&(!Se||!(typeof e=="object"&&Se in e))}function _f(e){return tn(e)==="[object RegExp]"&&(!Se||!(typeof e=="object"&&Se in e))}function y1(e){return tn(e)==="[object Error]"&&(!Se||!(typeof e=="object"&&Se in e))}function _1(e){return tn(e)==="[object String]"&&(!Se||!(typeof e=="object"&&Se in e))}function x1(e){return tn(e)==="[object Number]"&&(!Se||!(typeof e=="object"&&Se in e))}function b1(e){return tn(e)==="[object Boolean]"&&(!Se||!(typeof e=="object"&&Se in e))}function xf(e){if(ri)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!xu)return!1;try{return xu.call(e),!0}catch{}return!1}function T1(e){if(!e||typeof e!="object"||!yu)return!1;try{return yu.call(e),!0}catch{}return!1}var w1=Object.prototype.hasOwnProperty||function(e){return e in this};function Qr(e,t){return w1.call(e,t)}function tn(e){return h1.call(e)}function S1(e){if(e.name)return e.name;var t=f1.call(c1.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function bf(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function A1(e){if(!Ys||!e||typeof e!="object")return!1;try{Ys.call(e);try{Ks.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function C1(e){if(!Ki||!e||typeof e!="object")return!1;try{Ki.call(e,Ki);try{Zi.call(e,Zi)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function E1(e){if(!uf||!e||typeof e!="object")return!1;try{return uf.call(e),!0}catch{}return!1}function I1(e){if(!Ks||!e||typeof e!="object")return!1;try{Ks.call(e);try{Ys.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function R1(e){if(!Zi||!e||typeof e!="object")return!1;try{Zi.call(e,Zi);try{Ki.call(e,Ki)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function P1(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Tf(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Tf(vu.call(e,0,t.maxStringLength),t)+n}var s=Jr.call(Jr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,M1);return yf(s,"single",t)}function M1(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+d1.call(t.toString(16))}function Ji(e){return"Object("+e+")"}function wu(e){return e+" { ? }"}function wf(e,t,r,n){var s=n?Su(r,n):Cr.call(r,", ");return e+" ("+t+") {"+s+"}"}function O1(e){for(var t=0;t<e.length;t++)if(bf(e[t],`
9
+ */var av=q,ov=Symbol.for("react.element"),uv=Symbol.for("react.fragment"),lv=Object.prototype.hasOwnProperty,hv=av.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cv={key:!0,ref:!0,__self:!0,__source:!0};function uc(e,t,r){var n,s={},a=null,u=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(u=t.ref);for(n in t)lv.call(t,n)&&!cv.hasOwnProperty(n)&&(s[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)s[n]===void 0&&(s[n]=t[n]);return{$$typeof:ov,type:e,key:a,ref:u,props:s,_owner:hv.current}}Ls.Fragment=uv,Ls.jsx=uc,Ls.jsxs=uc,oc.exports=Ls;var Ft=oc.exports,pn=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(pn||{});let lc;function hc(){return lc=document.body,lc}function we(e,t,r){let n;return q.useEffect(()=>{n=n||hc();const s=a=>{const u=a.detail;t(u)};return n.addEventListener(e,s,!1),()=>{n==null||n.removeEventListener(e,s,!1)}},r),s=>{n=s}}function Vn(e,t){const r=hc(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function fv(){let e;function t(r){e=r}return t.emit=function(r,n){const s=new CustomEvent(r,{bubbles:!0,detail:n});e==null||e.dispatchEvent(s)},t}const gn=it.createContext({}),ue={STOP:"GSAP_STOP",PAUSE:"GSAP_PAUSE",PLAY:"GSAP_PLAY",RESUME:"GSAP_RESUME",RESTART:"GSAP_RESTART",REPEAT:"GSAP_REPEAT",SEEK:"GSAP_SEEK",RESET:"GSAP_RESET",COMPLETE:"GSAP_COMPLETE",SEEK_START:"GSAP_SEEK_START",SEEK_END:"GSAP_SEEK_END",SCRUBBER_SEEK:"GSAP_SCRUBBER_SEEK",SCRUBBER_PROGRESS_UPDATE:"GSAP_SCRUBBER_PROGRESS_UPDATE",SCRUBBER_PLAY:"GSAP_SCRUBBER_PLAY",SCRUBBER_PAUSE:"GSAP_SCRUBBER_PAUSE",SCRUBBER_CLICKED:"GSAP_SCRUBBER_CLICKED",TRANSFORMER_DRAG_START:"TRANSFORMER_DRAG_START",TRANSFORMER_DRAG_END:"TRANSFORMER_DRAG_END",REVERSE_MODE_START:"REVERSE_MODE_START",REVERSE_MODE_END:"REVERSE_MODE_END"},dv=({children:e})=>{const[t,r]=q.useState(0),n=q.useRef(),s=q.useRef(),a=q.useRef(.001),u=q.useRef(!1),l=q.useRef(!1);q.useLayoutEffect(()=>(s.current=oe.context(()=>{n.current&&n.current.progress(0).kill(),n.current&&n.current.clear(),n.current&&oe.killTweensOf(n.current),n.current=oe.timeline({paused:!0,defaults:{duration:0}})}),()=>{n.current&&(n.current.progress(0).kill(),oe.killTweensOf(n.current)),s.current.revert()}),[]);const c=q.useCallback(()=>{if(n.current){let I=n.current.time();I<a.current?u.current=!0:u.current=!1,a.current=I}},[]);q.useEffect(()=>{if(n.current){const w=n.current;w.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){w.pause(),c()}).eventCallback("onUpdate",function(){c()}).eventCallback("onComplete",function(){w.pause(),w.revert(),Vn(ue.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),c()})}},[]);const f=q.useCallback(()=>{n.current&&n.current.revert()},[]),p=q.useCallback(()=>{n.current&&n.current.restart()},[]),m=q.useCallback(()=>{if(n.current){const w=n.current;w.repeat(1),w.restart()}},[]),g=q.useCallback(w=>{n.current&&n.current.seek(w)},[]),x=q.useCallback(()=>{n.current&&n.current.seek(4)},[]),y=q.useCallback(()=>{const w=n.current;return w?w.totalDuration():0},[]),S=()=>{n.current&&(n.current.pause(),Vn(ue.PAUSE))},T=()=>{n.current&&(n.current.resume(),Vn(ue.RESUME))};return we(ue.SEEK_START,()=>{l.current=!0}),we(ue.SCRUBBER_PLAY,()=>{T()}),we(ue.SCRUBBER_PAUSE,()=>{S()}),we(ue.SCRUBBER_SEEK,w=>{g(w)}),we(ue.SEEK_END,()=>{l.current=!1}),we(ue.REVERSE_MODE_START,()=>{u.current=!0}),we(ue.REVERSE_MODE_END,()=>{u.current=!1}),we(ue.SCRUBBER_PROGRESS_UPDATE,w=>{}),Ft.jsx(gn.Provider,{value:{gsapCtx:s,tl:n,handlePlay:T,handlePause:S,handleReset:f,handleSeek:g,handleSeekTest:x,handleRestart:p,handleRepeat:m,playerTimeRef:a,getTimelineDuration:y,totalDuration:t,setTotalDuration:r,reverseModeRef:u,dragModeRef:l},children:e})},pv=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:s,mouseoverEvent:a,onDoubleClick:u,uniqueId:l="",isText:c=!1})=>{const f=Fr.utils.string2hex("#F3C409"),p=Fr.utils.string2hex("#F3C409"),m=it.useRef({isDragging:!1}),g=300,x=it.useRef(0),y=it.useCallback(()=>{a&&!m.current.isDragging&&a(!0)},[a]),S=it.useCallback(()=>{a&&!m.current.isDragging&&a(!1)},[a]),T=it.useCallback(()=>{m.current.isDragging=!0;const A=new Date().getTime();A-x.current<g&&u&&u(),x.current=A},[]),w=it.useCallback(A=>{m.current.isDragging=!0,s&&s(A),Vn(ue.TRANSFORMER_DRAG_START,{uniqueId:"timeline"})},[s]),I=it.useCallback(()=>{if(t.current===null)return;const A=t.current.x,R=t.current.y,N=t.current.width,B=t.current.height,L=t.current.rotation,O=[t.current.scale.x,t.current.scale.y],z=O[0]<0?-1:1,X=O[1]<0?-1:1;n&&(n({uniqueId:l,transformation:{x:Math.round(A),y:Math.round(R),width:Math.round(Math.max(5,N)),height:Math.round(Math.max(5,B)),rotation:L,scale:c?O:[z,X]}}),Vn(ue.TRANSFORMER_DRAG_END,{uniqueId:"timeline"})),m.current.isDragging=!1},[n]);return it.useEffect(()=>(e.current&&(e.current.on("mouseover",y),e.current.on("mouseout",S),e.current.on("mousedown",T)),()=>{e.current&&(e.current.off("mouseover",y),e.current.off("mouseout",S),e.current.off("mousedown",T))}),[]),Ft.jsx(nv.Transformer,{ref:e,group:r?[t.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:2,color:p},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:f,shape:"circle",radius:10},transformchange:w,transformcommit:I})};var gv=Object.prototype;function mv(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||gv;return e===r}var cc=mv;function vv(e,t){return function(r){return e(t(r))}}var yv=vv,_v=yv,xv=_v(Object.keys,Object),bv=xv,Tv=cc,wv=bv,Sv=Object.prototype,Av=Sv.hasOwnProperty;function Cv(e){if(!Tv(e))return wv(e);var t=[];for(var r in Object(e))Av.call(e,r)&&r!="constructor"&&t.push(r);return t}var fc=Cv,Ev=typeof We=="object"&&We&&We.Object===Object&&We,dc=Ev,Iv=dc,Rv=typeof self=="object"&&self&&self.Object===Object&&self,Pv=Iv||Rv||Function("return this")(),Tr=Pv,Mv=Tr,Ov=Mv.Symbol,ks=Ov,pc=ks,gc=Object.prototype,Fv=gc.hasOwnProperty,Nv=gc.toString,Gi=pc?pc.toStringTag:void 0;function Lv(e){var t=Fv.call(e,Gi),r=e[Gi];try{e[Gi]=void 0;var n=!0}catch{}var s=Nv.call(e);return n&&(t?e[Gi]=r:delete e[Gi]),s}var kv=Lv,Bv=Object.prototype,Dv=Bv.toString;function Uv(e){return Dv.call(e)}var $v=Uv,mc=ks,Gv=kv,zv=$v,Hv="[object Null]",Vv="[object Undefined]",vc=mc?mc.toStringTag:void 0;function jv(e){return e==null?e===void 0?Vv:Hv:vc&&vc in Object(e)?Gv(e):zv(e)}var zi=jv;function Xv(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Hi=Xv,Wv=zi,qv=Hi,Yv="[object AsyncFunction]",Kv="[object Function]",Zv="[object GeneratorFunction]",Jv="[object Proxy]";function Qv(e){if(!qv(e))return!1;var t=Wv(e);return t==Kv||t==Zv||t==Yv||t==Jv}var yc=Qv,ty=Tr,ey=ty["__core-js_shared__"],ry=ey,$o=ry,_c=function(){var e=/[^.]+$/.exec($o&&$o.keys&&$o.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ny(e){return!!_c&&_c in e}var iy=ny,sy=Function.prototype,ay=sy.toString;function oy(e){if(e!=null){try{return ay.call(e)}catch{}try{return e+""}catch{}}return""}var xc=oy,uy=yc,ly=iy,hy=Hi,cy=xc,fy=/[\\^$.*+?()[\]{}|]/g,dy=/^\[object .+?Constructor\]$/,py=Function.prototype,gy=Object.prototype,my=py.toString,vy=gy.hasOwnProperty,yy=RegExp("^"+my.call(vy).replace(fy,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _y(e){if(!hy(e)||ly(e))return!1;var t=uy(e)?yy:dy;return t.test(cy(e))}var xy=_y;function by(e,t){return e==null?void 0:e[t]}var Ty=by,wy=xy,Sy=Ty;function Ay(e,t){var r=Sy(e,t);return wy(r)?r:void 0}var jn=Ay,Cy=jn,Ey=Tr,Iy=Cy(Ey,"DataView"),Ry=Iy,Py=jn,My=Tr,Oy=Py(My,"Map"),Go=Oy,Fy=jn,Ny=Tr,Ly=Fy(Ny,"Promise"),ky=Ly,By=jn,Dy=Tr,Uy=By(Dy,"Set"),$y=Uy,Gy=jn,zy=Tr,Hy=Gy(zy,"WeakMap"),Vy=Hy,zo=Ry,Ho=Go,Vo=ky,jo=$y,Xo=Vy,bc=zi,Xn=xc,Tc="[object Map]",jy="[object Object]",wc="[object Promise]",Sc="[object Set]",Ac="[object WeakMap]",Cc="[object DataView]",Xy=Xn(zo),Wy=Xn(Ho),qy=Xn(Vo),Yy=Xn(jo),Ky=Xn(Xo),mn=bc;(zo&&mn(new zo(new ArrayBuffer(1)))!=Cc||Ho&&mn(new Ho)!=Tc||Vo&&mn(Vo.resolve())!=wc||jo&&mn(new jo)!=Sc||Xo&&mn(new Xo)!=Ac)&&(mn=function(e){var t=bc(e),r=t==jy?e.constructor:void 0,n=r?Xn(r):"";if(n)switch(n){case Xy:return Cc;case Wy:return Tc;case qy:return wc;case Yy:return Sc;case Ky:return Ac}return t});var Ec=mn;function Zy(e){return e!=null&&typeof e=="object"}var Vi=Zy,Jy=zi,Qy=Vi,t_="[object Arguments]";function e_(e){return Qy(e)&&Jy(e)==t_}var r_=e_,Ic=r_,n_=Vi,Rc=Object.prototype,i_=Rc.hasOwnProperty,s_=Rc.propertyIsEnumerable,a_=Ic(function(){return arguments}())?Ic:function(e){return n_(e)&&i_.call(e,"callee")&&!s_.call(e,"callee")},Wo=a_,o_=Array.isArray,wr=o_,u_=9007199254740991;function l_(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=u_}var qo=l_,h_=yc,c_=qo;function f_(e){return e!=null&&c_(e.length)&&!h_(e)}var Bs=f_,Ds={exports:{}};function d_(){return!1}var p_=d_;Ds.exports,function(e,t){var r=Tr,n=p_,s=t&&!t.nodeType&&t,a=s&&!0&&e&&!e.nodeType&&e,u=a&&a.exports===s,l=u?r.Buffer:void 0,c=l?l.isBuffer:void 0,f=c||n;e.exports=f}(Ds,Ds.exports);var Yo=Ds.exports,g_=zi,m_=qo,v_=Vi,y_="[object Arguments]",__="[object Array]",x_="[object Boolean]",b_="[object Date]",T_="[object Error]",w_="[object Function]",S_="[object Map]",A_="[object Number]",C_="[object Object]",E_="[object RegExp]",I_="[object Set]",R_="[object String]",P_="[object WeakMap]",M_="[object ArrayBuffer]",O_="[object DataView]",F_="[object Float32Array]",N_="[object Float64Array]",L_="[object Int8Array]",k_="[object Int16Array]",B_="[object Int32Array]",D_="[object Uint8Array]",U_="[object Uint8ClampedArray]",$_="[object Uint16Array]",G_="[object Uint32Array]",Yt={};Yt[F_]=Yt[N_]=Yt[L_]=Yt[k_]=Yt[B_]=Yt[D_]=Yt[U_]=Yt[$_]=Yt[G_]=!0,Yt[y_]=Yt[__]=Yt[M_]=Yt[x_]=Yt[O_]=Yt[b_]=Yt[T_]=Yt[w_]=Yt[S_]=Yt[A_]=Yt[C_]=Yt[E_]=Yt[I_]=Yt[R_]=Yt[P_]=!1;function z_(e){return v_(e)&&m_(e.length)&&!!Yt[g_(e)]}var H_=z_;function V_(e){return function(t){return e(t)}}var j_=V_,Us={exports:{}};Us.exports,function(e,t){var r=dc,n=t&&!t.nodeType&&t,s=n&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===n,u=a&&r.process,l=function(){try{var c=s&&s.require&&s.require("util").types;return c||u&&u.binding&&u.binding("util")}catch{}}();e.exports=l}(Us,Us.exports);var X_=Us.exports,W_=H_,q_=j_,Pc=X_,Mc=Pc&&Pc.isTypedArray,Y_=Mc?q_(Mc):W_,Ko=Y_,K_=fc,Z_=Ec,J_=Wo,Q_=wr,tx=Bs,ex=Yo,rx=cc,nx=Ko,ix="[object Map]",sx="[object Set]",ax=Object.prototype,ox=ax.hasOwnProperty;function ux(e){if(e==null)return!0;if(tx(e)&&(Q_(e)||typeof e=="string"||typeof e.splice=="function"||ex(e)||nx(e)||J_(e)))return!e.length;var t=Z_(e);if(t==ix||t==sx)return!e.size;if(rx(e))return!K_(e).length;for(var r in e)if(ox.call(e,r))return!1;return!0}var lx=ux;const Zo=Hn(lx);var Jo=(e=>(e.NONE="none",e.NORMAL="normal",e.LENSFLARE="lensflare",e.FILMSTRIP="filmstrip",e.GRUNGE="grunge",e.BRICKS="bricks",e))(Jo||{});const Oc={normal:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/eyecast_lensflare_overlay_50.jpg",blendmode:"ADD",alpha:0},lensflare:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/eyecast_lensflare_overlay_50.jpg",blendmode:"ADD",alpha:1},filmstrip:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/frames_filmstrip_5.png",blendmode:"ADD",alpha:1},grunge:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/pixi_overlay_grunge_60.jpg",blendmode:"ADD",alpha:1},bricks:{src:"https://eyecastvideoeditorfiles.s3.ap-southeast-2.amazonaws.com/assets/overlays/bricks_Overlay_100.jpg",blendmode:"MULTIPLY",alpha:1}},hx=e=>{const{overlay:t,width:r,height:n,x:s,y:a}=e,{src:u,blendmode:l}=Oc[t]||Oc.normal;return Ft.jsx(Qt.TilingSprite,{image:u,width:r,height:n,x:s,y:a,tilePosition:{x:0,y:0},tileScale:.5,alpha:.5,anchor:.5})},cx=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Wn=it.forwardRef((e,t)=>{const[r,n]=it.useState(!1),[s,a]=q.useState(!1),[u,l]=q.useState(!1),c=q.useRef(null),f=q.useRef(null),p=q.useRef(null),m=q.useRef(null),{uniqueId:g,visible:x,transformation:{x:y,y:S,width:T,height:w,scale:I=[1,1],rotation:A=0,effect:R,overlay:N},applyTransformer:B,disabled:L,pointerdown:O,pointerout:z,pointerover:X,isText:tt,isDragging:st,isGif:V,onDoubleClick:j,isTextEditMode:bt}=e;we(ue.COMPLETE,()=>{c.current}),it.useImperativeHandle(t,()=>({getIsTransformerDragging:()=>s,getIsMouseOverTransformer:()=>u}),[s,u]),it.useEffect(()=>{c.current&&n(!0)},[]);const kt=it.useCallback(()=>{l(!0),X&&X()},[]),G=it.useCallback(()=>{a(!0)},[]),rt=it.useCallback(H=>{e.onAnchorTransformationEnd&&e.onAnchorTransformationEnd(H),a(!1)},[]),gt=Qt.withFilters(Qt.Container,{matrix:Fr.filters.ColorMatrixFilter});return Ft.jsxs(Qt.Container,{ref:f,children:[Ft.jsxs(Qt.Container,{ref:c,position:[y,S],pivot:[y,S],width:T,height:w,scale:I,rotation:A,...!L&&x&&!s&&!st&&{interactive:!0,buttonMode:!0,pointerdown:O,pointerover:X,pointerout:z},children:[!V&&Ft.jsx(gt,{scale:1,apply:({matrix:H})=>{R===pn.BlackAndWhite?H.desaturate():R===pn.Sepia?H.sepia():R===pn.RetroVintage||R===pn.NightVision?H.negative():R===pn.Normal&&H.reset()},matrix:{enabled:!0,matrix:cx},children:Ft.jsx(Qt.Container,{ref:p,children:e.children})}),V&&Ft.jsx(Qt.Container,{ref:p,children:e.children}),!Zo(N)&&N!==Jo.NONE&&N!==Jo.NORMAL&&Ft.jsx(hx,{overlay:N,width:T,height:w,x:y,y:S})]}),B&&x&&!bt&&Ft.jsx(pv,{pixiTransformerRef:m,imageRef:c,isMounted:r,transformCommit:rt,transformChange:G,mouseoverEvent:kt,uniqueId:g,isText:tt,onDoubleClick:j})]})});Wn.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};var vn=(e=>(e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2",e))(vn||{}),Fc=(e=>(e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS",e))(Fc||{}),Qo=(e=>(e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e))(Qo||{}),ht=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR",e))(ht||{}),Kr=(e=>(e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN",e))(Kr||{}),Z=(e=>(e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.RG=33319]="RG",e[e.RED=6403]="RED",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e))(Z||{}),qn=(e=>(e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e))(qn||{}),Nt=(e=>(e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.BYTE=5120]="BYTE",e[e.SHORT=5122]="SHORT",e[e.INT=5124]="INT",e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",e[e.HALF_FLOAT=36193]="HALF_FLOAT",e))(Nt||{}),tu=(e=>(e[e.FLOAT=0]="FLOAT",e[e.INT=1]="INT",e[e.UINT=2]="UINT",e))(tu||{}),Sr=(e=>(e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR",e))(Sr||{}),ji=(e=>(e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",e))(ji||{}),yn=(e=>(e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON",e[e.ON_MANUAL=3]="ON_MANUAL",e))(yn||{}),Zr=(e=>(e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",e))(Zr||{}),_n=(e=>(e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT",e))(_n||{}),eu=(e=>(e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL",e))(eu||{}),qe=(e=>(e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp",e))(qe||{}),de=(e=>(e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE",e[e.COLOR=4]="COLOR",e))(de||{}),fe=(e=>(e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH",e))(fe||{}),Ar=(e=>(e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e))(Ar||{});const xt={ADAPTER:{createCanvas:(e,t)=>{const r=document.createElement("canvas");return r.width=e,r.height=t,r},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(e,t)=>fetch(e,t),parseXML:e=>new DOMParser().parseFromString(e,"text/xml")},RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var ru=/iPhone/i,Nc=/iPod/i,Lc=/iPad/i,kc=/\biOS-universal(?:.+)Mac\b/i,nu=/\bAndroid(?:.+)Mobile\b/i,Bc=/Android/i,Yn=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,$s=/Silk/i,Nr=/Windows Phone/i,Dc=/\bWindows(?:.+)ARM\b/i,Uc=/BlackBerry/i,$c=/BB10/i,Gc=/Opera Mini/i,zc=/\b(CriOS|Chrome)(?:.+)Mobile/i,Hc=/Mobile(?:.+)Firefox\b/i,Vc=function(e){return typeof e<"u"&&e.platform==="MacIntel"&&typeof e.maxTouchPoints=="number"&&e.maxTouchPoints>1&&typeof MSStream>"u"};function fx(e){return function(t){return t.test(e)}}function jc(e){var t={userAgent:"",platform:"",maxTouchPoints:0};!e&&typeof navigator<"u"?t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof e=="string"?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0});var r=t.userAgent,n=r.split("[FBAN");typeof n[1]<"u"&&(r=n[0]),n=r.split("Twitter"),typeof n[1]<"u"&&(r=n[0]);var s=fx(r),a={apple:{phone:s(ru)&&!s(Nr),ipod:s(Nc),tablet:!s(ru)&&(s(Lc)||Vc(t))&&!s(Nr),universal:s(kc),device:(s(ru)||s(Nc)||s(Lc)||s(kc)||Vc(t))&&!s(Nr)},amazon:{phone:s(Yn),tablet:!s(Yn)&&s($s),device:s(Yn)||s($s)},android:{phone:!s(Nr)&&s(Yn)||!s(Nr)&&s(nu),tablet:!s(Nr)&&!s(Yn)&&!s(nu)&&(s($s)||s(Bc)),device:!s(Nr)&&(s(Yn)||s($s)||s(nu)||s(Bc))||s(/\bokhttp\b/i)},windows:{phone:s(Nr),tablet:s(Dc),device:s(Nr)||s(Dc)},other:{blackberry:s(Uc),blackberry10:s($c),opera:s(Gc),firefox:s(Hc),chrome:s(zc),device:s(Uc)||s($c)||s(Gc)||s(Hc)||s(zc)},any:!1,phone:!1,tablet:!1};return a.any=a.apple.device||a.android.device||a.windows.device||a.other.device,a.phone=a.apple.phone||a.android.phone||a.windows.phone,a.tablet=a.apple.tablet||a.android.tablet||a.windows.tablet,a}const Kn=(jc.default??jc)(globalThis.navigator);xt.RETINA_PREFIX=/@([0-9\.]+)x/,xt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Xc={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function s(c,f,p){this.fn=c,this.context=f,this.once=p||!1}function a(c,f,p,m,g){if(typeof p!="function")throw new TypeError("The listener must be a function");var x=new s(p,m||c,g),y=r?r+f:f;return c._events[y]?c._events[y].fn?c._events[y]=[c._events[y],x]:c._events[y].push(x):(c._events[y]=x,c._eventsCount++),c}function u(c,f){--c._eventsCount===0?c._events=new n:delete c._events[f]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var f=[],p,m;if(this._eventsCount===0)return f;for(m in p=this._events)t.call(p,m)&&f.push(r?m.slice(1):m);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(p)):f},l.prototype.listeners=function(f){var p=r?r+f:f,m=this._events[p];if(!m)return[];if(m.fn)return[m.fn];for(var g=0,x=m.length,y=new Array(x);g<x;g++)y[g]=m[g].fn;return y},l.prototype.listenerCount=function(f){var p=r?r+f:f,m=this._events[p];return m?m.fn?1:m.length:0},l.prototype.emit=function(f,p,m,g,x,y){var S=r?r+f:f;if(!this._events[S])return!1;var T=this._events[S],w=arguments.length,I,A;if(T.fn){switch(T.once&&this.removeListener(f,T.fn,void 0,!0),w){case 1:return T.fn.call(T.context),!0;case 2:return T.fn.call(T.context,p),!0;case 3:return T.fn.call(T.context,p,m),!0;case 4:return T.fn.call(T.context,p,m,g),!0;case 5:return T.fn.call(T.context,p,m,g,x),!0;case 6:return T.fn.call(T.context,p,m,g,x,y),!0}for(A=1,I=new Array(w-1);A<w;A++)I[A-1]=arguments[A];T.fn.apply(T.context,I)}else{var R=T.length,N;for(A=0;A<R;A++)switch(T[A].once&&this.removeListener(f,T[A].fn,void 0,!0),w){case 1:T[A].fn.call(T[A].context);break;case 2:T[A].fn.call(T[A].context,p);break;case 3:T[A].fn.call(T[A].context,p,m);break;case 4:T[A].fn.call(T[A].context,p,m,g);break;default:if(!I)for(N=1,I=new Array(w-1);N<w;N++)I[N-1]=arguments[N];T[A].fn.apply(T[A].context,I)}}return!0},l.prototype.on=function(f,p,m){return a(this,f,p,m,!1)},l.prototype.once=function(f,p,m){return a(this,f,p,m,!0)},l.prototype.removeListener=function(f,p,m,g){var x=r?r+f:f;if(!this._events[x])return this;if(!p)return u(this,x),this;var y=this._events[x];if(y.fn)y.fn===p&&(!g||y.once)&&(!m||y.context===m)&&u(this,x);else{for(var S=0,T=[],w=y.length;S<w;S++)(y[S].fn!==p||g&&!y[S].once||m&&y[S].context!==m)&&T.push(y[S]);T.length?this._events[x]=T.length===1?T[0]:T:u(this,x)}return this},l.prototype.removeAllListeners=function(f){var p;return f?(p=r?r+f:f,this._events[p]&&u(this,p)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=r,l.EventEmitter=l,e.exports=l})(Xc);var dx=Xc.exports;const Gs=Hn(dx);var iu={exports:{}};iu.exports=zs,iu.exports.default=zs;function zs(e,t,r){r=r||2;var n=t&&t.length,s=n?t[0]*r:e.length,a=Wc(e,0,s,r,!0),u=[];if(!a||a.next===a.prev)return u;var l,c,f,p,m,g,x;if(n&&(a=yx(e,t,a,r)),e.length>80*r){l=f=e[0],c=p=e[1];for(var y=r;y<s;y+=r)m=e[y],g=e[y+1],m<l&&(l=m),g<c&&(c=g),m>f&&(f=m),g>p&&(p=g);x=Math.max(f-l,p-c),x=x!==0?32767/x:0}return Xi(a,u,r,l,c,x,0),u}function Wc(e,t,r,n,s){var a,u;if(s===ou(e,t,r,n)>0)for(a=t;a<r;a+=n)u=Kc(a,e[a],e[a+1],u);else for(a=r-n;a>=t;a-=n)u=Kc(a,e[a],e[a+1],u);return u&&Hs(u,u.next)&&(qi(u),u=u.next),u}function xn(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(Hs(r,r.next)||re(r.prev,r,r.next)===0)){if(qi(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function Xi(e,t,r,n,s,a,u){if(e){!u&&a&&wx(e,n,s,a);for(var l=e,c,f;e.prev!==e.next;){if(c=e.prev,f=e.next,a?gx(e,n,s,a):px(e)){t.push(c.i/r|0),t.push(e.i/r|0),t.push(f.i/r|0),qi(e),e=f.next,l=f.next;continue}if(e=f,e===l){u?u===1?(e=mx(xn(e),t,r),Xi(e,t,r,n,s,a,2)):u===2&&vx(e,t,r,n,s,a):Xi(xn(e),t,r,n,s,a,1);break}}}}function px(e){var t=e.prev,r=e,n=e.next;if(re(t,r,n)>=0)return!1;for(var s=t.x,a=r.x,u=n.x,l=t.y,c=r.y,f=n.y,p=s<a?s<u?s:u:a<u?a:u,m=l<c?l<f?l:f:c<f?c:f,g=s>a?s>u?s:u:a>u?a:u,x=l>c?l>f?l:f:c>f?c:f,y=n.next;y!==t;){if(y.x>=p&&y.x<=g&&y.y>=m&&y.y<=x&&Zn(s,l,a,c,u,f,y.x,y.y)&&re(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function gx(e,t,r,n){var s=e.prev,a=e,u=e.next;if(re(s,a,u)>=0)return!1;for(var l=s.x,c=a.x,f=u.x,p=s.y,m=a.y,g=u.y,x=l<c?l<f?l:f:c<f?c:f,y=p<m?p<g?p:g:m<g?m:g,S=l>c?l>f?l:f:c>f?c:f,T=p>m?p>g?p:g:m>g?m:g,w=su(x,y,t,r,n),I=su(S,T,t,r,n),A=e.prevZ,R=e.nextZ;A&&A.z>=w&&R&&R.z<=I;){if(A.x>=x&&A.x<=S&&A.y>=y&&A.y<=T&&A!==s&&A!==u&&Zn(l,p,c,m,f,g,A.x,A.y)&&re(A.prev,A,A.next)>=0||(A=A.prevZ,R.x>=x&&R.x<=S&&R.y>=y&&R.y<=T&&R!==s&&R!==u&&Zn(l,p,c,m,f,g,R.x,R.y)&&re(R.prev,R,R.next)>=0))return!1;R=R.nextZ}for(;A&&A.z>=w;){if(A.x>=x&&A.x<=S&&A.y>=y&&A.y<=T&&A!==s&&A!==u&&Zn(l,p,c,m,f,g,A.x,A.y)&&re(A.prev,A,A.next)>=0)return!1;A=A.prevZ}for(;R&&R.z<=I;){if(R.x>=x&&R.x<=S&&R.y>=y&&R.y<=T&&R!==s&&R!==u&&Zn(l,p,c,m,f,g,R.x,R.y)&&re(R.prev,R,R.next)>=0)return!1;R=R.nextZ}return!0}function mx(e,t,r){var n=e;do{var s=n.prev,a=n.next.next;!Hs(s,a)&&qc(s,n,n.next,a)&&Wi(s,a)&&Wi(a,s)&&(t.push(s.i/r|0),t.push(n.i/r|0),t.push(a.i/r|0),qi(n),qi(n.next),n=e=a),n=n.next}while(n!==e);return xn(n)}function vx(e,t,r,n,s,a){var u=e;do{for(var l=u.next.next;l!==u.prev;){if(u.i!==l.i&&Cx(u,l)){var c=Yc(u,l);u=xn(u,u.next),c=xn(c,c.next),Xi(u,t,r,n,s,a,0),Xi(c,t,r,n,s,a,0);return}l=l.next}u=u.next}while(u!==e)}function yx(e,t,r,n){var s=[],a,u,l,c,f;for(a=0,u=t.length;a<u;a++)l=t[a]*n,c=a<u-1?t[a+1]*n:e.length,f=Wc(e,l,c,n,!1),f===f.next&&(f.steiner=!0),s.push(Ax(f));for(s.sort(_x),a=0;a<s.length;a++)r=xx(s[a],r);return r}function _x(e,t){return e.x-t.x}function xx(e,t){var r=bx(e,t);if(!r)return t;var n=Yc(r,e);return xn(n,n.next),xn(r,r.next)}function bx(e,t){var r=t,n=e.x,s=e.y,a=-1/0,u;do{if(s<=r.y&&s>=r.next.y&&r.next.y!==r.y){var l=r.x+(s-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(l<=n&&l>a&&(a=l,u=r.x<r.next.x?r:r.next,l===n))return u}r=r.next}while(r!==t);if(!u)return null;var c=u,f=u.x,p=u.y,m=1/0,g;r=u;do n>=r.x&&r.x>=f&&n!==r.x&&Zn(s<p?n:a,s,f,p,s<p?a:n,s,r.x,r.y)&&(g=Math.abs(s-r.y)/(n-r.x),Wi(r,e)&&(g<m||g===m&&(r.x>u.x||r.x===u.x&&Tx(u,r)))&&(u=r,m=g)),r=r.next;while(r!==c);return u}function Tx(e,t){return re(e.prev,e,t.prev)<0&&re(t.next,e,e.next)<0}function wx(e,t,r,n){var s=e;do s.z===0&&(s.z=su(s.x,s.y,t,r,n)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==e);s.prevZ.nextZ=null,s.prevZ=null,Sx(s)}function Sx(e){var t,r,n,s,a,u,l,c,f=1;do{for(r=e,e=null,a=null,u=0;r;){for(u++,n=r,l=0,t=0;t<f&&(l++,n=n.nextZ,!!n);t++);for(c=f;l>0||c>0&&n;)l!==0&&(c===0||!n||r.z<=n.z)?(s=r,r=r.nextZ,l--):(s=n,n=n.nextZ,c--),a?a.nextZ=s:e=s,s.prevZ=a,a=s;r=n}a.nextZ=null,f*=2}while(u>1);return e}function su(e,t,r,n,s){return e=(e-r)*s|0,t=(t-n)*s|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function Ax(e){var t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function Zn(e,t,r,n,s,a,u,l){return(s-u)*(t-l)>=(e-u)*(a-l)&&(e-u)*(n-l)>=(r-u)*(t-l)&&(r-u)*(a-l)>=(s-u)*(n-l)}function Cx(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!Ex(e,t)&&(Wi(e,t)&&Wi(t,e)&&Ix(e,t)&&(re(e.prev,e,t.prev)||re(e,t.prev,t))||Hs(e,t)&&re(e.prev,e,e.next)>0&&re(t.prev,t,t.next)>0)}function re(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function Hs(e,t){return e.x===t.x&&e.y===t.y}function qc(e,t,r,n){var s=js(re(e,t,r)),a=js(re(e,t,n)),u=js(re(r,n,e)),l=js(re(r,n,t));return!!(s!==a&&u!==l||s===0&&Vs(e,r,t)||a===0&&Vs(e,n,t)||u===0&&Vs(r,e,n)||l===0&&Vs(r,t,n))}function Vs(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function js(e){return e>0?1:e<0?-1:0}function Ex(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&qc(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function Wi(e,t){return re(e.prev,e,e.next)<0?re(e,t,e.next)>=0&&re(e,e.prev,t)>=0:re(e,t,e.prev)<0||re(e,e.next,t)<0}function Ix(e,t){var r=e,n=!1,s=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&s<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function Yc(e,t){var r=new au(e.i,e.x,e.y),n=new au(t.i,t.x,t.y),s=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=s,s.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function Kc(e,t,r,n){var s=new au(e,t,r);return n?(s.next=n.next,s.prev=n,n.next.prev=s,n.next=s):(s.prev=s,s.next=s),s}function qi(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function au(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}zs.deviation=function(e,t,r,n){var s=t&&t.length,a=s?t[0]*r:e.length,u=Math.abs(ou(e,0,a,r));if(s)for(var l=0,c=t.length;l<c;l++){var f=t[l]*r,p=l<c-1?t[l+1]*r:e.length;u-=Math.abs(ou(e,f,p,r))}var m=0;for(l=0;l<n.length;l+=3){var g=n[l]*r,x=n[l+1]*r,y=n[l+2]*r;m+=Math.abs((e[g]-e[y])*(e[x+1]-e[g+1])-(e[g]-e[x])*(e[y+1]-e[g+1]))}return u===0&&m===0?0:Math.abs((m-u)/u)};function ou(e,t,r,n){for(var s=0,a=t,u=r-n;a<r;a+=n)s+=(e[u]-e[a])*(e[a+1]+e[u+1]),u=a;return s}zs.flatten=function(e){for(var t=e[0][0].length,r={vertices:[],holes:[],dimensions:t},n=0,s=0;s<e.length;s++){for(var a=0;a<e[s].length;a++)for(var u=0;u<t;u++)r.vertices.push(e[s][a][u]);s>0&&(n+=e[s-1].length,r.holes.push(n))}return r};var Rx=iu.exports;const Px=Hn(Rx);var Xs={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Xs.exports,function(e,t){(function(r){var n=t&&!t.nodeType&&t,s=e&&!e.nodeType&&e,a=typeof We=="object"&&We;(a.global===a||a.window===a||a.self===a)&&(r=a);var u,l=2147483647,c=36,f=1,p=26,m=38,g=700,x=72,y=128,S="-",T=/^xn--/,w=/[^\x20-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,A={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},R=c-f,N=Math.floor,B=String.fromCharCode,L;function O(H){throw new RangeError(A[H])}function z(H,K){for(var ct=H.length,yt=[];ct--;)yt[ct]=K(H[ct]);return yt}function X(H,K){var ct=H.split("@"),yt="";ct.length>1&&(yt=ct[0]+"@",H=ct[1]),H=H.replace(I,".");var _t=H.split("."),Pt=z(_t,K).join(".");return yt+Pt}function tt(H){for(var K=[],ct=0,yt=H.length,_t,Pt;ct<yt;)_t=H.charCodeAt(ct++),_t>=55296&&_t<=56319&&ct<yt?(Pt=H.charCodeAt(ct++),(Pt&64512)==56320?K.push(((_t&1023)<<10)+(Pt&1023)+65536):(K.push(_t),ct--)):K.push(_t);return K}function st(H){return z(H,function(K){var ct="";return K>65535&&(K-=65536,ct+=B(K>>>10&1023|55296),K=56320|K&1023),ct+=B(K),ct}).join("")}function V(H){return H-48<10?H-22:H-65<26?H-65:H-97<26?H-97:c}function j(H,K){return H+22+75*(H<26)-((K!=0)<<5)}function bt(H,K,ct){var yt=0;for(H=ct?N(H/g):H>>1,H+=N(H/K);H>R*p>>1;yt+=c)H=N(H/R);return N(yt+(R+1)*H/(H+m))}function kt(H){var K=[],ct=H.length,yt,_t=0,Pt=y,Ot=x,Ht,Vt,Kt,J,W,at,Ct,Et,Zt;for(Ht=H.lastIndexOf(S),Ht<0&&(Ht=0),Vt=0;Vt<Ht;++Vt)H.charCodeAt(Vt)>=128&&O("not-basic"),K.push(H.charCodeAt(Vt));for(Kt=Ht>0?Ht+1:0;Kt<ct;){for(J=_t,W=1,at=c;Kt>=ct&&O("invalid-input"),Ct=V(H.charCodeAt(Kt++)),(Ct>=c||Ct>N((l-_t)/W))&&O("overflow"),_t+=Ct*W,Et=at<=Ot?f:at>=Ot+p?p:at-Ot,!(Ct<Et);at+=c)Zt=c-Et,W>N(l/Zt)&&O("overflow"),W*=Zt;yt=K.length+1,Ot=bt(_t-J,yt,J==0),N(_t/yt)>l-Pt&&O("overflow"),Pt+=N(_t/yt),_t%=yt,K.splice(_t++,0,Pt)}return st(K)}function G(H){var K,ct,yt,_t,Pt,Ot,Ht,Vt,Kt,J,W,at=[],Ct,Et,Zt,gr;for(H=tt(H),Ct=H.length,K=y,ct=0,Pt=x,Ot=0;Ot<Ct;++Ot)W=H[Ot],W<128&&at.push(B(W));for(yt=_t=at.length,_t&&at.push(S);yt<Ct;){for(Ht=l,Ot=0;Ot<Ct;++Ot)W=H[Ot],W>=K&&W<Ht&&(Ht=W);for(Et=yt+1,Ht-K>N((l-ct)/Et)&&O("overflow"),ct+=(Ht-K)*Et,K=Ht,Ot=0;Ot<Ct;++Ot)if(W=H[Ot],W<K&&++ct>l&&O("overflow"),W==K){for(Vt=ct,Kt=c;J=Kt<=Pt?f:Kt>=Pt+p?p:Kt-Pt,!(Vt<J);Kt+=c)gr=Vt-J,Zt=c-J,at.push(B(j(J+gr%Zt,0))),Vt=N(gr/Zt);at.push(B(j(Vt,0))),Pt=bt(ct,Et,yt==_t),ct=0,++yt}++ct,++K}return at.join("")}function rt(H){return X(H,function(K){return T.test(K)?kt(K.slice(4).toLowerCase()):K})}function gt(H){return X(H,function(K){return w.test(K)?"xn--"+G(K):K})}if(u={version:"1.4.1",ucs2:{decode:tt,encode:st},decode:kt,encode:G,toASCII:gt,toUnicode:rt},n&&s)if(e.exports==n)s.exports=u;else for(L in u)u.hasOwnProperty(L)&&(n[L]=u[L]);else r.punycode=u})(We)}(Xs,Xs.exports);var Mx=Xs.exports,Ox=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var s=42;t[r]=s;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,r);if(u.value!==s||u.enumerable!==!0)return!1}return!0},Zc=typeof Symbol<"u"&&Symbol,Fx=Ox,Nx=function(){return typeof Zc!="function"||typeof Symbol!="function"||typeof Zc("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Fx()},Jc={foo:{}},Lx=Object,kx=function(){return{__proto__:Jc}.foo===Jc.foo&&!({__proto__:null}instanceof Lx)},Bx="Function.prototype.bind called on incompatible ",uu=Array.prototype.slice,Dx=Object.prototype.toString,Ux="[object Function]",$x=function(t){var r=this;if(typeof r!="function"||Dx.call(r)!==Ux)throw new TypeError(Bx+r);for(var n=uu.call(arguments,1),s,a=function(){if(this instanceof s){var p=r.apply(this,n.concat(uu.call(arguments)));return Object(p)===p?p:this}else return r.apply(t,n.concat(uu.call(arguments)))},u=Math.max(0,r.length-n.length),l=[],c=0;c<u;c++)l.push("$"+c);if(s=Function("binder","return function ("+l.join(",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var f=function(){};f.prototype=r.prototype,s.prototype=new f,f.prototype=null}return s},Gx=$x,lu=Function.prototype.bind||Gx,zx=lu,Hx=zx.call(Function.call,Object.prototype.hasOwnProperty),wt,Jn=SyntaxError,Qc=Function,Qn=TypeError,hu=function(e){try{return Qc('"use strict"; return ('+e+").constructor;")()}catch{}},bn=Object.getOwnPropertyDescriptor;if(bn)try{bn({},"")}catch{bn=null}var cu=function(){throw new Qn},Vx=bn?function(){try{return arguments.callee,cu}catch{try{return bn(arguments,"callee").get}catch{return cu}}}():cu,ti=Nx(),jx=kx(),me=Object.getPrototypeOf||(jx?function(e){return e.__proto__}:null),ei={},Xx=typeof Uint8Array>"u"||!me?wt:me(Uint8Array),Tn={"%AggregateError%":typeof AggregateError>"u"?wt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?wt:ArrayBuffer,"%ArrayIteratorPrototype%":ti&&me?me([][Symbol.iterator]()):wt,"%AsyncFromSyncIteratorPrototype%":wt,"%AsyncFunction%":ei,"%AsyncGenerator%":ei,"%AsyncGeneratorFunction%":ei,"%AsyncIteratorPrototype%":ei,"%Atomics%":typeof Atomics>"u"?wt:Atomics,"%BigInt%":typeof BigInt>"u"?wt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?wt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?wt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?wt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?wt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?wt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?wt:FinalizationRegistry,"%Function%":Qc,"%GeneratorFunction%":ei,"%Int8Array%":typeof Int8Array>"u"?wt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?wt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?wt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ti&&me?me(me([][Symbol.iterator]())):wt,"%JSON%":typeof JSON=="object"?JSON:wt,"%Map%":typeof Map>"u"?wt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ti||!me?wt:me(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?wt:Promise,"%Proxy%":typeof Proxy>"u"?wt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?wt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?wt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ti||!me?wt:me(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?wt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ti&&me?me(""[Symbol.iterator]()):wt,"%Symbol%":ti?Symbol:wt,"%SyntaxError%":Jn,"%ThrowTypeError%":Vx,"%TypedArray%":Xx,"%TypeError%":Qn,"%Uint8Array%":typeof Uint8Array>"u"?wt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?wt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?wt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?wt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?wt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?wt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?wt:WeakSet};if(me)try{null.error}catch(e){var Wx=me(me(e));Tn["%Error.prototype%"]=Wx}var qx=function e(t){var r;if(t==="%AsyncFunction%")r=hu("async function () {}");else if(t==="%GeneratorFunction%")r=hu("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=hu("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var s=e("%AsyncGenerator%");s&&me&&(r=me(s.prototype))}return Tn[t]=r,r},tf={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Yi=lu,Ws=Hx,Yx=Yi.call(Function.call,Array.prototype.concat),Kx=Yi.call(Function.apply,Array.prototype.splice),ef=Yi.call(Function.call,String.prototype.replace),qs=Yi.call(Function.call,String.prototype.slice),Zx=Yi.call(Function.call,RegExp.prototype.exec),Jx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Qx=/\\(\\)?/g,t1=function(t){var r=qs(t,0,1),n=qs(t,-1);if(r==="%"&&n!=="%")throw new Jn("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Jn("invalid intrinsic syntax, expected opening `%`");var s=[];return ef(t,Jx,function(a,u,l,c){s[s.length]=l?ef(c,Qx,"$1"):u||a}),s},e1=function(t,r){var n=t,s;if(Ws(tf,n)&&(s=tf[n],n="%"+s[0]+"%"),Ws(Tn,n)){var a=Tn[n];if(a===ei&&(a=qx(n)),typeof a>"u"&&!r)throw new Qn("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:s,name:n,value:a}}throw new Jn("intrinsic "+t+" does not exist!")},fu=function(t,r){if(typeof t!="string"||t.length===0)throw new Qn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Qn('"allowMissing" argument must be a boolean');if(Zx(/^%?[^%]*%?$/,t)===null)throw new Jn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=t1(t),s=n.length>0?n[0]:"",a=e1("%"+s+"%",r),u=a.name,l=a.value,c=!1,f=a.alias;f&&(s=f[0],Kx(n,Yx([0,1],f)));for(var p=1,m=!0;p<n.length;p+=1){var g=n[p],x=qs(g,0,1),y=qs(g,-1);if((x==='"'||x==="'"||x==="`"||y==='"'||y==="'"||y==="`")&&x!==y)throw new Jn("property names with quotes must have matching quotes");if((g==="constructor"||!m)&&(c=!0),s+="."+g,u="%"+s+"%",Ws(Tn,u))l=Tn[u];else if(l!=null){if(!(g in l)){if(!r)throw new Qn("base intrinsic for "+t+" exists, but the property is not available.");return}if(bn&&p+1>=n.length){var S=bn(l,g);m=!!S,m&&"get"in S&&!("originalValue"in S.get)?l=S.get:l=l[g]}else m=Ws(l,g),l=l[g];m&&!c&&(Tn[u]=l)}}return l},rf={exports:{}};(function(e){var t=lu,r=fu,n=r("%Function.prototype.apply%"),s=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||t.call(s,n),u=r("%Object.getOwnPropertyDescriptor%",!0),l=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}e.exports=function(m){var g=a(t,s,arguments);if(u&&l){var x=u(g,"length");x.configurable&&l(g,"length",{value:1+c(0,m.length-(arguments.length-1))})}return g};var f=function(){return a(t,n,arguments)};l?l(e.exports,"apply",{value:f}):e.exports.apply=f})(rf);var r1=rf.exports,nf=fu,sf=r1,n1=sf(nf("String.prototype.indexOf")),i1=function(t,r){var n=nf(t,!!r);return typeof n=="function"&&n1(t,".prototype.")>-1?sf(n):n};const s1=sv(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var du=typeof Map=="function"&&Map.prototype,pu=Object.getOwnPropertyDescriptor&&du?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ys=du&&pu&&typeof pu.get=="function"?pu.get:null,af=du&&Map.prototype.forEach,gu=typeof Set=="function"&&Set.prototype,mu=Object.getOwnPropertyDescriptor&&gu?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ks=gu&&mu&&typeof mu.get=="function"?mu.get:null,of=gu&&Set.prototype.forEach,a1=typeof WeakMap=="function"&&WeakMap.prototype,Ki=a1?WeakMap.prototype.has:null,o1=typeof WeakSet=="function"&&WeakSet.prototype,Zi=o1?WeakSet.prototype.has:null,u1=typeof WeakRef=="function"&&WeakRef.prototype,uf=u1?WeakRef.prototype.deref:null,l1=Boolean.prototype.valueOf,h1=Object.prototype.toString,c1=Function.prototype.toString,f1=String.prototype.match,vu=String.prototype.slice,Jr=String.prototype.replace,d1=String.prototype.toUpperCase,lf=String.prototype.toLowerCase,hf=RegExp.prototype.test,cf=Array.prototype.concat,Cr=Array.prototype.join,p1=Array.prototype.slice,ff=Math.floor,yu=typeof BigInt=="function"?BigInt.prototype.valueOf:null,_u=Object.getOwnPropertySymbols,xu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ri=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Se=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ri||"symbol")?Symbol.toStringTag:null,df=Object.prototype.propertyIsEnumerable,pf=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function gf(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||hf.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-ff(-e):ff(e);if(n!==e){var s=String(n),a=vu.call(t,s.length+1);return Jr.call(s,r,"$&_")+"."+Jr.call(Jr.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Jr.call(t,r,"$&_")}var bu=s1,mf=bu.custom,vf=xf(mf)?mf:null,g1=function e(t,r,n,s){var a=r||{};if(Qr(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Qr(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var u=Qr(a,"customInspect")?a.customInspect:!0;if(typeof u!="boolean"&&u!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Qr(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Qr(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=a.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Tf(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return l?gf(t,c):c}if(typeof t=="bigint"){var f=String(t)+"n";return l?gf(t,f):f}var p=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=p&&p>0&&typeof t=="object")return Tu(t)?"[Array]":"[Object]";var m=F1(a,n);if(typeof s>"u")s=[];else if(bf(s,t)>=0)return"[Circular]";function g(V,j,bt){if(j&&(s=p1.call(s),s.push(j)),bt){var kt={depth:a.depth};return Qr(a,"quoteStyle")&&(kt.quoteStyle=a.quoteStyle),e(V,kt,n+1,s)}return e(V,a,n+1,s)}if(typeof t=="function"&&!_f(t)){var x=S1(t),y=Zs(t,g);return"[Function"+(x?": "+x:" (anonymous)")+"]"+(y.length>0?" { "+Cr.call(y,", ")+" }":"")}if(xf(t)){var S=ri?Jr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):xu.call(t);return typeof t=="object"&&!ri?Ji(S):S}if(P1(t)){for(var T="<"+lf.call(String(t.nodeName)),w=t.attributes||[],I=0;I<w.length;I++)T+=" "+w[I].name+"="+yf(m1(w[I].value),"double",a);return T+=">",t.childNodes&&t.childNodes.length&&(T+="..."),T+="</"+lf.call(String(t.nodeName))+">",T}if(Tu(t)){if(t.length===0)return"[]";var A=Zs(t,g);return m&&!O1(A)?"["+Su(A,m)+"]":"[ "+Cr.call(A,", ")+" ]"}if(y1(t)){var R=Zs(t,g);return!("cause"in Error.prototype)&&"cause"in t&&!df.call(t,"cause")?"{ ["+String(t)+"] "+Cr.call(cf.call("[cause]: "+g(t.cause),R),", ")+" }":R.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Cr.call(R,", ")+" }"}if(typeof t=="object"&&u){if(vf&&typeof t[vf]=="function"&&bu)return bu(t,{depth:p-n});if(u!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(A1(t)){var N=[];return af&&af.call(t,function(V,j){N.push(g(j,t,!0)+" => "+g(V,t))}),wf("Map",Ys.call(t),N,m)}if(I1(t)){var B=[];return of&&of.call(t,function(V){B.push(g(V,t))}),wf("Set",Ks.call(t),B,m)}if(C1(t))return wu("WeakMap");if(R1(t))return wu("WeakSet");if(E1(t))return wu("WeakRef");if(x1(t))return Ji(g(Number(t)));if(T1(t))return Ji(g(yu.call(t)));if(b1(t))return Ji(l1.call(t));if(_1(t))return Ji(g(String(t)));if(!v1(t)&&!_f(t)){var L=Zs(t,g),O=pf?pf(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",X=!O&&Se&&Object(t)===t&&Se in t?vu.call(tn(t),8,-1):z?"Object":"",tt=O||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",st=tt+(X||z?"["+Cr.call(cf.call([],X||[],z||[]),": ")+"] ":"");return L.length===0?st+"{}":m?st+"{"+Su(L,m)+"}":st+"{ "+Cr.call(L,", ")+" }"}return String(t)};function yf(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function m1(e){return Jr.call(String(e),/"/g,"&quot;")}function Tu(e){return tn(e)==="[object Array]"&&(!Se||!(typeof e=="object"&&Se in e))}function v1(e){return tn(e)==="[object Date]"&&(!Se||!(typeof e=="object"&&Se in e))}function _f(e){return tn(e)==="[object RegExp]"&&(!Se||!(typeof e=="object"&&Se in e))}function y1(e){return tn(e)==="[object Error]"&&(!Se||!(typeof e=="object"&&Se in e))}function _1(e){return tn(e)==="[object String]"&&(!Se||!(typeof e=="object"&&Se in e))}function x1(e){return tn(e)==="[object Number]"&&(!Se||!(typeof e=="object"&&Se in e))}function b1(e){return tn(e)==="[object Boolean]"&&(!Se||!(typeof e=="object"&&Se in e))}function xf(e){if(ri)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!xu)return!1;try{return xu.call(e),!0}catch{}return!1}function T1(e){if(!e||typeof e!="object"||!yu)return!1;try{return yu.call(e),!0}catch{}return!1}var w1=Object.prototype.hasOwnProperty||function(e){return e in this};function Qr(e,t){return w1.call(e,t)}function tn(e){return h1.call(e)}function S1(e){if(e.name)return e.name;var t=f1.call(c1.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function bf(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function A1(e){if(!Ys||!e||typeof e!="object")return!1;try{Ys.call(e);try{Ks.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function C1(e){if(!Ki||!e||typeof e!="object")return!1;try{Ki.call(e,Ki);try{Zi.call(e,Zi)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function E1(e){if(!uf||!e||typeof e!="object")return!1;try{return uf.call(e),!0}catch{}return!1}function I1(e){if(!Ks||!e||typeof e!="object")return!1;try{Ks.call(e);try{Ys.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function R1(e){if(!Zi||!e||typeof e!="object")return!1;try{Zi.call(e,Zi);try{Ki.call(e,Ki)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function P1(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Tf(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Tf(vu.call(e,0,t.maxStringLength),t)+n}var s=Jr.call(Jr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,M1);return yf(s,"single",t)}function M1(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+d1.call(t.toString(16))}function Ji(e){return"Object("+e+")"}function wu(e){return e+" { ? }"}function wf(e,t,r,n){var s=n?Su(r,n):Cr.call(r,", ");return e+" ("+t+") {"+s+"}"}function O1(e){for(var t=0;t<e.length;t++)if(bf(e[t],`
10
10
  `)>=0)return!1;return!0}function F1(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=Cr.call(Array(e.indent+1)," ");else return null;return{base:r,prev:Cr.call(Array(t+1),r)}}function Su(e,t){if(e.length===0)return"";var r=`
11
11
  `+t.prev+t.base;return r+Cr.call(e,","+r)+`
12
- `+t.prev}function Zs(e,t){var r=Tu(e),n=[];if(r){n.length=e.length;for(var s=0;s<e.length;s++)n[s]=Qr(e,s)?t(e[s],e):""}var a=typeof _u=="function"?_u(e):[],u;if(ri){u={};for(var l=0;l<a.length;l++)u["$"+a[l]]=a[l]}for(var c in e)Qr(e,c)&&(r&&String(Number(c))===c&&c<e.length||ri&&u["$"+c]instanceof Symbol||(hf.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if(typeof _u=="function")for(var f=0;f<a.length;f++)df.call(e,a[f])&&n.push("["+t(a[f])+"]: "+t(e[a[f]],e));return n}var Au=fu,ni=i1,N1=g1,L1=Au("%TypeError%"),Js=Au("%WeakMap%",!0),Qs=Au("%Map%",!0),k1=ni("WeakMap.prototype.get",!0),B1=ni("WeakMap.prototype.set",!0),D1=ni("WeakMap.prototype.has",!0),U1=ni("Map.prototype.get",!0),$1=ni("Map.prototype.set",!0),G1=ni("Map.prototype.has",!0),Cu=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},z1=function(e,t){var r=Cu(e,t);return r&&r.value},H1=function(e,t,r){var n=Cu(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},V1=function(e,t){return!!Cu(e,t)},j1=function(){var t,r,n,s={assert:function(a){if(!s.has(a))throw new L1("Side channel does not contain "+N1(a))},get:function(a){if(Js&&a&&(typeof a=="object"||typeof a=="function")){if(t)return k1(t,a)}else if(Qs){if(r)return U1(r,a)}else if(n)return z1(n,a)},has:function(a){if(Js&&a&&(typeof a=="object"||typeof a=="function")){if(t)return D1(t,a)}else if(Qs){if(r)return G1(r,a)}else if(n)return V1(n,a);return!1},set:function(a,u){Js&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new Js),B1(t,a,u)):Qs?(r||(r=new Qs),$1(r,a,u)):(n||(n={key:{},next:null}),H1(n,a,u))}};return s},X1=String.prototype.replace,W1=/%20/g,Eu={RFC1738:"RFC1738",RFC3986:"RFC3986"},Iu={default:Eu.RFC3986,formatters:{RFC1738:function(e){return X1.call(e,W1,"+")},RFC3986:function(e){return String(e)}},RFC1738:Eu.RFC1738,RFC3986:Eu.RFC3986},q1=Iu,Ru=Object.prototype.hasOwnProperty,wn=Array.isArray,Er=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Y1=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(wn(n)){for(var s=[],a=0;a<n.length;++a)typeof n[a]<"u"&&s.push(n[a]);r.obj[r.prop]=s}}},Sf=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},s=0;s<t.length;++s)typeof t[s]<"u"&&(n[s]=t[s]);return n},K1=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(wn(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Ru.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var s=t;return wn(t)&&!wn(r)&&(s=Sf(t,n)),wn(t)&&wn(r)?(r.forEach(function(a,u){if(Ru.call(t,u)){var l=t[u];l&&typeof l=="object"&&a&&typeof a=="object"?t[u]=e(l,a,n):t.push(a)}else t[u]=a}),t):Object.keys(r).reduce(function(a,u){var l=r[u];return Ru.call(a,u)?a[u]=e(a[u],l,n):a[u]=l,a},s)},Z1=function(t,r){return Object.keys(r).reduce(function(n,s){return n[s]=r[s],n},t)},J1=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Q1=function(t,r,n,s,a){if(t.length===0)return t;var u=t;if(typeof t=="symbol"?u=Symbol.prototype.toString.call(t):typeof t!="string"&&(u=String(t)),n==="iso-8859-1")return escape(u).replace(/%u[0-9a-f]{4}/gi,function(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var l="",c=0;c<u.length;++c){var f=u.charCodeAt(c);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||a===q1.RFC1738&&(f===40||f===41)){l+=u.charAt(c);continue}if(f<128){l=l+Er[f];continue}if(f<2048){l=l+(Er[192|f>>6]+Er[128|f&63]);continue}if(f<55296||f>=57344){l=l+(Er[224|f>>12]+Er[128|f>>6&63]+Er[128|f&63]);continue}c+=1,f=65536+((f&1023)<<10|u.charCodeAt(c)&1023),l+=Er[240|f>>18]+Er[128|f>>12&63]+Er[128|f>>6&63]+Er[128|f&63]}return l},tb=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],s=0;s<r.length;++s)for(var a=r[s],u=a.obj[a.prop],l=Object.keys(u),c=0;c<l.length;++c){var f=l[c],p=u[f];typeof p=="object"&&p!==null&&n.indexOf(p)===-1&&(r.push({obj:u,prop:f}),n.push(p))}return Y1(r),t},eb=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},rb=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},nb=function(t,r){return[].concat(t,r)},ib=function(t,r){if(wn(t)){for(var n=[],s=0;s<t.length;s+=1)n.push(r(t[s]));return n}return r(t)},Af={arrayToObject:Sf,assign:Z1,combine:nb,compact:tb,decode:J1,encode:Q1,isBuffer:rb,isRegExp:eb,maybeMap:ib,merge:K1},Cf=j1,ta=Af,Qi=Iu,sb=Object.prototype.hasOwnProperty,Ef={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Lr=Array.isArray,ab=Array.prototype.push,If=function(e,t){ab.apply(e,Lr(t)?t:[t])},ob=Date.prototype.toISOString,Rf=Qi.default,Ae={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:ta.encode,encodeValuesOnly:!1,format:Rf,formatter:Qi.formatters[Rf],indices:!1,serializeDate:function(t){return ob.call(t)},skipNulls:!1,strictNullHandling:!1},ub=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Pu={},lb=function e(t,r,n,s,a,u,l,c,f,p,m,g,x,y,S,T){for(var w=t,I=T,A=0,R=!1;(I=I.get(Pu))!==void 0&&!R;){var N=I.get(t);if(A+=1,typeof N<"u"){if(N===A)throw new RangeError("Cyclic object value");R=!0}typeof I.get(Pu)>"u"&&(A=0)}if(typeof c=="function"?w=c(r,w):w instanceof Date?w=m(w):n==="comma"&&Lr(w)&&(w=ta.maybeMap(w,function(kt){return kt instanceof Date?m(kt):kt})),w===null){if(a)return l&&!y?l(r,Ae.encoder,S,"key",g):r;w=""}if(ub(w)||ta.isBuffer(w)){if(l){var B=y?r:l(r,Ae.encoder,S,"key",g);return[x(B)+"="+x(l(w,Ae.encoder,S,"value",g))]}return[x(r)+"="+x(String(w))]}var L=[];if(typeof w>"u")return L;var O;if(n==="comma"&&Lr(w))y&&l&&(w=ta.maybeMap(w,l)),O=[{value:w.length>0?w.join(",")||null:void 0}];else if(Lr(c))O=c;else{var z=Object.keys(w);O=f?z.sort(f):z}for(var X=s&&Lr(w)&&w.length===1?r+"[]":r,tt=0;tt<O.length;++tt){var it=O[tt],V=typeof it=="object"&&typeof it.value<"u"?it.value:w[it];if(!(u&&V===null)){var j=Lr(w)?typeof n=="function"?n(X,it):X:X+(p?"."+it:"["+it+"]");T.set(t,A);var xt=Cf();xt.set(Pu,T),If(L,e(V,j,n,s,a,u,n==="comma"&&y&&Lr(w)?null:l,c,f,p,m,g,x,y,S,xt))}}return L},hb=function(t){if(!t)return Ae;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||Ae.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Qi.default;if(typeof t.format<"u"){if(!sb.call(Qi.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var s=Qi.formatters[n],a=Ae.filter;return(typeof t.filter=="function"||Lr(t.filter))&&(a=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Ae.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Ae.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ae.charsetSentinel,delimiter:typeof t.delimiter>"u"?Ae.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Ae.encode,encoder:typeof t.encoder=="function"?t.encoder:Ae.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Ae.encodeValuesOnly,filter:a,format:n,formatter:s,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Ae.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Ae.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ae.strictNullHandling}},cb=function(e,t){var r=e,n=hb(t),s,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):Lr(n.filter)&&(a=n.filter,s=a);var u=[];if(typeof r!="object"||r===null)return"";var l;t&&t.arrayFormat in Ef?l=t.arrayFormat:t&&"indices"in t?l=t.indices?"indices":"repeat":l="indices";var c=Ef[l];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=c==="comma"&&t&&t.commaRoundTrip;s||(s=Object.keys(r)),n.sort&&s.sort(n.sort);for(var p=Cf(),m=0;m<s.length;++m){var g=s[m];n.skipNulls&&r[g]===null||If(u,lb(r[g],g,c,f,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,p))}var x=u.join(n.delimiter),y=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),x.length>0?y+x:""},ii=Af,Mu=Object.prototype.hasOwnProperty,fb=Array.isArray,ve={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ii.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},db=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},Pf=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},pb="utf8=%26%2310003%3B",gb="utf8=%E2%9C%93",mb=function(t,r){var n={__proto__:null},s=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,a=r.parameterLimit===1/0?void 0:r.parameterLimit,u=s.split(r.delimiter,a),l=-1,c,f=r.charset;if(r.charsetSentinel)for(c=0;c<u.length;++c)u[c].indexOf("utf8=")===0&&(u[c]===gb?f="utf-8":u[c]===pb&&(f="iso-8859-1"),l=c,c=u.length);for(c=0;c<u.length;++c)if(c!==l){var p=u[c],m=p.indexOf("]="),g=m===-1?p.indexOf("="):m+1,x,y;g===-1?(x=r.decoder(p,ve.decoder,f,"key"),y=r.strictNullHandling?null:""):(x=r.decoder(p.slice(0,g),ve.decoder,f,"key"),y=ii.maybeMap(Pf(p.slice(g+1),r),function(S){return r.decoder(S,ve.decoder,f,"value")})),y&&r.interpretNumericEntities&&f==="iso-8859-1"&&(y=db(y)),p.indexOf("[]=")>-1&&(y=fb(y)?[y]:y),Mu.call(n,x)?n[x]=ii.combine(n[x],y):n[x]=y}return n},vb=function(e,t,r,n){for(var s=n?t:Pf(t,r),a=e.length-1;a>=0;--a){var u,l=e[a];if(l==="[]"&&r.parseArrays)u=[].concat(s);else{u=r.plainObjects?Object.create(null):{};var c=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,f=parseInt(c,10);!r.parseArrays&&c===""?u={0:s}:!isNaN(f)&&l!==c&&String(f)===c&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(u=[],u[f]=s):c!=="__proto__"&&(u[c]=s)}s=u}return s},yb=function(t,r,n,s){if(t){var a=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,u=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,c=n.depth>0&&u.exec(a),f=c?a.slice(0,c.index):a,p=[];if(f){if(!n.plainObjects&&Mu.call(Object.prototype,f)&&!n.allowPrototypes)return;p.push(f)}for(var m=0;n.depth>0&&(c=l.exec(a))!==null&&m<n.depth;){if(m+=1,!n.plainObjects&&Mu.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;p.push(c[1])}return c&&p.push("["+a.slice(c.index)+"]"),vb(p,r,n,s)}},_b=function(t){if(!t)return ve;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?ve.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?ve.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ve.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ve.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ve.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ve.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ve.comma,decoder:typeof t.decoder=="function"?t.decoder:ve.decoder,delimiter:typeof t.delimiter=="string"||ii.isRegExp(t.delimiter)?t.delimiter:ve.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ve.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ve.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ve.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ve.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ve.strictNullHandling}},xb=function(e,t){var r=_b(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?mb(e,r):e,s=r.plainObjects?Object.create(null):{},a=Object.keys(n),u=0;u<a.length;++u){var l=a[u],c=yb(l,n[l],r,typeof e=="string");s=ii.merge(s,c,r)}return r.allowSparse===!0?s:ii.compact(s)},bb=cb,Tb=xb,wb=Iu,Sb={formats:wb,parse:Tb,stringify:bb},Ab=Mx;function ir(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Cb=/^([a-z0-9.+-]+:)/i,Eb=/:[0-9]*$/,Ib=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Rb=["<",">",'"',"`"," ","\r",`
13
- `," "],Pb=["{","}","|","\\","^","`"].concat(Rb),Ou=["'"].concat(Pb),Mf=["%","/","?",";","#"].concat(Ou),Of=["/","?","#"],Mb=255,Ff=/^[+a-z0-9A-Z_-]{0,63}$/,Ob=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Fb={javascript:!0,"javascript:":!0},Fu={javascript:!0,"javascript:":!0},si={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Nu=Sb;function ea(e,t,r){if(e&&typeof e=="object"&&e instanceof ir)return e;var n=new ir;return n.parse(e,t,r),n}ir.prototype.parse=function(e,t,r){if(typeof e!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),s=n!==-1&&n<e.indexOf("#")?"?":"#",a=e.split(s),u=/\\/g;a[0]=a[0].replace(u,"/"),e=a.join(s);var l=e;if(l=l.trim(),!r&&e.split("#").length===1){var c=Ib.exec(l);if(c)return this.path=l,this.href=l,this.pathname=c[1],c[2]?(this.search=c[2],t?this.query=Nu.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var f=Cb.exec(l);if(f){f=f[0];var p=f.toLowerCase();this.protocol=p,l=l.substr(f.length)}if(r||f||l.match(/^\/\/[^@/]+@[^@/]+/)){var m=l.substr(0,2)==="//";m&&!(f&&Fu[f])&&(l=l.substr(2),this.slashes=!0)}if(!Fu[f]&&(m||f&&!si[f])){for(var g=-1,x=0;x<Of.length;x++){var y=l.indexOf(Of[x]);y!==-1&&(g===-1||y<g)&&(g=y)}var S,T;g===-1?T=l.lastIndexOf("@"):T=l.lastIndexOf("@",g),T!==-1&&(S=l.slice(0,T),l=l.slice(T+1),this.auth=decodeURIComponent(S)),g=-1;for(var x=0;x<Mf.length;x++){var y=l.indexOf(Mf[x]);y!==-1&&(g===-1||y<g)&&(g=y)}g===-1&&(g=l.length),this.host=l.slice(0,g),l=l.slice(g),this.parseHost(),this.hostname=this.hostname||"";var w=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!w)for(var I=this.hostname.split(/\./),x=0,A=I.length;x<A;x++){var R=I[x];if(R&&!R.match(Ff)){for(var N="",B=0,L=R.length;B<L;B++)R.charCodeAt(B)>127?N+="x":N+=R[B];if(!N.match(Ff)){var O=I.slice(0,x),z=I.slice(x+1),X=R.match(Ob);X&&(O.push(X[1]),z.unshift(X[2])),z.length&&(l="/"+z.join(".")+l),this.hostname=O.join(".");break}}}this.hostname.length>Mb?this.hostname="":this.hostname=this.hostname.toLowerCase(),w||(this.hostname=Ab.toASCII(this.hostname));var tt=this.port?":"+this.port:"",it=this.hostname||"";this.host=it+tt,this.href+=this.host,w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!Fb[p])for(var x=0,A=Ou.length;x<A;x++){var V=Ou[x];if(l.indexOf(V)!==-1){var j=encodeURIComponent(V);j===V&&(j=escape(V)),l=l.split(V).join(j)}}var xt=l.indexOf("#");xt!==-1&&(this.hash=l.substr(xt),l=l.slice(0,xt));var kt=l.indexOf("?");if(kt!==-1?(this.search=l.substr(kt),this.query=l.substr(kt+1),t&&(this.query=Nu.parse(this.query)),l=l.slice(0,kt)):t&&(this.search="",this.query={}),l&&(this.pathname=l),si[p]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var tt=this.pathname||"",G=this.search||"";this.path=tt+G}return this.href=this.format(),this};function Nb(e){return typeof e=="string"&&(e=ea(e)),e instanceof ir?e.format():ir.prototype.format.call(e)}ir.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",s=!1,a="";this.host?s=e+this.host:this.hostname&&(s=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(s+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(a=Nu.stringify(this.query));var u=this.search||a&&"?"+a||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||si[t])&&s!==!1?(s="//"+(s||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):s||(s=""),n&&n.charAt(0)!=="#"&&(n="#"+n),u&&u.charAt(0)!=="?"&&(u="?"+u),r=r.replace(/[?#]/g,function(l){return encodeURIComponent(l)}),u=u.replace("#","%23"),t+s+r+u+n};function Lb(e,t){return ea(e,!1,!0).resolve(t)}ir.prototype.resolve=function(e){return this.resolveObject(ea(e,!1,!0)).format()},ir.prototype.resolveObject=function(e){if(typeof e=="string"){var t=new ir;t.parse(e,!1,!0),e=t}for(var r=new ir,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=e.hash,e.href==="")return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),l=0;l<u.length;l++){var c=u[l];c!=="protocol"&&(r[c]=e[c])}return si[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!si[e.protocol]){for(var f=Object.keys(e),p=0;p<f.length;p++){var m=f[p];r[m]=e[m]}return r.href=r.format(),r}if(r.protocol=e.protocol,!e.host&&!Fu[e.protocol]){for(var A=(e.pathname||"").split("/");A.length&&!(e.host=A.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),A[0]!==""&&A.unshift(""),A.length<2&&A.unshift(""),r.pathname=A.join("/")}else r.pathname=e.pathname;if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var g=r.pathname||"",x=r.search||"";r.path=g+x}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var y=r.pathname&&r.pathname.charAt(0)==="/",S=e.host||e.pathname&&e.pathname.charAt(0)==="/",T=S||y||r.host&&e.pathname,w=T,I=r.pathname&&r.pathname.split("/")||[],A=e.pathname&&e.pathname.split("/")||[],R=r.protocol&&!si[r.protocol];if(R&&(r.hostname="",r.port=null,r.host&&(I[0]===""?I[0]=r.host:I.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(A[0]===""?A[0]=e.host:A.unshift(e.host)),e.host=null),T=T&&(A[0]===""||I[0]==="")),S)r.host=e.host||e.host===""?e.host:r.host,r.hostname=e.hostname||e.hostname===""?e.hostname:r.hostname,r.search=e.search,r.query=e.query,I=A;else if(A.length)I||(I=[]),I.pop(),I=I.concat(A),r.search=e.search,r.query=e.query;else if(e.search!=null){if(R){r.host=I.shift(),r.hostname=r.host;var N=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;N&&(r.auth=N.shift(),r.hostname=N.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!I.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var B=I.slice(-1)[0],L=(r.host||e.host||I.length>1)&&(B==="."||B==="..")||B==="",O=0,z=I.length;z>=0;z--)B=I[z],B==="."?I.splice(z,1):B===".."?(I.splice(z,1),O++):O&&(I.splice(z,1),O--);if(!T&&!w)for(;O--;O)I.unshift("..");T&&I[0]!==""&&(!I[0]||I[0].charAt(0)!=="/")&&I.unshift(""),L&&I.join("/").substr(-1)!=="/"&&I.push("");var X=I[0]===""||I[0]&&I[0].charAt(0)==="/";if(R){r.hostname=X?"":I.length?I.shift():"",r.host=r.hostname;var N=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;N&&(r.auth=N.shift(),r.hostname=N.shift(),r.host=r.hostname)}return T=T||r.host&&I.length,T&&!X&&I.unshift(""),I.length>0?r.pathname=I.join("/"):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},ir.prototype.parseHost=function(){var e=this.host,t=Eb.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var kb=ea,Bb=Lb,Db=Nb;const Ub={parse:kb,format:Db,resolve:Bb},Nf={};function Rt(e,t,r=3){if(Nf[t])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${t}
12
+ `+t.prev}function Zs(e,t){var r=Tu(e),n=[];if(r){n.length=e.length;for(var s=0;s<e.length;s++)n[s]=Qr(e,s)?t(e[s],e):""}var a=typeof _u=="function"?_u(e):[],u;if(ri){u={};for(var l=0;l<a.length;l++)u["$"+a[l]]=a[l]}for(var c in e)Qr(e,c)&&(r&&String(Number(c))===c&&c<e.length||ri&&u["$"+c]instanceof Symbol||(hf.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if(typeof _u=="function")for(var f=0;f<a.length;f++)df.call(e,a[f])&&n.push("["+t(a[f])+"]: "+t(e[a[f]],e));return n}var Au=fu,ni=i1,N1=g1,L1=Au("%TypeError%"),Js=Au("%WeakMap%",!0),Qs=Au("%Map%",!0),k1=ni("WeakMap.prototype.get",!0),B1=ni("WeakMap.prototype.set",!0),D1=ni("WeakMap.prototype.has",!0),U1=ni("Map.prototype.get",!0),$1=ni("Map.prototype.set",!0),G1=ni("Map.prototype.has",!0),Cu=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},z1=function(e,t){var r=Cu(e,t);return r&&r.value},H1=function(e,t,r){var n=Cu(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},V1=function(e,t){return!!Cu(e,t)},j1=function(){var t,r,n,s={assert:function(a){if(!s.has(a))throw new L1("Side channel does not contain "+N1(a))},get:function(a){if(Js&&a&&(typeof a=="object"||typeof a=="function")){if(t)return k1(t,a)}else if(Qs){if(r)return U1(r,a)}else if(n)return z1(n,a)},has:function(a){if(Js&&a&&(typeof a=="object"||typeof a=="function")){if(t)return D1(t,a)}else if(Qs){if(r)return G1(r,a)}else if(n)return V1(n,a);return!1},set:function(a,u){Js&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new Js),B1(t,a,u)):Qs?(r||(r=new Qs),$1(r,a,u)):(n||(n={key:{},next:null}),H1(n,a,u))}};return s},X1=String.prototype.replace,W1=/%20/g,Eu={RFC1738:"RFC1738",RFC3986:"RFC3986"},Iu={default:Eu.RFC3986,formatters:{RFC1738:function(e){return X1.call(e,W1,"+")},RFC3986:function(e){return String(e)}},RFC1738:Eu.RFC1738,RFC3986:Eu.RFC3986},q1=Iu,Ru=Object.prototype.hasOwnProperty,wn=Array.isArray,Er=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Y1=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(wn(n)){for(var s=[],a=0;a<n.length;++a)typeof n[a]<"u"&&s.push(n[a]);r.obj[r.prop]=s}}},Sf=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},s=0;s<t.length;++s)typeof t[s]<"u"&&(n[s]=t[s]);return n},K1=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(wn(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Ru.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var s=t;return wn(t)&&!wn(r)&&(s=Sf(t,n)),wn(t)&&wn(r)?(r.forEach(function(a,u){if(Ru.call(t,u)){var l=t[u];l&&typeof l=="object"&&a&&typeof a=="object"?t[u]=e(l,a,n):t.push(a)}else t[u]=a}),t):Object.keys(r).reduce(function(a,u){var l=r[u];return Ru.call(a,u)?a[u]=e(a[u],l,n):a[u]=l,a},s)},Z1=function(t,r){return Object.keys(r).reduce(function(n,s){return n[s]=r[s],n},t)},J1=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Q1=function(t,r,n,s,a){if(t.length===0)return t;var u=t;if(typeof t=="symbol"?u=Symbol.prototype.toString.call(t):typeof t!="string"&&(u=String(t)),n==="iso-8859-1")return escape(u).replace(/%u[0-9a-f]{4}/gi,function(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var l="",c=0;c<u.length;++c){var f=u.charCodeAt(c);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||a===q1.RFC1738&&(f===40||f===41)){l+=u.charAt(c);continue}if(f<128){l=l+Er[f];continue}if(f<2048){l=l+(Er[192|f>>6]+Er[128|f&63]);continue}if(f<55296||f>=57344){l=l+(Er[224|f>>12]+Er[128|f>>6&63]+Er[128|f&63]);continue}c+=1,f=65536+((f&1023)<<10|u.charCodeAt(c)&1023),l+=Er[240|f>>18]+Er[128|f>>12&63]+Er[128|f>>6&63]+Er[128|f&63]}return l},tb=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],s=0;s<r.length;++s)for(var a=r[s],u=a.obj[a.prop],l=Object.keys(u),c=0;c<l.length;++c){var f=l[c],p=u[f];typeof p=="object"&&p!==null&&n.indexOf(p)===-1&&(r.push({obj:u,prop:f}),n.push(p))}return Y1(r),t},eb=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},rb=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},nb=function(t,r){return[].concat(t,r)},ib=function(t,r){if(wn(t)){for(var n=[],s=0;s<t.length;s+=1)n.push(r(t[s]));return n}return r(t)},Af={arrayToObject:Sf,assign:Z1,combine:nb,compact:tb,decode:J1,encode:Q1,isBuffer:rb,isRegExp:eb,maybeMap:ib,merge:K1},Cf=j1,ta=Af,Qi=Iu,sb=Object.prototype.hasOwnProperty,Ef={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Lr=Array.isArray,ab=Array.prototype.push,If=function(e,t){ab.apply(e,Lr(t)?t:[t])},ob=Date.prototype.toISOString,Rf=Qi.default,Ae={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:ta.encode,encodeValuesOnly:!1,format:Rf,formatter:Qi.formatters[Rf],indices:!1,serializeDate:function(t){return ob.call(t)},skipNulls:!1,strictNullHandling:!1},ub=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Pu={},lb=function e(t,r,n,s,a,u,l,c,f,p,m,g,x,y,S,T){for(var w=t,I=T,A=0,R=!1;(I=I.get(Pu))!==void 0&&!R;){var N=I.get(t);if(A+=1,typeof N<"u"){if(N===A)throw new RangeError("Cyclic object value");R=!0}typeof I.get(Pu)>"u"&&(A=0)}if(typeof c=="function"?w=c(r,w):w instanceof Date?w=m(w):n==="comma"&&Lr(w)&&(w=ta.maybeMap(w,function(kt){return kt instanceof Date?m(kt):kt})),w===null){if(a)return l&&!y?l(r,Ae.encoder,S,"key",g):r;w=""}if(ub(w)||ta.isBuffer(w)){if(l){var B=y?r:l(r,Ae.encoder,S,"key",g);return[x(B)+"="+x(l(w,Ae.encoder,S,"value",g))]}return[x(r)+"="+x(String(w))]}var L=[];if(typeof w>"u")return L;var O;if(n==="comma"&&Lr(w))y&&l&&(w=ta.maybeMap(w,l)),O=[{value:w.length>0?w.join(",")||null:void 0}];else if(Lr(c))O=c;else{var z=Object.keys(w);O=f?z.sort(f):z}for(var X=s&&Lr(w)&&w.length===1?r+"[]":r,tt=0;tt<O.length;++tt){var st=O[tt],V=typeof st=="object"&&typeof st.value<"u"?st.value:w[st];if(!(u&&V===null)){var j=Lr(w)?typeof n=="function"?n(X,st):X:X+(p?"."+st:"["+st+"]");T.set(t,A);var bt=Cf();bt.set(Pu,T),If(L,e(V,j,n,s,a,u,n==="comma"&&y&&Lr(w)?null:l,c,f,p,m,g,x,y,S,bt))}}return L},hb=function(t){if(!t)return Ae;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||Ae.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Qi.default;if(typeof t.format<"u"){if(!sb.call(Qi.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var s=Qi.formatters[n],a=Ae.filter;return(typeof t.filter=="function"||Lr(t.filter))&&(a=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Ae.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Ae.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ae.charsetSentinel,delimiter:typeof t.delimiter>"u"?Ae.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Ae.encode,encoder:typeof t.encoder=="function"?t.encoder:Ae.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Ae.encodeValuesOnly,filter:a,format:n,formatter:s,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Ae.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Ae.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ae.strictNullHandling}},cb=function(e,t){var r=e,n=hb(t),s,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):Lr(n.filter)&&(a=n.filter,s=a);var u=[];if(typeof r!="object"||r===null)return"";var l;t&&t.arrayFormat in Ef?l=t.arrayFormat:t&&"indices"in t?l=t.indices?"indices":"repeat":l="indices";var c=Ef[l];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=c==="comma"&&t&&t.commaRoundTrip;s||(s=Object.keys(r)),n.sort&&s.sort(n.sort);for(var p=Cf(),m=0;m<s.length;++m){var g=s[m];n.skipNulls&&r[g]===null||If(u,lb(r[g],g,c,f,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,p))}var x=u.join(n.delimiter),y=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?y+="utf8=%26%2310003%3B&":y+="utf8=%E2%9C%93&"),x.length>0?y+x:""},ii=Af,Mu=Object.prototype.hasOwnProperty,fb=Array.isArray,ve={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ii.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},db=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},Pf=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},pb="utf8=%26%2310003%3B",gb="utf8=%E2%9C%93",mb=function(t,r){var n={__proto__:null},s=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,a=r.parameterLimit===1/0?void 0:r.parameterLimit,u=s.split(r.delimiter,a),l=-1,c,f=r.charset;if(r.charsetSentinel)for(c=0;c<u.length;++c)u[c].indexOf("utf8=")===0&&(u[c]===gb?f="utf-8":u[c]===pb&&(f="iso-8859-1"),l=c,c=u.length);for(c=0;c<u.length;++c)if(c!==l){var p=u[c],m=p.indexOf("]="),g=m===-1?p.indexOf("="):m+1,x,y;g===-1?(x=r.decoder(p,ve.decoder,f,"key"),y=r.strictNullHandling?null:""):(x=r.decoder(p.slice(0,g),ve.decoder,f,"key"),y=ii.maybeMap(Pf(p.slice(g+1),r),function(S){return r.decoder(S,ve.decoder,f,"value")})),y&&r.interpretNumericEntities&&f==="iso-8859-1"&&(y=db(y)),p.indexOf("[]=")>-1&&(y=fb(y)?[y]:y),Mu.call(n,x)?n[x]=ii.combine(n[x],y):n[x]=y}return n},vb=function(e,t,r,n){for(var s=n?t:Pf(t,r),a=e.length-1;a>=0;--a){var u,l=e[a];if(l==="[]"&&r.parseArrays)u=[].concat(s);else{u=r.plainObjects?Object.create(null):{};var c=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,f=parseInt(c,10);!r.parseArrays&&c===""?u={0:s}:!isNaN(f)&&l!==c&&String(f)===c&&f>=0&&r.parseArrays&&f<=r.arrayLimit?(u=[],u[f]=s):c!=="__proto__"&&(u[c]=s)}s=u}return s},yb=function(t,r,n,s){if(t){var a=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,u=/(\[[^[\]]*])/,l=/(\[[^[\]]*])/g,c=n.depth>0&&u.exec(a),f=c?a.slice(0,c.index):a,p=[];if(f){if(!n.plainObjects&&Mu.call(Object.prototype,f)&&!n.allowPrototypes)return;p.push(f)}for(var m=0;n.depth>0&&(c=l.exec(a))!==null&&m<n.depth;){if(m+=1,!n.plainObjects&&Mu.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;p.push(c[1])}return c&&p.push("["+a.slice(c.index)+"]"),vb(p,r,n,s)}},_b=function(t){if(!t)return ve;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?ve.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?ve.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:ve.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:ve.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:ve.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:ve.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:ve.comma,decoder:typeof t.decoder=="function"?t.decoder:ve.decoder,delimiter:typeof t.delimiter=="string"||ii.isRegExp(t.delimiter)?t.delimiter:ve.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:ve.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:ve.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:ve.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:ve.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:ve.strictNullHandling}},xb=function(e,t){var r=_b(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?mb(e,r):e,s=r.plainObjects?Object.create(null):{},a=Object.keys(n),u=0;u<a.length;++u){var l=a[u],c=yb(l,n[l],r,typeof e=="string");s=ii.merge(s,c,r)}return r.allowSparse===!0?s:ii.compact(s)},bb=cb,Tb=xb,wb=Iu,Sb={formats:wb,parse:Tb,stringify:bb},Ab=Mx;function ir(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var Cb=/^([a-z0-9.+-]+:)/i,Eb=/:[0-9]*$/,Ib=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,Rb=["<",">",'"',"`"," ","\r",`
13
+ `," "],Pb=["{","}","|","\\","^","`"].concat(Rb),Ou=["'"].concat(Pb),Mf=["%","/","?",";","#"].concat(Ou),Of=["/","?","#"],Mb=255,Ff=/^[+a-z0-9A-Z_-]{0,63}$/,Ob=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Fb={javascript:!0,"javascript:":!0},Fu={javascript:!0,"javascript:":!0},si={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Nu=Sb;function ea(e,t,r){if(e&&typeof e=="object"&&e instanceof ir)return e;var n=new ir;return n.parse(e,t,r),n}ir.prototype.parse=function(e,t,r){if(typeof e!="string")throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),s=n!==-1&&n<e.indexOf("#")?"?":"#",a=e.split(s),u=/\\/g;a[0]=a[0].replace(u,"/"),e=a.join(s);var l=e;if(l=l.trim(),!r&&e.split("#").length===1){var c=Ib.exec(l);if(c)return this.path=l,this.href=l,this.pathname=c[1],c[2]?(this.search=c[2],t?this.query=Nu.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}var f=Cb.exec(l);if(f){f=f[0];var p=f.toLowerCase();this.protocol=p,l=l.substr(f.length)}if(r||f||l.match(/^\/\/[^@/]+@[^@/]+/)){var m=l.substr(0,2)==="//";m&&!(f&&Fu[f])&&(l=l.substr(2),this.slashes=!0)}if(!Fu[f]&&(m||f&&!si[f])){for(var g=-1,x=0;x<Of.length;x++){var y=l.indexOf(Of[x]);y!==-1&&(g===-1||y<g)&&(g=y)}var S,T;g===-1?T=l.lastIndexOf("@"):T=l.lastIndexOf("@",g),T!==-1&&(S=l.slice(0,T),l=l.slice(T+1),this.auth=decodeURIComponent(S)),g=-1;for(var x=0;x<Mf.length;x++){var y=l.indexOf(Mf[x]);y!==-1&&(g===-1||y<g)&&(g=y)}g===-1&&(g=l.length),this.host=l.slice(0,g),l=l.slice(g),this.parseHost(),this.hostname=this.hostname||"";var w=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!w)for(var I=this.hostname.split(/\./),x=0,A=I.length;x<A;x++){var R=I[x];if(R&&!R.match(Ff)){for(var N="",B=0,L=R.length;B<L;B++)R.charCodeAt(B)>127?N+="x":N+=R[B];if(!N.match(Ff)){var O=I.slice(0,x),z=I.slice(x+1),X=R.match(Ob);X&&(O.push(X[1]),z.unshift(X[2])),z.length&&(l="/"+z.join(".")+l),this.hostname=O.join(".");break}}}this.hostname.length>Mb?this.hostname="":this.hostname=this.hostname.toLowerCase(),w||(this.hostname=Ab.toASCII(this.hostname));var tt=this.port?":"+this.port:"",st=this.hostname||"";this.host=st+tt,this.href+=this.host,w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),l[0]!=="/"&&(l="/"+l))}if(!Fb[p])for(var x=0,A=Ou.length;x<A;x++){var V=Ou[x];if(l.indexOf(V)!==-1){var j=encodeURIComponent(V);j===V&&(j=escape(V)),l=l.split(V).join(j)}}var bt=l.indexOf("#");bt!==-1&&(this.hash=l.substr(bt),l=l.slice(0,bt));var kt=l.indexOf("?");if(kt!==-1?(this.search=l.substr(kt),this.query=l.substr(kt+1),t&&(this.query=Nu.parse(this.query)),l=l.slice(0,kt)):t&&(this.search="",this.query={}),l&&(this.pathname=l),si[p]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var tt=this.pathname||"",G=this.search||"";this.path=tt+G}return this.href=this.format(),this};function Nb(e){return typeof e=="string"&&(e=ea(e)),e instanceof ir?e.format():ir.prototype.format.call(e)}ir.prototype.format=function(){var e=this.auth||"";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,":"),e+="@");var t=this.protocol||"",r=this.pathname||"",n=this.hash||"",s=!1,a="";this.host?s=e+this.host:this.hostname&&(s=e+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(s+=":"+this.port)),this.query&&typeof this.query=="object"&&Object.keys(this.query).length&&(a=Nu.stringify(this.query));var u=this.search||a&&"?"+a||"";return t&&t.substr(-1)!==":"&&(t+=":"),this.slashes||(!t||si[t])&&s!==!1?(s="//"+(s||""),r&&r.charAt(0)!=="/"&&(r="/"+r)):s||(s=""),n&&n.charAt(0)!=="#"&&(n="#"+n),u&&u.charAt(0)!=="?"&&(u="?"+u),r=r.replace(/[?#]/g,function(l){return encodeURIComponent(l)}),u=u.replace("#","%23"),t+s+r+u+n};function Lb(e,t){return ea(e,!1,!0).resolve(t)}ir.prototype.resolve=function(e){return this.resolveObject(ea(e,!1,!0)).format()},ir.prototype.resolveObject=function(e){if(typeof e=="string"){var t=new ir;t.parse(e,!1,!0),e=t}for(var r=new ir,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=e.hash,e.href==="")return r.href=r.format(),r;if(e.slashes&&!e.protocol){for(var u=Object.keys(e),l=0;l<u.length;l++){var c=u[l];c!=="protocol"&&(r[c]=e[c])}return si[r.protocol]&&r.hostname&&!r.pathname&&(r.pathname="/",r.path=r.pathname),r.href=r.format(),r}if(e.protocol&&e.protocol!==r.protocol){if(!si[e.protocol]){for(var f=Object.keys(e),p=0;p<f.length;p++){var m=f[p];r[m]=e[m]}return r.href=r.format(),r}if(r.protocol=e.protocol,!e.host&&!Fu[e.protocol]){for(var A=(e.pathname||"").split("/");A.length&&!(e.host=A.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),A[0]!==""&&A.unshift(""),A.length<2&&A.unshift(""),r.pathname=A.join("/")}else r.pathname=e.pathname;if(r.search=e.search,r.query=e.query,r.host=e.host||"",r.auth=e.auth,r.hostname=e.hostname||e.host,r.port=e.port,r.pathname||r.search){var g=r.pathname||"",x=r.search||"";r.path=g+x}return r.slashes=r.slashes||e.slashes,r.href=r.format(),r}var y=r.pathname&&r.pathname.charAt(0)==="/",S=e.host||e.pathname&&e.pathname.charAt(0)==="/",T=S||y||r.host&&e.pathname,w=T,I=r.pathname&&r.pathname.split("/")||[],A=e.pathname&&e.pathname.split("/")||[],R=r.protocol&&!si[r.protocol];if(R&&(r.hostname="",r.port=null,r.host&&(I[0]===""?I[0]=r.host:I.unshift(r.host)),r.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(A[0]===""?A[0]=e.host:A.unshift(e.host)),e.host=null),T=T&&(A[0]===""||I[0]==="")),S)r.host=e.host||e.host===""?e.host:r.host,r.hostname=e.hostname||e.hostname===""?e.hostname:r.hostname,r.search=e.search,r.query=e.query,I=A;else if(A.length)I||(I=[]),I.pop(),I=I.concat(A),r.search=e.search,r.query=e.query;else if(e.search!=null){if(R){r.host=I.shift(),r.hostname=r.host;var N=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;N&&(r.auth=N.shift(),r.hostname=N.shift(),r.host=r.hostname)}return r.search=e.search,r.query=e.query,(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!I.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var B=I.slice(-1)[0],L=(r.host||e.host||I.length>1)&&(B==="."||B==="..")||B==="",O=0,z=I.length;z>=0;z--)B=I[z],B==="."?I.splice(z,1):B===".."?(I.splice(z,1),O++):O&&(I.splice(z,1),O--);if(!T&&!w)for(;O--;O)I.unshift("..");T&&I[0]!==""&&(!I[0]||I[0].charAt(0)!=="/")&&I.unshift(""),L&&I.join("/").substr(-1)!=="/"&&I.push("");var X=I[0]===""||I[0]&&I[0].charAt(0)==="/";if(R){r.hostname=X?"":I.length?I.shift():"",r.host=r.hostname;var N=r.host&&r.host.indexOf("@")>0?r.host.split("@"):!1;N&&(r.auth=N.shift(),r.hostname=N.shift(),r.host=r.hostname)}return T=T||r.host&&I.length,T&&!X&&I.unshift(""),I.length>0?r.pathname=I.join("/"):(r.pathname=null,r.path=null),(r.pathname!==null||r.search!==null)&&(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},ir.prototype.parseHost=function(){var e=this.host,t=Eb.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var kb=ea,Bb=Lb,Db=Nb;const Ub={parse:kb,format:Db,resolve:Bb},Nf={};function Rt(e,t,r=3){if(Nf[t])return;let n=new Error().stack;typeof n>"u"?console.warn("PixiJS Deprecation Warning: ",`${t}
14
14
  Deprecated since v${e}`):(n=n.split(`
15
15
  `).splice(r).join(`
16
16
  `),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${t}
17
17
  Deprecated since v${e}`),console.warn(n),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${t}
18
- Deprecated since v${e}`),console.warn(n))),Nf[t]=!0}let Lu;function $b(){return typeof Lu>"u"&&(Lu=function(){var r;const t={stencil:!0,failIfMajorPerformanceCaveat:_t.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!_t.ADAPTER.getWebGLRenderingContext())return!1;const n=_t.ADAPTER.createCanvas();let s=n.getContext("webgl",t)||n.getContext("experimental-webgl",t);const a=!!((r=s==null?void 0:s.getContextAttributes())!=null&&r.stencil);if(s){const u=s.getExtension("WEBGL_lose_context");u&&u.loseContext()}return s=null,a}catch{return!1}}()),Lu}var Gb={grad:.9,turn:360,rad:360/(2*Math.PI)},kr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},ye=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},Ye=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Lf=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},kf=function(e){return{r:Ye(e.r,0,255),g:Ye(e.g,0,255),b:Ye(e.b,0,255),a:Ye(e.a)}},ku=function(e){return{r:ye(e.r),g:ye(e.g),b:ye(e.b),a:ye(e.a,3)}},zb=/^#([0-9a-f]{3,8})$/i,ra=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Bf=function(e){var t=e.r,r=e.g,n=e.b,s=e.a,a=Math.max(t,r,n),u=a-Math.min(t,r,n),l=u?a===t?(r-n)/u:a===r?2+(n-t)/u:4+(t-r)/u:0;return{h:60*(l<0?l+6:l),s:a?u/a*100:0,v:a/255*100,a:s}},Df=function(e){var t=e.h,r=e.s,n=e.v,s=e.a;t=t/360*6,r/=100,n/=100;var a=Math.floor(t),u=n*(1-r),l=n*(1-(t-a)*r),c=n*(1-(1-t+a)*r),f=a%6;return{r:255*[n,l,u,u,c,n][f],g:255*[c,n,n,l,u,u][f],b:255*[u,u,c,n,n,l][f],a:s}},Uf=function(e){return{h:Lf(e.h),s:Ye(e.s,0,100),l:Ye(e.l,0,100),a:Ye(e.a)}},$f=function(e){return{h:ye(e.h),s:ye(e.s),l:ye(e.l),a:ye(e.a,3)}},Gf=function(e){return Df((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},ts=function(e){return{h:(t=Bf(e)).h,s:(s=(200-(r=t.s))*(n=t.v)/100)>0&&s<200?r*n/100/(s<=100?s:200-s)*100:0,l:s/2,a:t.a};var t,r,n,s},Hb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Vb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bu={string:[[function(e){var t=zb.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?ye(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?ye(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=jb.exec(e)||Xb.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:kf({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(e){var t=Hb.exec(e)||Vb.exec(e);if(!t)return null;var r,n,s=Uf({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(Gb[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Gf(s)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,s=e.a,a=s===void 0?1:s;return kr(t)&&kr(r)&&kr(n)?kf({r:Number(t),g:Number(r),b:Number(n),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,s=e.a,a=s===void 0?1:s;if(!kr(t)||!kr(r)||!kr(n))return null;var u=Uf({h:Number(t),s:Number(r),l:Number(n),a:Number(a)});return Gf(u)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,s=e.a,a=s===void 0?1:s;if(!kr(t)||!kr(r)||!kr(n))return null;var u=function(l){return{h:Lf(l.h),s:Ye(l.s,0,100),v:Ye(l.v,0,100),a:Ye(l.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(a)});return Df(u)},"hsv"]]},zf=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},Wb=function(e){return typeof e=="string"?zf(e.trim(),Bu.string):typeof e=="object"&&e!==null?zf(e,Bu.object):[null,void 0]},Du=function(e,t){var r=ts(e);return{h:r.h,s:Ye(r.s+100*t,0,100),l:r.l,a:r.a}},Uu=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Hf=function(e,t){var r=ts(e);return{h:r.h,s:r.s,l:Ye(r.l+100*t,0,100),a:r.a}},$u=function(){function e(t){this.parsed=Wb(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return ye(Uu(this.rgba),2)},e.prototype.isDark=function(){return Uu(this.rgba)<.5},e.prototype.isLight=function(){return Uu(this.rgba)>=.5},e.prototype.toHex=function(){return t=ku(this.rgba),r=t.r,n=t.g,s=t.b,u=(a=t.a)<1?ra(ye(255*a)):"","#"+ra(r)+ra(n)+ra(s)+u;var t,r,n,s,a,u},e.prototype.toRgb=function(){return ku(this.rgba)},e.prototype.toRgbString=function(){return t=ku(this.rgba),r=t.r,n=t.g,s=t.b,(a=t.a)<1?"rgba("+r+", "+n+", "+s+", "+a+")":"rgb("+r+", "+n+", "+s+")";var t,r,n,s,a},e.prototype.toHsl=function(){return $f(ts(this.rgba))},e.prototype.toHslString=function(){return t=$f(ts(this.rgba)),r=t.h,n=t.s,s=t.l,(a=t.a)<1?"hsla("+r+", "+n+"%, "+s+"%, "+a+")":"hsl("+r+", "+n+"%, "+s+"%)";var t,r,n,s,a},e.prototype.toHsv=function(){return t=Bf(this.rgba),{h:ye(t.h),s:ye(t.s),v:ye(t.v),a:ye(t.a,3)};var t},e.prototype.invert=function(){return Ir({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Ir(Du(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ir(Du(this.rgba,-t))},e.prototype.grayscale=function(){return Ir(Du(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ir(Hf(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ir(Hf(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Ir({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):ye(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=ts(this.rgba);return typeof t=="number"?Ir({h:t,s:r.s,l:r.l,a:r.a}):ye(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Ir(t).toHex()},e}(),Ir=function(e){return e instanceof $u?e:new $u(e)},Vf=[],qb=function(e){e.forEach(function(t){Vf.indexOf(t)<0&&(t($u,Bu),Vf.push(t))})};function Yb(e,t){var r={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"},n={};for(var s in r)n[r[s]]=s;var a={};e.prototype.toName=function(u){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var l,c,f=n[this.toHex()];if(f)return f;if(u!=null&&u.closest){var p=this.toRgb(),m=1/0,g="black";if(!a.length)for(var x in r)a[x]=new e(r[x]).toRgb();for(var y in r){var S=(l=p,c=a[y],Math.pow(l.r-c.r,2)+Math.pow(l.g-c.g,2)+Math.pow(l.b-c.b,2));S<m&&(m=S,g=y)}return g}},t.string.push([function(u){var l=u.toLowerCase(),c=l==="transparent"?"#0000":r[l];return c?new e(c).toRgb():null},"name"])}qb([Yb]);const ai=class{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}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(e){return this.value=e,this}set value(e){if(e instanceof ai)this._value=this.cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,e))&&(this.normalize(e),this._value=this.cloneSource(e))}}get value(){return this._value}cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}isSourceEqual(e,t){const r=typeof e;if(r!==typeof t)return!1;if(r==="number"||r==="string"||e instanceof Number)return e===t;if(Array.isArray(e)&&Array.isArray(t)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return e.length!==t.length?!1:e.every((s,a)=>s===t[a]);if(e!==null&&t!==null){const s=Object.keys(e),a=Object.keys(t);return s.length!==a.length?!1:s.every(u=>e[u]===t[u])}return e===t}toRgba(){const[e,t,r,n]=this._components;return{r:e,g:t,b:r,a:n}}toRgb(){const[e,t,r]=this._components;return{r:e,g:t,b:r}}toRgbaString(){const[e,t,r]=this.toUint8RgbArray();return`rgba(${e},${t},${r},${this.alpha})`}toUint8RgbArray(e){const[t,r,n]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(r*255),e[2]=Math.round(n*255),e}toRgbArray(e){e=e??[];const[t,r,n]=this._components;return e[0]=t,e[1]=r,e[2]=n,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,r,n,s]=ai.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=r,this._components[2]*=n,this._components[3]*=s,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e){if(e===1)return(e*255<<24)+this._int;if(e===0)return 0;let t=this._int>>16&255,r=this._int>>8&255,n=this._int&255;return t=t*e+.5|0,r=r*e+.5|0,n=n*e+.5|0,(e*255<<24)+(t<<16)+(r<<8)+n}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,r,n]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(r*e)/e,this._components[2]=Math.round(n*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,r,n,s]=this._components;return e[0]=t,e[1]=r,e[2]=n,e[3]=s,e}normalize(e){let t;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const r=e;t=[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255,1]}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4){e=this._clamp(e);const[r,n,s,a=1]=e;t=[r,n,s,a]}else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4){e=this._clamp(e,0,255);const[r,n,s,a=255]=e;t=[r/255,n/255,s/255,a/255]}else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const n=ai.HEX_PATTERN.exec(e);n&&(e=`#${n[2]}`)}const r=Ir(e);if(r.isValid()){const{r:n,g:s,b:a,a:u}=r.rgba;t=[n/255,s/255,a/255,u]}}if(t)this._components.set(t),this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,r]=this._components;this._int=(e*255<<16)+(t*255<<8)+(r*255|0)}_clamp(e,t=0,r=1){return typeof e=="number"?Math.min(Math.max(e,t),r):(e.forEach((n,s)=>{e[s]=Math.min(Math.max(n,t),r)}),e)}};let Ce=ai;Ce.shared=new ai,Ce.temp=new ai,Ce.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function na(e,t=[]){return Rt("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Ce.shared.setValue(e).toRgbArray(t)}function Gu(e){return Rt("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Ce.shared.setValue(e).toNumber()}function Kb(){const e=[],t=[];for(let n=0;n<32;n++)e[n]=n,t[n]=n;e[ht.NORMAL_NPM]=ht.NORMAL,e[ht.ADD_NPM]=ht.ADD,e[ht.SCREEN_NPM]=ht.SCREEN,t[ht.NORMAL]=ht.NORMAL_NPM,t[ht.ADD]=ht.ADD_NPM,t[ht.SCREEN]=ht.SCREEN_NPM;const r=[];return r.push(t),r.push(e),r}const Zb=Kb();function jf(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return"Uint16Array"}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return"Uint8Array";return null}function ia(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function Xf(e){return!(e&e-1)&&!!e}function Wf(e){let t=(e>65535?1:0)<<4;e>>>=t;let r=(e>255?1:0)<<3;return e>>>=r,t|=r,r=(e>15?1:0)<<2,e>>>=r,t|=r,r=(e>3?1:0)<<1,e>>>=r,t|=r,t|e>>1}function sa(e,t,r){const n=e.length;let s;if(t>=n||r===0)return;r=t+r>n?n-t:r;const a=n-r;for(s=t;s<a;++s)e[s]=e[s+r];e.length=a}let Jb=0;function es(){return++Jb}const qf={},Rr=Object.create(null),en=Object.create(null);let aa;function Qb(e,t=globalThis.location){if(e.startsWith("data:"))return"";t=t||globalThis.location,aa||(aa=document.createElement("a")),aa.href=e;const r=Ub.parse(aa.href),n=!r.port&&t.port===""||r.port===t.port;return r.hostname!==t.hostname||!n||r.protocol!==t.protocol?"anonymous":""}function Yf(e,t=1){var n;const r=(n=_t.RETINA_PREFIX)==null?void 0:n.exec(e);return r?parseFloat(r[1]):t}var Ct=(e=>(e.Renderer="renderer",e.Application="application",e.RendererSystem="renderer-webgl-system",e.RendererPlugin="renderer-webgl-plugin",e.CanvasRendererSystem="renderer-canvas-system",e.CanvasRendererPlugin="renderer-canvas-plugin",e.Asset="asset",e.LoadParser="load-parser",e.ResolveParser="resolve-parser",e.CacheParser="cache-parser",e.DetectionParser="detection-parser",e))(Ct||{});const zu=e=>{if(typeof e=="function"||typeof e=="object"&&e.extension){if(!e.extension)throw new Error("Extension class must have an extension object");e={...typeof e.extension!="object"?{type:e.extension}:e.extension,ref:e}}if(typeof e=="object")e={...e};else throw new Error("Invalid extension type");return typeof e.type=="string"&&(e.type=[e.type]),e},Kf=(e,t)=>zu(e).priority??t,Gt={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(zu).forEach(t=>{t.type.forEach(r=>{var n,s;return(s=(n=this._removeHandlers)[r])==null?void 0:s.call(n,t)})}),this},add(...e){return e.map(zu).forEach(t=>{t.type.forEach(r=>{const n=this._addHandlers,s=this._queue;n[r]?n[r](t):(s[r]=s[r]||[],s[r].push(t))})}),this},handle(e,t,r){const n=this._addHandlers,s=this._removeHandlers;if(n[e]||s[e])throw new Error(`Extension type ${e} already has a handler`);n[e]=t,s[e]=r;const a=this._queue;return a[e]&&(a[e].forEach(u=>t(u)),delete a[e]),this},handleByMap(e,t){return this.handle(e,r=>{t[r.name]=r.ref},r=>{delete t[r.name]})},handleByList(e,t,r=-1){return this.handle(e,n=>{t.includes(n.ref)||(t.push(n.ref),t.sort((s,a)=>Kf(a,r)-Kf(s,r)))},n=>{const s=t.indexOf(n.ref);s!==-1&&t.splice(s,1)})}};class tT{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn't a valid view type`)}}}const eT=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
18
+ Deprecated since v${e}`),console.warn(n))),Nf[t]=!0}let Lu;function $b(){return typeof Lu>"u"&&(Lu=function(){var r;const t={stencil:!0,failIfMajorPerformanceCaveat:xt.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!xt.ADAPTER.getWebGLRenderingContext())return!1;const n=xt.ADAPTER.createCanvas();let s=n.getContext("webgl",t)||n.getContext("experimental-webgl",t);const a=!!((r=s==null?void 0:s.getContextAttributes())!=null&&r.stencil);if(s){const u=s.getExtension("WEBGL_lose_context");u&&u.loseContext()}return s=null,a}catch{return!1}}()),Lu}var Gb={grad:.9,turn:360,rad:360/(2*Math.PI)},kr=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},ye=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},Ye=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e>t?e:t},Lf=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},kf=function(e){return{r:Ye(e.r,0,255),g:Ye(e.g,0,255),b:Ye(e.b,0,255),a:Ye(e.a)}},ku=function(e){return{r:ye(e.r),g:ye(e.g),b:ye(e.b),a:ye(e.a,3)}},zb=/^#([0-9a-f]{3,8})$/i,ra=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Bf=function(e){var t=e.r,r=e.g,n=e.b,s=e.a,a=Math.max(t,r,n),u=a-Math.min(t,r,n),l=u?a===t?(r-n)/u:a===r?2+(n-t)/u:4+(t-r)/u:0;return{h:60*(l<0?l+6:l),s:a?u/a*100:0,v:a/255*100,a:s}},Df=function(e){var t=e.h,r=e.s,n=e.v,s=e.a;t=t/360*6,r/=100,n/=100;var a=Math.floor(t),u=n*(1-r),l=n*(1-(t-a)*r),c=n*(1-(1-t+a)*r),f=a%6;return{r:255*[n,l,u,u,c,n][f],g:255*[c,n,n,l,u,u][f],b:255*[u,u,c,n,n,l][f],a:s}},Uf=function(e){return{h:Lf(e.h),s:Ye(e.s,0,100),l:Ye(e.l,0,100),a:Ye(e.a)}},$f=function(e){return{h:ye(e.h),s:ye(e.s),l:ye(e.l),a:ye(e.a,3)}},Gf=function(e){return Df((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},ts=function(e){return{h:(t=Bf(e)).h,s:(s=(200-(r=t.s))*(n=t.v)/100)>0&&s<200?r*n/100/(s<=100?s:200-s)*100:0,l:s/2,a:t.a};var t,r,n,s},Hb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Vb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Xb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Bu={string:[[function(e){var t=zb.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?ye(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?ye(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=jb.exec(e)||Xb.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:kf({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(e){var t=Hb.exec(e)||Vb.exec(e);if(!t)return null;var r,n,s=Uf({h:(r=t[1],n=t[2],n===void 0&&(n="deg"),Number(r)*(Gb[n]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Gf(s)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,s=e.a,a=s===void 0?1:s;return kr(t)&&kr(r)&&kr(n)?kf({r:Number(t),g:Number(r),b:Number(n),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,s=e.a,a=s===void 0?1:s;if(!kr(t)||!kr(r)||!kr(n))return null;var u=Uf({h:Number(t),s:Number(r),l:Number(n),a:Number(a)});return Gf(u)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,s=e.a,a=s===void 0?1:s;if(!kr(t)||!kr(r)||!kr(n))return null;var u=function(l){return{h:Lf(l.h),s:Ye(l.s,0,100),v:Ye(l.v,0,100),a:Ye(l.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(a)});return Df(u)},"hsv"]]},zf=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},Wb=function(e){return typeof e=="string"?zf(e.trim(),Bu.string):typeof e=="object"&&e!==null?zf(e,Bu.object):[null,void 0]},Du=function(e,t){var r=ts(e);return{h:r.h,s:Ye(r.s+100*t,0,100),l:r.l,a:r.a}},Uu=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Hf=function(e,t){var r=ts(e);return{h:r.h,s:r.s,l:Ye(r.l+100*t,0,100),a:r.a}},$u=function(){function e(t){this.parsed=Wb(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return ye(Uu(this.rgba),2)},e.prototype.isDark=function(){return Uu(this.rgba)<.5},e.prototype.isLight=function(){return Uu(this.rgba)>=.5},e.prototype.toHex=function(){return t=ku(this.rgba),r=t.r,n=t.g,s=t.b,u=(a=t.a)<1?ra(ye(255*a)):"","#"+ra(r)+ra(n)+ra(s)+u;var t,r,n,s,a,u},e.prototype.toRgb=function(){return ku(this.rgba)},e.prototype.toRgbString=function(){return t=ku(this.rgba),r=t.r,n=t.g,s=t.b,(a=t.a)<1?"rgba("+r+", "+n+", "+s+", "+a+")":"rgb("+r+", "+n+", "+s+")";var t,r,n,s,a},e.prototype.toHsl=function(){return $f(ts(this.rgba))},e.prototype.toHslString=function(){return t=$f(ts(this.rgba)),r=t.h,n=t.s,s=t.l,(a=t.a)<1?"hsla("+r+", "+n+"%, "+s+"%, "+a+")":"hsl("+r+", "+n+"%, "+s+"%)";var t,r,n,s,a},e.prototype.toHsv=function(){return t=Bf(this.rgba),{h:ye(t.h),s:ye(t.s),v:ye(t.v),a:ye(t.a,3)};var t},e.prototype.invert=function(){return Ir({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),Ir(Du(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),Ir(Du(this.rgba,-t))},e.prototype.grayscale=function(){return Ir(Du(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),Ir(Hf(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),Ir(Hf(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?Ir({r:(r=this.rgba).r,g:r.g,b:r.b,a:t}):ye(this.rgba.a,3);var r},e.prototype.hue=function(t){var r=ts(this.rgba);return typeof t=="number"?Ir({h:t,s:r.s,l:r.l,a:r.a}):ye(r.h)},e.prototype.isEqual=function(t){return this.toHex()===Ir(t).toHex()},e}(),Ir=function(e){return e instanceof $u?e:new $u(e)},Vf=[],qb=function(e){e.forEach(function(t){Vf.indexOf(t)<0&&(t($u,Bu),Vf.push(t))})};function Yb(e,t){var r={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"},n={};for(var s in r)n[r[s]]=s;var a={};e.prototype.toName=function(u){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var l,c,f=n[this.toHex()];if(f)return f;if(u!=null&&u.closest){var p=this.toRgb(),m=1/0,g="black";if(!a.length)for(var x in r)a[x]=new e(r[x]).toRgb();for(var y in r){var S=(l=p,c=a[y],Math.pow(l.r-c.r,2)+Math.pow(l.g-c.g,2)+Math.pow(l.b-c.b,2));S<m&&(m=S,g=y)}return g}},t.string.push([function(u){var l=u.toLowerCase(),c=l==="transparent"?"#0000":r[l];return c?new e(c).toRgb():null},"name"])}qb([Yb]);const ai=class{constructor(e=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=e}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(e){return this.value=e,this}set value(e){if(e instanceof ai)this._value=this.cloneSource(e._value),this._int=e._int,this._components.set(e._components);else{if(e===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,e))&&(this.normalize(e),this._value=this.cloneSource(e))}}get value(){return this._value}cloneSource(e){return typeof e=="string"||typeof e=="number"||e instanceof Number||e===null?e:Array.isArray(e)||ArrayBuffer.isView(e)?e.slice(0):typeof e=="object"&&e!==null?{...e}:e}isSourceEqual(e,t){const r=typeof e;if(r!==typeof t)return!1;if(r==="number"||r==="string"||e instanceof Number)return e===t;if(Array.isArray(e)&&Array.isArray(t)||ArrayBuffer.isView(e)&&ArrayBuffer.isView(t))return e.length!==t.length?!1:e.every((s,a)=>s===t[a]);if(e!==null&&t!==null){const s=Object.keys(e),a=Object.keys(t);return s.length!==a.length?!1:s.every(u=>e[u]===t[u])}return e===t}toRgba(){const[e,t,r,n]=this._components;return{r:e,g:t,b:r,a:n}}toRgb(){const[e,t,r]=this._components;return{r:e,g:t,b:r}}toRgbaString(){const[e,t,r]=this.toUint8RgbArray();return`rgba(${e},${t},${r},${this.alpha})`}toUint8RgbArray(e){const[t,r,n]=this._components;return e=e??[],e[0]=Math.round(t*255),e[1]=Math.round(r*255),e[2]=Math.round(n*255),e}toRgbArray(e){e=e??[];const[t,r,n]=this._components;return e[0]=t,e[1]=r,e[2]=n,e}toNumber(){return this._int}toLittleEndianNumber(){const e=this._int;return(e>>16)+(e&65280)+((e&255)<<16)}multiply(e){const[t,r,n,s]=ai.temp.setValue(e)._components;return this._components[0]*=t,this._components[1]*=r,this._components[2]*=n,this._components[3]*=s,this.refreshInt(),this._value=null,this}premultiply(e,t=!0){return t&&(this._components[0]*=e,this._components[1]*=e,this._components[2]*=e),this._components[3]=e,this.refreshInt(),this._value=null,this}toPremultiplied(e){if(e===1)return(e*255<<24)+this._int;if(e===0)return 0;let t=this._int>>16&255,r=this._int>>8&255,n=this._int&255;return t=t*e+.5|0,r=r*e+.5|0,n=n*e+.5|0,(e*255<<24)+(t<<16)+(r<<8)+n}toHex(){const e=this._int.toString(16);return`#${"000000".substring(0,6-e.length)+e}`}toHexa(){const t=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-t.length)+t}setAlpha(e){return this._components[3]=this._clamp(e),this}round(e){const[t,r,n]=this._components;return this._components[0]=Math.round(t*e)/e,this._components[1]=Math.round(r*e)/e,this._components[2]=Math.round(n*e)/e,this.refreshInt(),this._value=null,this}toArray(e){e=e??[];const[t,r,n,s]=this._components;return e[0]=t,e[1]=r,e[2]=n,e[3]=s,e}normalize(e){let t;if((typeof e=="number"||e instanceof Number)&&e>=0&&e<=16777215){const r=e;t=[(r>>16&255)/255,(r>>8&255)/255,(r&255)/255,1]}else if((Array.isArray(e)||e instanceof Float32Array)&&e.length>=3&&e.length<=4){e=this._clamp(e);const[r,n,s,a=1]=e;t=[r,n,s,a]}else if((e instanceof Uint8Array||e instanceof Uint8ClampedArray)&&e.length>=3&&e.length<=4){e=this._clamp(e,0,255);const[r,n,s,a=255]=e;t=[r/255,n/255,s/255,a/255]}else if(typeof e=="string"||typeof e=="object"){if(typeof e=="string"){const n=ai.HEX_PATTERN.exec(e);n&&(e=`#${n[2]}`)}const r=Ir(e);if(r.isValid()){const{r:n,g:s,b:a,a:u}=r.rgba;t=[n/255,s/255,a/255,u]}}if(t)this._components.set(t),this.refreshInt();else throw new Error(`Unable to convert color ${e}`)}refreshInt(){this._clamp(this._components);const[e,t,r]=this._components;this._int=(e*255<<16)+(t*255<<8)+(r*255|0)}_clamp(e,t=0,r=1){return typeof e=="number"?Math.min(Math.max(e,t),r):(e.forEach((n,s)=>{e[s]=Math.min(Math.max(n,t),r)}),e)}};let Ce=ai;Ce.shared=new ai,Ce.temp=new ai,Ce.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function na(e,t=[]){return Rt("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Ce.shared.setValue(e).toRgbArray(t)}function Gu(e){return Rt("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Ce.shared.setValue(e).toNumber()}function Kb(){const e=[],t=[];for(let n=0;n<32;n++)e[n]=n,t[n]=n;e[ht.NORMAL_NPM]=ht.NORMAL,e[ht.ADD_NPM]=ht.ADD,e[ht.SCREEN_NPM]=ht.SCREEN,t[ht.NORMAL]=ht.NORMAL_NPM,t[ht.ADD]=ht.ADD_NPM,t[ht.SCREEN]=ht.SCREEN_NPM;const r=[];return r.push(t),r.push(e),r}const Zb=Kb();function jf(e){if(e.BYTES_PER_ELEMENT===4)return e instanceof Float32Array?"Float32Array":e instanceof Uint32Array?"Uint32Array":"Int32Array";if(e.BYTES_PER_ELEMENT===2){if(e instanceof Uint16Array)return"Uint16Array"}else if(e.BYTES_PER_ELEMENT===1&&e instanceof Uint8Array)return"Uint8Array";return null}function ia(e){return e+=e===0?1:0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1}function Xf(e){return!(e&e-1)&&!!e}function Wf(e){let t=(e>65535?1:0)<<4;e>>>=t;let r=(e>255?1:0)<<3;return e>>>=r,t|=r,r=(e>15?1:0)<<2,e>>>=r,t|=r,r=(e>3?1:0)<<1,e>>>=r,t|=r,t|e>>1}function sa(e,t,r){const n=e.length;let s;if(t>=n||r===0)return;r=t+r>n?n-t:r;const a=n-r;for(s=t;s<a;++s)e[s]=e[s+r];e.length=a}let Jb=0;function es(){return++Jb}const qf={},Rr=Object.create(null),en=Object.create(null);let aa;function Qb(e,t=globalThis.location){if(e.startsWith("data:"))return"";t=t||globalThis.location,aa||(aa=document.createElement("a")),aa.href=e;const r=Ub.parse(aa.href),n=!r.port&&t.port===""||r.port===t.port;return r.hostname!==t.hostname||!n||r.protocol!==t.protocol?"anonymous":""}function Yf(e,t=1){var n;const r=(n=xt.RETINA_PREFIX)==null?void 0:n.exec(e);return r?parseFloat(r[1]):t}var At=(e=>(e.Renderer="renderer",e.Application="application",e.RendererSystem="renderer-webgl-system",e.RendererPlugin="renderer-webgl-plugin",e.CanvasRendererSystem="renderer-canvas-system",e.CanvasRendererPlugin="renderer-canvas-plugin",e.Asset="asset",e.LoadParser="load-parser",e.ResolveParser="resolve-parser",e.CacheParser="cache-parser",e.DetectionParser="detection-parser",e))(At||{});const zu=e=>{if(typeof e=="function"||typeof e=="object"&&e.extension){if(!e.extension)throw new Error("Extension class must have an extension object");e={...typeof e.extension!="object"?{type:e.extension}:e.extension,ref:e}}if(typeof e=="object")e={...e};else throw new Error("Invalid extension type");return typeof e.type=="string"&&(e.type=[e.type]),e},Kf=(e,t)=>zu(e).priority??t,$t={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e){return e.map(zu).forEach(t=>{t.type.forEach(r=>{var n,s;return(s=(n=this._removeHandlers)[r])==null?void 0:s.call(n,t)})}),this},add(...e){return e.map(zu).forEach(t=>{t.type.forEach(r=>{const n=this._addHandlers,s=this._queue;n[r]?n[r](t):(s[r]=s[r]||[],s[r].push(t))})}),this},handle(e,t,r){const n=this._addHandlers,s=this._removeHandlers;if(n[e]||s[e])throw new Error(`Extension type ${e} already has a handler`);n[e]=t,s[e]=r;const a=this._queue;return a[e]&&(a[e].forEach(u=>t(u)),delete a[e]),this},handleByMap(e,t){return this.handle(e,r=>{t[r.name]=r.ref},r=>{delete t[r.name]})},handleByList(e,t,r=-1){return this.handle(e,n=>{t.includes(n.ref)||(t.push(n.ref),t.sort((s,a)=>Kf(a,r)-Kf(s,r)))},n=>{const s=t.indexOf(n.ref);s!==-1&&t.splice(s,1)})}};class tT{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn't a valid view type`)}}}const eT=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
19
19
  `);function rT(e){let t="";for(let r=0;r<e;++r)r>0&&(t+=`
20
- else `),r<e-1&&(t+=`if(test == ${r}.0){}`);return t}function nT(e,t){if(e===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const r=t.createShader(t.FRAGMENT_SHADER);for(;;){const n=eT.replace(/%forloop%/gi,rT(e));if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))e=e/2|0;else break}return e}const Hu=0,Vu=1,ju=2,Xu=3,Wu=4,qu=5;let oa=class tv{constructor(){this.data=0,this.blendMode=ht.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Hu)}set blend(t){!!(this.data&1<<Hu)!==t&&(this.data^=1<<Hu)}get offsets(){return!!(this.data&1<<Vu)}set offsets(t){!!(this.data&1<<Vu)!==t&&(this.data^=1<<Vu)}get culling(){return!!(this.data&1<<ju)}set culling(t){!!(this.data&1<<ju)!==t&&(this.data^=1<<ju)}get depthTest(){return!!(this.data&1<<Xu)}set depthTest(t){!!(this.data&1<<Xu)!==t&&(this.data^=1<<Xu)}get depthMask(){return!!(this.data&1<<qu)}set depthMask(t){!!(this.data&1<<qu)!==t&&(this.data^=1<<qu)}get clockwiseFrontFace(){return!!(this.data&1<<Wu)}set clockwiseFrontFace(t){!!(this.data&1<<Wu)!==t&&(this.data^=1<<Wu)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!==ht.NONE,this._blendMode=t}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new tv;return t.depthTest=!1,t.blend=!0,t}};const Yu=[];function Zf(e,t){if(!e)return null;let r="";if(typeof e=="string"){const n=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);n&&(r=n[1].toLowerCase())}for(let n=Yu.length-1;n>=0;--n){const s=Yu[n];if(s.test&&s.test(e,r))return new s(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class sr{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,r,n,s,a,u,l,c){if(arguments.length>8)throw new Error("max arguments reached");const{name:f,items:p}=this;this._aliasCount++;for(let m=0,g=p.length;m<g;m++)p[m][f](t,r,n,s,a,u,l,c);return p===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const r=this.items.indexOf(t);return r!==-1&&(this.ensureNonAliasedItems(),this.items.splice(r,1)),this}contains(t){return this.items.includes(t)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(sr.prototype,{dispatch:{value:sr.prototype.emit},run:{value:sr.prototype.emit}});class rs{constructor(t=0,r=0){this._width=t,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new sr("setRealSize"),this.onUpdate=new sr("update"),this.onError=new sr("onError")}bind(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)}resize(t,r){(t!==this._width||r!==this._height)&&(this._width=t,this._height=r,this.onResize.emit(t,r))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(t,r,n){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(t,r){return!1}}class Ku extends rs{constructor(t,r){const{width:n,height:s}=r||{};if(!n||!s)throw new Error("BufferResource width or height invalid");super(n,s),this.data=t}upload(t,r,n){const s=t.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Zr.UNPACK);const a=r.realWidth,u=r.realHeight;return n.width===a&&n.height===u?s.texSubImage2D(r.target,0,0,0,a,u,r.format,n.type,this.data):(n.width=a,n.height=u,s.texImage2D(r.target,0,n.internalFormat,a,u,0,r.format,n.type,this.data)),!0}dispose(){this.data=null}static test(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array}}const iT={scaleMode:Sr.NEAREST,format:Z.RGBA,alphaMode:Zr.NPM},oi=class extends Gs{constructor(e=null,t=null){super(),t=Object.assign({},oi.defaultOptions,t);const{alphaMode:r,mipmap:n,anisotropicLevel:s,scaleMode:a,width:u,height:l,wrapMode:c,format:f,type:p,target:m,resolution:g,resourceOptions:x}=t;e&&!(e instanceof rs)&&(e=Zf(e,x),e.internal=!0),this.resolution=g||_t.RESOLUTION,this.width=Math.round((u||0)*this.resolution)/this.resolution,this.height=Math.round((l||0)*this.resolution)/this.resolution,this._mipmap=n,this.anisotropicLevel=s,this._wrapMode=c,this._scaleMode=a,this.format=f,this.type=p,this.target=m,this.alphaMode=r,this.uid=es(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=u>0&&l>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let r;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,r=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,r=!0),r&&this.dirtyStyleId++,this}setSize(e,t,r){return r=r||this.resolution,this.setRealSize(e*r,t*r,r)}setRealSize(e,t,r){return this.resolution=r||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Xf(this.realWidth)&&Xf(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete en[this.cacheId],delete Rr[this.cacheId],this.cacheId=null),this.dispose(),oi.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,r=_t.STRICT_TEXTURE_CACHE){const n=typeof e=="string";let s=null;if(n)s=e;else{if(!e._pixiId){const u=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${u}_${es()}`}s=e._pixiId}let a=en[s];if(n&&r&&!a)throw new Error(`The cacheId "${s}" does not exist in BaseTextureCache.`);return a||(a=new oi(e,t),a.cacheId=s,oi.addToCache(a,s)),a}static fromBuffer(e,t,r,n){e=e||new Float32Array(t*r*4);const s=new Ku(e,{width:t,height:r}),a=e instanceof Float32Array?Nt.FLOAT:Nt.UNSIGNED_BYTE;return new oi(s,Object.assign({},iT,n||{width:t,height:r,type:a}))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),en[t]&&en[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),en[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=en[e];if(t){const r=t.textureCacheIds.indexOf(e);return r>-1&&t.textureCacheIds.splice(r,1),delete en[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t<e.textureCacheIds.length;++t)delete en[e.textureCacheIds[t]];return e.textureCacheIds.length=0,e}return null}};let Lt=oi;Lt.defaultOptions={mipmap:yn.POW2,anisotropicLevel:0,scaleMode:Sr.LINEAR,wrapMode:ji.CLAMP,alphaMode:Zr.UNPACK,target:qn.TEXTURE_2D,format:Z.RGBA,type:Nt.UNSIGNED_BYTE},Lt._globalBatch=0;class Zu{constructor(){this.texArray=null,this.blend=0,this.type=Kr.TRIANGLES,this.start=0,this.size=0,this.data=null}}let sT=0;class Re{constructor(t,r=!0,n=!1){this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=n,this.static=r,this.id=sT++,this.disposeRunner=new sr("disposeBuffer")}update(t){t instanceof Array&&(t=new Float32Array(t)),this.data=t||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(t){this.type=t?Ar.ELEMENT_ARRAY_BUFFER:Ar.ARRAY_BUFFER}get index(){return this.type===Ar.ELEMENT_ARRAY_BUFFER}static from(t){return t instanceof Array&&(t=new Float32Array(t)),new Re(t)}}class ua{constructor(t,r=0,n=!1,s=Nt.FLOAT,a,u,l,c=1){this.buffer=t,this.size=r,this.normalized=n,this.type=s,this.stride=a,this.start=u,this.instance=l,this.divisor=c}destroy(){this.buffer=null}static from(t,r,n,s,a){return new ua(t,r,n,s,a)}}const aT={Float32Array,Uint32Array,Int32Array,Uint8Array};function oT(e,t){let r=0,n=0;const s={};for(let c=0;c<e.length;c++)n+=t[c],r+=e[c].length;const a=new ArrayBuffer(r*4);let u=null,l=0;for(let c=0;c<e.length;c++){const f=t[c],p=e[c],m=jf(p);s[m]||(s[m]=new aT[m](a)),u=s[m];for(let g=0;g<p.length;g++){const x=(g/f|0)*n+l,y=g%f;u[x+y]=p[g]}l+=f}return new Float32Array(a)}const Jf={5126:4,5123:2,5121:1};let uT=0;const lT={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class ui{constructor(t=[],r={}){this.buffers=t,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=uT++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new sr("disposeGeometry"),this.refCount=0}addAttribute(t,r,n=0,s=!1,a,u,l,c=!1){if(!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof Re||(r instanceof Array&&(r=new Float32Array(r)),r=new Re(r));const f=t.split("|");if(f.length>1){for(let m=0;m<f.length;m++)this.addAttribute(f[m],r,n,s,a);return this}let p=this.buffers.indexOf(r);return p===-1&&(this.buffers.push(r),p=this.buffers.length-1),this.attributes[t]=new ua(p,n,s,a,u,l,c),this.instanced=this.instanced||c,this}getAttribute(t){return this.attributes[t]}getBuffer(t){return this.buffers[this.getAttribute(t).buffer]}addIndex(t){return t instanceof Re||(t instanceof Array&&(t=new Uint16Array(t)),t=new Re(t)),t.type=Ar.ELEMENT_ARRAY_BUFFER,this.indexBuffer=t,this.buffers.includes(t)||this.buffers.push(t),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const t=[],r=[],n=new Re;let s;for(s in this.attributes){const a=this.attributes[s],u=this.buffers[a.buffer];t.push(u.data),r.push(a.size*Jf[a.type]/4),a.buffer=0}for(n.data=oT(t,r),s=0;s<this.buffers.length;s++)this.buffers[s]!==this.indexBuffer&&this.buffers[s].destroy();return this.buffers=[n],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const t in this.attributes){const r=this.attributes[t];return this.buffers[r.buffer].data.length/(r.stride/4||r.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){const t=new ui;for(let r=0;r<this.buffers.length;r++)t.buffers[r]=new Re(this.buffers[r].data.slice(0));for(const r in this.attributes){const n=this.attributes[r];t.attributes[r]=new ua(n.buffer,n.size,n.normalized,n.type,n.stride,n.start,n.instance)}return this.indexBuffer&&(t.indexBuffer=t.buffers[this.buffers.indexOf(this.indexBuffer)],t.indexBuffer.type=Ar.ELEMENT_ARRAY_BUFFER),t}static merge(t){const r=new ui,n=[],s=[],a=[];let u;for(let l=0;l<t.length;l++){u=t[l];for(let c=0;c<u.buffers.length;c++)s[c]=s[c]||0,s[c]+=u.buffers[c].data.length,a[c]=0}for(let l=0;l<u.buffers.length;l++)n[l]=new lT[jf(u.buffers[l].data)](s[l]),r.buffers[l]=new Re(n[l]);for(let l=0;l<t.length;l++){u=t[l];for(let c=0;c<u.buffers.length;c++)n[c].set(u.buffers[c].data,a[c]),a[c]+=u.buffers[c].data.length}if(r.attributes=u.attributes,u.indexBuffer){r.indexBuffer=r.buffers[u.buffers.indexOf(u.indexBuffer)],r.indexBuffer.type=Ar.ELEMENT_ARRAY_BUFFER;let l=0,c=0,f=0,p=0;for(let m=0;m<u.buffers.length;m++)if(u.buffers[m]!==u.indexBuffer){p=m;break}for(const m in u.attributes){const g=u.attributes[m];(g.buffer|0)===p&&(c+=g.size*Jf[g.type]/4)}for(let m=0;m<t.length;m++){const g=t[m].indexBuffer.data;for(let x=0;x<g.length;x++)r.indexBuffer.data[x+f]+=l;l+=t[m].buffers[p].data.length/c,f+=g.length}}return r}}class Qf extends ui{constructor(t=!1){super(),this._buffer=new Re(null,t,!1),this._indexBuffer=new Re(null,t,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Nt.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Nt.FLOAT).addAttribute("aColor",this._buffer,4,!0,Nt.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Nt.FLOAT).addIndex(this._indexBuffer)}}const la=Math.PI*2,hT=180/Math.PI,ns=Math.PI/180;var xe=(e=>(e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC",e))(xe||{});class Wt{constructor(t=0,r=0){this.x=0,this.y=0,this.x=t,this.y=r}clone(){return new Wt(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,r=t){return this.x=t,this.y=r,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const ha=[new Wt,new Wt,new Wt,new Wt];class jt{constructor(t=0,r=0,n=0,s=0){this.x=Number(t),this.y=Number(r),this.width=Number(n),this.height=Number(s),this.type=xe.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new jt(0,0,0,0)}clone(){return new jt(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,r){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&r>=this.y&&r<this.y+this.height}intersects(t,r){if(!r){const O=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=O)return!1;const X=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>X}const n=this.left,s=this.right,a=this.top,u=this.bottom;if(s<=n||u<=a)return!1;const l=ha[0].set(t.left,t.top),c=ha[1].set(t.left,t.bottom),f=ha[2].set(t.right,t.top),p=ha[3].set(t.right,t.bottom);if(f.x<=l.x||c.y<=l.y)return!1;const m=Math.sign(r.a*r.d-r.b*r.c);if(m===0||(r.apply(l,l),r.apply(c,c),r.apply(f,f),r.apply(p,p),Math.max(l.x,c.x,f.x,p.x)<=n||Math.min(l.x,c.x,f.x,p.x)>=s||Math.max(l.y,c.y,f.y,p.y)<=a||Math.min(l.y,c.y,f.y,p.y)>=u))return!1;const g=m*(c.y-l.y),x=m*(l.x-c.x),y=g*n+x*a,S=g*s+x*a,T=g*n+x*u,w=g*s+x*u;if(Math.max(y,S,T,w)<=g*l.x+x*l.y||Math.min(y,S,T,w)>=g*p.x+x*p.y)return!1;const I=m*(l.y-f.y),A=m*(f.x-l.x),R=I*n+A*a,N=I*s+A*a,B=I*n+A*u,L=I*s+A*u;return!(Math.max(R,N,B,L)<=I*l.x+A*l.y||Math.min(R,N,B,L)>=I*p.x+A*p.y)}pad(t=0,r=t){return this.x-=t,this.y-=r,this.width+=t*2,this.height+=r*2,this}fit(t){const r=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),s=Math.max(this.y,t.y),a=Math.min(this.y+this.height,t.y+t.height);return this.x=r,this.width=Math.max(n-r,0),this.y=s,this.height=Math.max(a-s,0),this}ceil(t=1,r=.001){const n=Math.ceil((this.x+this.width-r)*t)/t,s=Math.ceil((this.y+this.height-r)*t)/t;return this.x=Math.floor((this.x+r)*t)/t,this.y=Math.floor((this.y+r)*t)/t,this.width=n-this.x,this.height=s-this.y,this}enlarge(t){const r=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),s=Math.min(this.y,t.y),a=Math.max(this.y+this.height,t.y+t.height);return this.x=r,this.width=n-r,this.y=s,this.height=a-s,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class Ju{constructor(t=0,r=0,n=0){this.x=t,this.y=r,this.radius=n,this.type=xe.CIRC}clone(){return new Ju(this.x,this.y,this.radius)}contains(t,r){if(this.radius<=0)return!1;const n=this.radius*this.radius;let s=this.x-t,a=this.y-r;return s*=s,a*=a,s+a<=n}getBounds(){return new jt(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}let cT=class ev{constructor(t=0,r=0,n=0,s=0){this.x=t,this.y=r,this.width=n,this.height=s,this.type=xe.ELIP}clone(){return new ev(this.x,this.y,this.width,this.height)}contains(t,r){if(this.width<=0||this.height<=0)return!1;let n=(t-this.x)/this.width,s=(r-this.y)/this.height;return n*=n,s*=s,n+s<=1}getBounds(){return new jt(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};class is{constructor(...t){let r=Array.isArray(t[0])?t[0]:t;if(typeof r[0]!="number"){const n=[];for(let s=0,a=r.length;s<a;s++)n.push(r[s].x,r[s].y);r=n}this.points=r,this.type=xe.POLY,this.closeStroke=!0}clone(){const t=this.points.slice(),r=new is(t);return r.closeStroke=this.closeStroke,r}contains(t,r){let n=!1;const s=this.points.length/2;for(let a=0,u=s-1;a<s;u=a++){const l=this.points[a*2],c=this.points[a*2+1],f=this.points[u*2],p=this.points[u*2+1];c>r!=p>r&&t<(f-l)*((r-c)/(p-c))+l&&(n=!n)}return n}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,r)=>`${t}, ${r}`,"")}]`}}class Qu{constructor(t=0,r=0,n=0,s=0,a=20){this.x=t,this.y=r,this.width=n,this.height=s,this.radius=a,this.type=xe.RREC}clone(){return new Qu(this.x,this.y,this.width,this.height,this.radius)}contains(t,r){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&r>=this.y&&r<=this.y+this.height){const n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(r>=this.y+n&&r<=this.y+this.height-n||t>=this.x+n&&t<=this.x+this.width-n)return!0;let s=t-(this.x+n),a=r-(this.y+n);const u=n*n;if(s*s+a*a<=u||(s=t-(this.x+this.width-n),s*s+a*a<=u)||(a=r-(this.y+this.height-n),s*s+a*a<=u)||(s=t-(this.x+n),s*s+a*a<=u))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}let Pe=class Uo{constructor(t=1,r=0,n=0,s=1,a=0,u=0){this.array=null,this.a=t,this.b=r,this.c=n,this.d=s,this.tx=a,this.ty=u}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,r,n,s,a,u){return this.a=t,this.b=r,this.c=n,this.d=s,this.tx=a,this.ty=u,this}toArray(t,r){this.array||(this.array=new Float32Array(9));const n=r||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n}apply(t,r){r=r||new Wt;const n=t.x,s=t.y;return r.x=this.a*n+this.c*s+this.tx,r.y=this.b*n+this.d*s+this.ty,r}applyInverse(t,r){r=r||new Wt;const n=1/(this.a*this.d+this.c*-this.b),s=t.x,a=t.y;return r.x=this.d*n*s+-this.c*n*a+(this.ty*this.c-this.tx*this.d)*n,r.y=this.a*n*a+-this.b*n*s+(-this.ty*this.a+this.tx*this.b)*n,r}translate(t,r){return this.tx+=t,this.ty+=r,this}scale(t,r){return this.a*=t,this.d*=r,this.c*=t,this.b*=r,this.tx*=t,this.ty*=r,this}rotate(t){const r=Math.cos(t),n=Math.sin(t),s=this.a,a=this.c,u=this.tx;return this.a=s*r-this.b*n,this.b=s*n+this.b*r,this.c=a*r-this.d*n,this.d=a*n+this.d*r,this.tx=u*r-this.ty*n,this.ty=u*n+this.ty*r,this}append(t){const r=this.a,n=this.b,s=this.c,a=this.d;return this.a=t.a*r+t.b*s,this.b=t.a*n+t.b*a,this.c=t.c*r+t.d*s,this.d=t.c*n+t.d*a,this.tx=t.tx*r+t.ty*s+this.tx,this.ty=t.tx*n+t.ty*a+this.ty,this}setTransform(t,r,n,s,a,u,l,c,f){return this.a=Math.cos(l+f)*a,this.b=Math.sin(l+f)*a,this.c=-Math.sin(l-c)*u,this.d=Math.cos(l-c)*u,this.tx=t-(n*this.a+s*this.c),this.ty=r-(n*this.b+s*this.d),this}prepend(t){const r=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const n=this.a,s=this.c;this.a=n*t.a+this.b*t.c,this.b=n*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=r*t.a+this.ty*t.c+t.tx,this.ty=r*t.b+this.ty*t.d+t.ty,this}decompose(t){const r=this.a,n=this.b,s=this.c,a=this.d,u=t.pivot,l=-Math.atan2(-s,a),c=Math.atan2(n,r),f=Math.abs(l+c);return f<1e-5||Math.abs(la-f)<1e-5?(t.rotation=c,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=l,t.skew.y=c),t.scale.x=Math.sqrt(r*r+n*n),t.scale.y=Math.sqrt(s*s+a*a),t.position.x=this.tx+(u.x*r+u.y*s),t.position.y=this.ty+(u.x*n+u.y*a),t}invert(){const t=this.a,r=this.b,n=this.c,s=this.d,a=this.tx,u=t*s-r*n;return this.a=s/u,this.b=-r/u,this.c=-n/u,this.d=t/u,this.tx=(n*this.ty-s*a)/u,this.ty=-(t*this.ty-r*a)/u,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new Uo;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}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new Uo}static get TEMP_MATRIX(){return new Uo}};const Sn=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],An=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Cn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],En=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],tl=[],td=[],ca=Math.sign;function fT(){for(let e=0;e<16;e++){const t=[];tl.push(t);for(let r=0;r<16;r++){const n=ca(Sn[e]*Sn[r]+Cn[e]*An[r]),s=ca(An[e]*Sn[r]+En[e]*An[r]),a=ca(Sn[e]*Cn[r]+Cn[e]*En[r]),u=ca(An[e]*Cn[r]+En[e]*En[r]);for(let l=0;l<16;l++)if(Sn[l]===n&&An[l]===s&&Cn[l]===a&&En[l]===u){t.push(l);break}}}for(let e=0;e<16;e++){const t=new Pe;t.set(Sn[e],An[e],Cn[e],En[e],0,0),td.push(t)}}fT();const ne={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:e=>Sn[e],uY:e=>An[e],vX:e=>Cn[e],vY:e=>En[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>tl[e][t],sub:(e,t)=>tl[e][ne.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?ne.S:ne.N:Math.abs(t)*2<=Math.abs(e)?e>0?ne.E:ne.W:t>0?e>0?ne.SE:ne.SW:e>0?ne.NE:ne.NW,matrixAppendRotationInv:(e,t,r=0,n=0)=>{const s=td[ne.inv(t)];s.tx=r,s.ty=n,e.append(s)}};class In{constructor(t,r,n=0,s=0){this._x=n,this._y=s,this.cb=t,this.scope=r}clone(t=this.cb,r=this.scope){return new In(t,r,this._x,this._y)}set(t=0,r=t){return(this._x!==t||this._y!==r)&&(this._x=t,this._y=r,this.cb.call(this.scope)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),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/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}const ed=class{constructor(){this.worldTransform=new Pe,this.localTransform=new Pe,this.position=new In(this.onChange,this,0,0),this.scale=new In(this.onChange,this,1,1),this.pivot=new In(this.onChange,this,0,0),this.skew=new In(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){const e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(e){const t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){const r=e.worldTransform,n=this.worldTransform;n.a=t.a*r.a+t.b*r.c,n.b=t.a*r.b+t.b*r.d,n.c=t.c*r.a+t.d*r.c,n.d=t.c*r.b+t.d*r.d,n.tx=t.tx*r.a+t.ty*r.c+r.tx,n.ty=t.tx*r.b+t.ty*r.d+r.ty,this._parentID=e._worldID,this._worldID++}}setFromMatrix(e){e.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())}};let el=ed;el.IDENTITY=new ed;var dT=`varying vec2 vTextureCoord;
20
+ else `),r<e-1&&(t+=`if(test == ${r}.0){}`);return t}function nT(e,t){if(e===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const r=t.createShader(t.FRAGMENT_SHADER);for(;;){const n=eT.replace(/%forloop%/gi,rT(e));if(t.shaderSource(r,n),t.compileShader(r),!t.getShaderParameter(r,t.COMPILE_STATUS))e=e/2|0;else break}return e}const Hu=0,Vu=1,ju=2,Xu=3,Wu=4,qu=5;let oa=class tv{constructor(){this.data=0,this.blendMode=ht.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Hu)}set blend(t){!!(this.data&1<<Hu)!==t&&(this.data^=1<<Hu)}get offsets(){return!!(this.data&1<<Vu)}set offsets(t){!!(this.data&1<<Vu)!==t&&(this.data^=1<<Vu)}get culling(){return!!(this.data&1<<ju)}set culling(t){!!(this.data&1<<ju)!==t&&(this.data^=1<<ju)}get depthTest(){return!!(this.data&1<<Xu)}set depthTest(t){!!(this.data&1<<Xu)!==t&&(this.data^=1<<Xu)}get depthMask(){return!!(this.data&1<<qu)}set depthMask(t){!!(this.data&1<<qu)!==t&&(this.data^=1<<qu)}get clockwiseFrontFace(){return!!(this.data&1<<Wu)}set clockwiseFrontFace(t){!!(this.data&1<<Wu)!==t&&(this.data^=1<<Wu)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!==ht.NONE,this._blendMode=t}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new tv;return t.depthTest=!1,t.blend=!0,t}};const Yu=[];function Zf(e,t){if(!e)return null;let r="";if(typeof e=="string"){const n=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);n&&(r=n[1].toLowerCase())}for(let n=Yu.length-1;n>=0;--n){const s=Yu[n];if(s.test&&s.test(e,r))return new s(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}class sr{constructor(t){this.items=[],this._name=t,this._aliasCount=0}emit(t,r,n,s,a,u,l,c){if(arguments.length>8)throw new Error("max arguments reached");const{name:f,items:p}=this;this._aliasCount++;for(let m=0,g=p.length;m<g;m++)p[m][f](t,r,n,s,a,u,l,c);return p===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this}remove(t){const r=this.items.indexOf(t);return r!==-1&&(this.ensureNonAliasedItems(),this.items.splice(r,1)),this}contains(t){return this.items.includes(t)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}Object.defineProperties(sr.prototype,{dispatch:{value:sr.prototype.emit},run:{value:sr.prototype.emit}});class rs{constructor(t=0,r=0){this._width=t,this._height=r,this.destroyed=!1,this.internal=!1,this.onResize=new sr("setRealSize"),this.onUpdate=new sr("update"),this.onError=new sr("onError")}bind(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)}resize(t,r){(t!==this._width||r!==this._height)&&(this._width=t,this._height=r,this.onResize.emit(t,r))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(t,r,n){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(t,r){return!1}}class Ku extends rs{constructor(t,r){const{width:n,height:s}=r||{};if(!n||!s)throw new Error("BufferResource width or height invalid");super(n,s),this.data=t}upload(t,r,n){const s=t.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Zr.UNPACK);const a=r.realWidth,u=r.realHeight;return n.width===a&&n.height===u?s.texSubImage2D(r.target,0,0,0,a,u,r.format,n.type,this.data):(n.width=a,n.height=u,s.texImage2D(r.target,0,n.internalFormat,a,u,0,r.format,n.type,this.data)),!0}dispose(){this.data=null}static test(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array}}const iT={scaleMode:Sr.NEAREST,format:Z.RGBA,alphaMode:Zr.NPM},oi=class extends Gs{constructor(e=null,t=null){super(),t=Object.assign({},oi.defaultOptions,t);const{alphaMode:r,mipmap:n,anisotropicLevel:s,scaleMode:a,width:u,height:l,wrapMode:c,format:f,type:p,target:m,resolution:g,resourceOptions:x}=t;e&&!(e instanceof rs)&&(e=Zf(e,x),e.internal=!0),this.resolution=g||xt.RESOLUTION,this.width=Math.round((u||0)*this.resolution)/this.resolution,this.height=Math.round((l||0)*this.resolution)/this.resolution,this._mipmap=n,this.anisotropicLevel=s,this._wrapMode=c,this._scaleMode=a,this.format=f,this.type=p,this.target=m,this.alphaMode=r,this.uid=es(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=u>0&&l>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(e)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(e){this._mipmap!==e&&(this._mipmap=e,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(e){this._scaleMode!==e&&(this._scaleMode=e,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(e){this._wrapMode!==e&&(this._wrapMode=e,this.dirtyStyleId++)}setStyle(e,t){let r;return e!==void 0&&e!==this.scaleMode&&(this.scaleMode=e,r=!0),t!==void 0&&t!==this.mipmap&&(this.mipmap=t,r=!0),r&&this.dirtyStyleId++,this}setSize(e,t,r){return r=r||this.resolution,this.setRealSize(e*r,t*r,r)}setRealSize(e,t,r){return this.resolution=r||this.resolution,this.width=Math.round(e)/this.resolution,this.height=Math.round(t)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Xf(this.realWidth)&&Xf(this.realHeight)}setResolution(e){const t=this.resolution;return t===e?this:(this.resolution=e,this.valid&&(this.width=Math.round(this.width*t)/e,this.height=Math.round(this.height*t)/e,this.emit("update",this)),this._refreshPOT(),this)}setResource(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(e){this.emit("error",this,e)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete en[this.cacheId],delete Rr[this.cacheId],this.cacheId=null),this.dispose(),oi.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(e,t,r=xt.STRICT_TEXTURE_CACHE){const n=typeof e=="string";let s=null;if(n)s=e;else{if(!e._pixiId){const u=(t==null?void 0:t.pixiIdPrefix)||"pixiid";e._pixiId=`${u}_${es()}`}s=e._pixiId}let a=en[s];if(n&&r&&!a)throw new Error(`The cacheId "${s}" does not exist in BaseTextureCache.`);return a||(a=new oi(e,t),a.cacheId=s,oi.addToCache(a,s)),a}static fromBuffer(e,t,r,n){e=e||new Float32Array(t*r*4);const s=new Ku(e,{width:t,height:r}),a=e instanceof Float32Array?Nt.FLOAT:Nt.UNSIGNED_BYTE;return new oi(s,Object.assign({},iT,n||{width:t,height:r,type:a}))}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),en[t]&&en[t]!==e&&console.warn(`BaseTexture added to the cache with an id [${t}] that already had an entry`),en[t]=e)}static removeFromCache(e){if(typeof e=="string"){const t=en[e];if(t){const r=t.textureCacheIds.indexOf(e);return r>-1&&t.textureCacheIds.splice(r,1),delete en[e],t}}else if(e!=null&&e.textureCacheIds){for(let t=0;t<e.textureCacheIds.length;++t)delete en[e.textureCacheIds[t]];return e.textureCacheIds.length=0,e}return null}};let Lt=oi;Lt.defaultOptions={mipmap:yn.POW2,anisotropicLevel:0,scaleMode:Sr.LINEAR,wrapMode:ji.CLAMP,alphaMode:Zr.UNPACK,target:qn.TEXTURE_2D,format:Z.RGBA,type:Nt.UNSIGNED_BYTE},Lt._globalBatch=0;class Zu{constructor(){this.texArray=null,this.blend=0,this.type=Kr.TRIANGLES,this.start=0,this.size=0,this.data=null}}let sT=0;class Re{constructor(t,r=!0,n=!1){this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=n,this.static=r,this.id=sT++,this.disposeRunner=new sr("disposeBuffer")}update(t){t instanceof Array&&(t=new Float32Array(t)),this.data=t||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(t){this.type=t?Ar.ELEMENT_ARRAY_BUFFER:Ar.ARRAY_BUFFER}get index(){return this.type===Ar.ELEMENT_ARRAY_BUFFER}static from(t){return t instanceof Array&&(t=new Float32Array(t)),new Re(t)}}class ua{constructor(t,r=0,n=!1,s=Nt.FLOAT,a,u,l,c=1){this.buffer=t,this.size=r,this.normalized=n,this.type=s,this.stride=a,this.start=u,this.instance=l,this.divisor=c}destroy(){this.buffer=null}static from(t,r,n,s,a){return new ua(t,r,n,s,a)}}const aT={Float32Array,Uint32Array,Int32Array,Uint8Array};function oT(e,t){let r=0,n=0;const s={};for(let c=0;c<e.length;c++)n+=t[c],r+=e[c].length;const a=new ArrayBuffer(r*4);let u=null,l=0;for(let c=0;c<e.length;c++){const f=t[c],p=e[c],m=jf(p);s[m]||(s[m]=new aT[m](a)),u=s[m];for(let g=0;g<p.length;g++){const x=(g/f|0)*n+l,y=g%f;u[x+y]=p[g]}l+=f}return new Float32Array(a)}const Jf={5126:4,5123:2,5121:1};let uT=0;const lT={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array};class ui{constructor(t=[],r={}){this.buffers=t,this.indexBuffer=null,this.attributes=r,this.glVertexArrayObjects={},this.id=uT++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new sr("disposeGeometry"),this.refCount=0}addAttribute(t,r,n=0,s=!1,a,u,l,c=!1){if(!r)throw new Error("You must pass a buffer when creating an attribute");r instanceof Re||(r instanceof Array&&(r=new Float32Array(r)),r=new Re(r));const f=t.split("|");if(f.length>1){for(let m=0;m<f.length;m++)this.addAttribute(f[m],r,n,s,a);return this}let p=this.buffers.indexOf(r);return p===-1&&(this.buffers.push(r),p=this.buffers.length-1),this.attributes[t]=new ua(p,n,s,a,u,l,c),this.instanced=this.instanced||c,this}getAttribute(t){return this.attributes[t]}getBuffer(t){return this.buffers[this.getAttribute(t).buffer]}addIndex(t){return t instanceof Re||(t instanceof Array&&(t=new Uint16Array(t)),t=new Re(t)),t.type=Ar.ELEMENT_ARRAY_BUFFER,this.indexBuffer=t,this.buffers.includes(t)||this.buffers.push(t),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;const t=[],r=[],n=new Re;let s;for(s in this.attributes){const a=this.attributes[s],u=this.buffers[a.buffer];t.push(u.data),r.push(a.size*Jf[a.type]/4),a.buffer=0}for(n.data=oT(t,r),s=0;s<this.buffers.length;s++)this.buffers[s]!==this.indexBuffer&&this.buffers[s].destroy();return this.buffers=[n],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(const t in this.attributes){const r=this.attributes[t];return this.buffers[r.buffer].data.length/(r.stride/4||r.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){const t=new ui;for(let r=0;r<this.buffers.length;r++)t.buffers[r]=new Re(this.buffers[r].data.slice(0));for(const r in this.attributes){const n=this.attributes[r];t.attributes[r]=new ua(n.buffer,n.size,n.normalized,n.type,n.stride,n.start,n.instance)}return this.indexBuffer&&(t.indexBuffer=t.buffers[this.buffers.indexOf(this.indexBuffer)],t.indexBuffer.type=Ar.ELEMENT_ARRAY_BUFFER),t}static merge(t){const r=new ui,n=[],s=[],a=[];let u;for(let l=0;l<t.length;l++){u=t[l];for(let c=0;c<u.buffers.length;c++)s[c]=s[c]||0,s[c]+=u.buffers[c].data.length,a[c]=0}for(let l=0;l<u.buffers.length;l++)n[l]=new lT[jf(u.buffers[l].data)](s[l]),r.buffers[l]=new Re(n[l]);for(let l=0;l<t.length;l++){u=t[l];for(let c=0;c<u.buffers.length;c++)n[c].set(u.buffers[c].data,a[c]),a[c]+=u.buffers[c].data.length}if(r.attributes=u.attributes,u.indexBuffer){r.indexBuffer=r.buffers[u.buffers.indexOf(u.indexBuffer)],r.indexBuffer.type=Ar.ELEMENT_ARRAY_BUFFER;let l=0,c=0,f=0,p=0;for(let m=0;m<u.buffers.length;m++)if(u.buffers[m]!==u.indexBuffer){p=m;break}for(const m in u.attributes){const g=u.attributes[m];(g.buffer|0)===p&&(c+=g.size*Jf[g.type]/4)}for(let m=0;m<t.length;m++){const g=t[m].indexBuffer.data;for(let x=0;x<g.length;x++)r.indexBuffer.data[x+f]+=l;l+=t[m].buffers[p].data.length/c,f+=g.length}}return r}}class Qf extends ui{constructor(t=!1){super(),this._buffer=new Re(null,t,!1),this._indexBuffer=new Re(null,t,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Nt.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Nt.FLOAT).addAttribute("aColor",this._buffer,4,!0,Nt.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Nt.FLOAT).addIndex(this._indexBuffer)}}const la=Math.PI*2,hT=180/Math.PI,ns=Math.PI/180;var xe=(e=>(e[e.POLY=0]="POLY",e[e.RECT=1]="RECT",e[e.CIRC=2]="CIRC",e[e.ELIP=3]="ELIP",e[e.RREC=4]="RREC",e))(xe||{});class Wt{constructor(t=0,r=0){this.x=0,this.y=0,this.x=t,this.y=r}clone(){return new Wt(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,r=t){return this.x=t,this.y=r,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}}const ha=[new Wt,new Wt,new Wt,new Wt];class jt{constructor(t=0,r=0,n=0,s=0){this.x=Number(t),this.y=Number(r),this.width=Number(n),this.height=Number(s),this.type=xe.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new jt(0,0,0,0)}clone(){return new jt(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,r){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&r>=this.y&&r<this.y+this.height}intersects(t,r){if(!r){const O=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=O)return!1;const X=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>X}const n=this.left,s=this.right,a=this.top,u=this.bottom;if(s<=n||u<=a)return!1;const l=ha[0].set(t.left,t.top),c=ha[1].set(t.left,t.bottom),f=ha[2].set(t.right,t.top),p=ha[3].set(t.right,t.bottom);if(f.x<=l.x||c.y<=l.y)return!1;const m=Math.sign(r.a*r.d-r.b*r.c);if(m===0||(r.apply(l,l),r.apply(c,c),r.apply(f,f),r.apply(p,p),Math.max(l.x,c.x,f.x,p.x)<=n||Math.min(l.x,c.x,f.x,p.x)>=s||Math.max(l.y,c.y,f.y,p.y)<=a||Math.min(l.y,c.y,f.y,p.y)>=u))return!1;const g=m*(c.y-l.y),x=m*(l.x-c.x),y=g*n+x*a,S=g*s+x*a,T=g*n+x*u,w=g*s+x*u;if(Math.max(y,S,T,w)<=g*l.x+x*l.y||Math.min(y,S,T,w)>=g*p.x+x*p.y)return!1;const I=m*(l.y-f.y),A=m*(f.x-l.x),R=I*n+A*a,N=I*s+A*a,B=I*n+A*u,L=I*s+A*u;return!(Math.max(R,N,B,L)<=I*l.x+A*l.y||Math.min(R,N,B,L)>=I*p.x+A*p.y)}pad(t=0,r=t){return this.x-=t,this.y-=r,this.width+=t*2,this.height+=r*2,this}fit(t){const r=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),s=Math.max(this.y,t.y),a=Math.min(this.y+this.height,t.y+t.height);return this.x=r,this.width=Math.max(n-r,0),this.y=s,this.height=Math.max(a-s,0),this}ceil(t=1,r=.001){const n=Math.ceil((this.x+this.width-r)*t)/t,s=Math.ceil((this.y+this.height-r)*t)/t;return this.x=Math.floor((this.x+r)*t)/t,this.y=Math.floor((this.y+r)*t)/t,this.width=n-this.x,this.height=s-this.y,this}enlarge(t){const r=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),s=Math.min(this.y,t.y),a=Math.max(this.y+this.height,t.y+t.height);return this.x=r,this.width=n-r,this.y=s,this.height=a-s,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}class Ju{constructor(t=0,r=0,n=0){this.x=t,this.y=r,this.radius=n,this.type=xe.CIRC}clone(){return new Ju(this.x,this.y,this.radius)}contains(t,r){if(this.radius<=0)return!1;const n=this.radius*this.radius;let s=this.x-t,a=this.y-r;return s*=s,a*=a,s+a<=n}getBounds(){return new jt(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}let cT=class ev{constructor(t=0,r=0,n=0,s=0){this.x=t,this.y=r,this.width=n,this.height=s,this.type=xe.ELIP}clone(){return new ev(this.x,this.y,this.width,this.height)}contains(t,r){if(this.width<=0||this.height<=0)return!1;let n=(t-this.x)/this.width,s=(r-this.y)/this.height;return n*=n,s*=s,n+s<=1}getBounds(){return new jt(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};class is{constructor(...t){let r=Array.isArray(t[0])?t[0]:t;if(typeof r[0]!="number"){const n=[];for(let s=0,a=r.length;s<a;s++)n.push(r[s].x,r[s].y);r=n}this.points=r,this.type=xe.POLY,this.closeStroke=!0}clone(){const t=this.points.slice(),r=new is(t);return r.closeStroke=this.closeStroke,r}contains(t,r){let n=!1;const s=this.points.length/2;for(let a=0,u=s-1;a<s;u=a++){const l=this.points[a*2],c=this.points[a*2+1],f=this.points[u*2],p=this.points[u*2+1];c>r!=p>r&&t<(f-l)*((r-c)/(p-c))+l&&(n=!n)}return n}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((t,r)=>`${t}, ${r}`,"")}]`}}class Qu{constructor(t=0,r=0,n=0,s=0,a=20){this.x=t,this.y=r,this.width=n,this.height=s,this.radius=a,this.type=xe.RREC}clone(){return new Qu(this.x,this.y,this.width,this.height,this.radius)}contains(t,r){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&r>=this.y&&r<=this.y+this.height){const n=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(r>=this.y+n&&r<=this.y+this.height-n||t>=this.x+n&&t<=this.x+this.width-n)return!0;let s=t-(this.x+n),a=r-(this.y+n);const u=n*n;if(s*s+a*a<=u||(s=t-(this.x+this.width-n),s*s+a*a<=u)||(a=r-(this.y+this.height-n),s*s+a*a<=u)||(s=t-(this.x+n),s*s+a*a<=u))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}let Pe=class Uo{constructor(t=1,r=0,n=0,s=1,a=0,u=0){this.array=null,this.a=t,this.b=r,this.c=n,this.d=s,this.tx=a,this.ty=u}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,r,n,s,a,u){return this.a=t,this.b=r,this.c=n,this.d=s,this.tx=a,this.ty=u,this}toArray(t,r){this.array||(this.array=new Float32Array(9));const n=r||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n}apply(t,r){r=r||new Wt;const n=t.x,s=t.y;return r.x=this.a*n+this.c*s+this.tx,r.y=this.b*n+this.d*s+this.ty,r}applyInverse(t,r){r=r||new Wt;const n=1/(this.a*this.d+this.c*-this.b),s=t.x,a=t.y;return r.x=this.d*n*s+-this.c*n*a+(this.ty*this.c-this.tx*this.d)*n,r.y=this.a*n*a+-this.b*n*s+(-this.ty*this.a+this.tx*this.b)*n,r}translate(t,r){return this.tx+=t,this.ty+=r,this}scale(t,r){return this.a*=t,this.d*=r,this.c*=t,this.b*=r,this.tx*=t,this.ty*=r,this}rotate(t){const r=Math.cos(t),n=Math.sin(t),s=this.a,a=this.c,u=this.tx;return this.a=s*r-this.b*n,this.b=s*n+this.b*r,this.c=a*r-this.d*n,this.d=a*n+this.d*r,this.tx=u*r-this.ty*n,this.ty=u*n+this.ty*r,this}append(t){const r=this.a,n=this.b,s=this.c,a=this.d;return this.a=t.a*r+t.b*s,this.b=t.a*n+t.b*a,this.c=t.c*r+t.d*s,this.d=t.c*n+t.d*a,this.tx=t.tx*r+t.ty*s+this.tx,this.ty=t.tx*n+t.ty*a+this.ty,this}setTransform(t,r,n,s,a,u,l,c,f){return this.a=Math.cos(l+f)*a,this.b=Math.sin(l+f)*a,this.c=-Math.sin(l-c)*u,this.d=Math.cos(l-c)*u,this.tx=t-(n*this.a+s*this.c),this.ty=r-(n*this.b+s*this.d),this}prepend(t){const r=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const n=this.a,s=this.c;this.a=n*t.a+this.b*t.c,this.b=n*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=r*t.a+this.ty*t.c+t.tx,this.ty=r*t.b+this.ty*t.d+t.ty,this}decompose(t){const r=this.a,n=this.b,s=this.c,a=this.d,u=t.pivot,l=-Math.atan2(-s,a),c=Math.atan2(n,r),f=Math.abs(l+c);return f<1e-5||Math.abs(la-f)<1e-5?(t.rotation=c,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=l,t.skew.y=c),t.scale.x=Math.sqrt(r*r+n*n),t.scale.y=Math.sqrt(s*s+a*a),t.position.x=this.tx+(u.x*r+u.y*s),t.position.y=this.ty+(u.x*n+u.y*a),t}invert(){const t=this.a,r=this.b,n=this.c,s=this.d,a=this.tx,u=t*s-r*n;return this.a=s/u,this.b=-r/u,this.c=-n/u,this.d=t/u,this.tx=(n*this.ty-s*a)/u,this.ty=-(t*this.ty-r*a)/u,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new Uo;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}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new Uo}static get TEMP_MATRIX(){return new Uo}};const Sn=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],An=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Cn=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],En=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],tl=[],td=[],ca=Math.sign;function fT(){for(let e=0;e<16;e++){const t=[];tl.push(t);for(let r=0;r<16;r++){const n=ca(Sn[e]*Sn[r]+Cn[e]*An[r]),s=ca(An[e]*Sn[r]+En[e]*An[r]),a=ca(Sn[e]*Cn[r]+Cn[e]*En[r]),u=ca(An[e]*Cn[r]+En[e]*En[r]);for(let l=0;l<16;l++)if(Sn[l]===n&&An[l]===s&&Cn[l]===a&&En[l]===u){t.push(l);break}}}for(let e=0;e<16;e++){const t=new Pe;t.set(Sn[e],An[e],Cn[e],En[e],0,0),td.push(t)}}fT();const ne={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:e=>Sn[e],uY:e=>An[e],vX:e=>Cn[e],vY:e=>En[e],inv:e=>e&8?e&15:-e&7,add:(e,t)=>tl[e][t],sub:(e,t)=>tl[e][ne.inv(t)],rotate180:e=>e^4,isVertical:e=>(e&3)===2,byDirection:(e,t)=>Math.abs(e)*2<=Math.abs(t)?t>=0?ne.S:ne.N:Math.abs(t)*2<=Math.abs(e)?e>0?ne.E:ne.W:t>0?e>0?ne.SE:ne.SW:e>0?ne.NE:ne.NW,matrixAppendRotationInv:(e,t,r=0,n=0)=>{const s=td[ne.inv(t)];s.tx=r,s.ty=n,e.append(s)}};class In{constructor(t,r,n=0,s=0){this._x=n,this._y=s,this.cb=t,this.scope=r}clone(t=this.cb,r=this.scope){return new In(t,r,this._x,this._y)}set(t=0,r=t){return(this._x!==t||this._y!==r)&&(this._x=t,this._y=r,this.cb.call(this.scope)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),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/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}const ed=class{constructor(){this.worldTransform=new Pe,this.localTransform=new Pe,this.position=new In(this.onChange,this,0,0),this.scale=new In(this.onChange,this,1,1),this.pivot=new In(this.onChange,this,0,0),this.skew=new In(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){const e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(e){const t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){const r=e.worldTransform,n=this.worldTransform;n.a=t.a*r.a+t.b*r.c,n.b=t.a*r.b+t.b*r.d,n.c=t.c*r.a+t.d*r.c,n.d=t.c*r.b+t.d*r.d,n.tx=t.tx*r.a+t.ty*r.c+r.tx,n.ty=t.tx*r.b+t.ty*r.d+r.ty,this._parentID=e._worldID,this._worldID++}}setFromMatrix(e){e.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())}};let el=ed;el.IDENTITY=new ed;var dT=`varying vec2 vTextureCoord;
21
21
 
22
22
  uniform sampler2D uSampler;
23
23
 
@@ -305,7 +305,7 @@ void main(void){
305
305
  cv = cu.value;
306
306
  v = uv["${s}"];
307
307
  ${f};`)}}return new Function("ud","uv","renderer","syncData",r.join(`
308
- `))}const id={};let hi=id;function yT(){if(hi===id||hi!=null&&hi.isContextLost()){const e=_t.ADAPTER.createCanvas();let t;_t.PREFER_ENV>=vn.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),hi=t}return hi}let fa;function _T(){if(!fa){fa=qe.MEDIUM;const e=yT();e&&e.getShaderPrecisionFormat&&(fa=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?qe.HIGH:qe.MEDIUM)}return fa}function sd(e,t){const r=e.getShaderSource(t).split(`
308
+ `))}const id={};let hi=id;function yT(){if(hi===id||hi!=null&&hi.isContextLost()){const e=xt.ADAPTER.createCanvas();let t;xt.PREFER_ENV>=vn.WEBGL2&&(t=e.getContext("webgl2",{})),t||(t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}),t?t.getExtension("WEBGL_draw_buffers"):t=null),hi=t}return hi}let fa;function _T(){if(!fa){fa=qe.MEDIUM;const e=yT();e&&e.getShaderPrecisionFormat&&(fa=e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision?qe.HIGH:qe.MEDIUM)}return fa}function sd(e,t){const r=e.getShaderSource(t).split(`
309
309
  `).map((f,p)=>`${p}: ${f}`),n=e.getShaderInfoLog(t),s=n.split(`
310
310
  `),a={},u=s.map(f=>parseFloat(f.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(f=>f&&!a[f]?(a[f]=!0,!0):!1),l=[""];u.forEach(f=>{r[f-1]=`%c${r[f-1]}%c`,l.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});const c=r.join(`
311
311
  `);l[0]=c,console.error(n),console.groupCollapsed("click to view full shader code"),console.warn(...l),console.groupEnd()}function xT(e,t,r,n){e.getProgramParameter(t,e.LINK_STATUS)||(e.getShaderParameter(r,e.COMPILE_STATUS)||sd(e,r),e.getShaderParameter(n,e.COMPILE_STATUS)||sd(e,n),console.error("PixiJS Error: Could not initialize shader."),e.getProgramInfoLog(t)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",e.getProgramInfoLog(t)))}const bT={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function ad(e){return bT[e]}let da=null;const od={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function ud(e,t){if(!da){const r=Object.keys(od);da={};for(let n=0;n<r.length;++n){const s=r[n];da[e[s]]=od[s]}}return da[t]}function ld(e,t,r){if(e.substring(0,9)!=="precision"){let n=t;return t===qe.HIGH&&r!==qe.HIGH&&(n=qe.MEDIUM),`precision ${n} float;
@@ -319,7 +319,7 @@ else `),n<t-1&&(r+=`if(vTextureId < ${n}.5)`),r+=`
319
319
  color = texture2D(uSamplers[${n}], vTextureCoord);`,r+=`
320
320
  }`;return r+=`
321
321
  `,r+=`
322
- `,r}}class nl{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let t=0;t<this.count;t++)this.elements[t]=null;this.count=0}}function CT(){return!Kn.apple.device}function ET(e){let t=!0;const r=_t.ADAPTER.getNavigator();if(Kn.tablet||Kn.phone){if(Kn.apple.device){const n=r.userAgent.match(/OS (\d+)_(\d+)?/);n&&parseInt(n[1],10)<11&&(t=!1)}if(Kn.android.device){const n=r.userAgent.match(/Android\s([0-9.]*)/);n&&parseInt(n[1],10)<7&&(t=!1)}}return t?e:4}class hd{constructor(t){this.renderer=t}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(t){}}var IT=`varying vec2 vTextureCoord;
322
+ `,r}}class nl{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let t=0;t<this.count;t++)this.elements[t]=null;this.count=0}}function CT(){return!Kn.apple.device}function ET(e){let t=!0;const r=xt.ADAPTER.getNavigator();if(Kn.tablet||Kn.phone){if(Kn.apple.device){const n=r.userAgent.match(/OS (\d+)_(\d+)?/);n&&parseInt(n[1],10)<11&&(t=!1)}if(Kn.android.device){const n=r.userAgent.match(/Android\s([0-9.]*)/);n&&parseInt(n[1],10)<7&&(t=!1)}}return t?e:4}class hd{constructor(t){this.renderer=t}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(t){}}var IT=`varying vec2 vTextureCoord;
323
323
  varying vec4 vColor;
324
324
  varying float vTextureId;
325
325
  uniform sampler2D uSamplers[%count%];
@@ -350,7 +350,7 @@ void main(void){
350
350
  vTextureId = aTextureId;
351
351
  vColor = aColor * tint;
352
352
  }
353
- `;const or=class extends hd{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=Qf,this.vertexSize=6,this.state=oa.for2d(),this.size=or.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??ET(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??CT(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return Rt("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return RT}static get defaultFragmentTemplate(){return IT}setShaderGenerator({vertex:e=or.defaultVertexSrc,fragment:t=or.defaultFragmentTemplate}={}){this.shaderGenerator=new AT(e,t)}contextChange(){const e=this.renderer.gl;_t.PREFER_ENV===vn.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),or.defaultMaxTextures),this.maxTextures=nT(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=or,r=this.size/4,n=Math.floor(r/this.maxTextures)+1;for(;e.length<r;)e.push(new Zu);for(;t.length<n;)t.push(new nl);for(let s=0;s<this.maxTextures;s++)this._tempBoundTextures[s]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,r=or._textureArrayPool,n=this.renderer.batch,s=this._tempBoundTextures,a=this.renderer.textureGC.count;let u=++Lt._globalBatch,l=0,c=r[0],f=0;n.copyBoundTextures(s,t);for(let p=0;p<this._bufferSize;++p){const m=e[p];e[p]=null,m._batchEnabled!==u&&(c.count>=t&&(n.boundArray(c,s,u,t),this.buildDrawCalls(c,f,p),f=p,c=r[++l],++u),m._batchEnabled=u,m.touched=a,c.elements[c.count++]=m)}c.count>0&&(n.boundArray(c,s,u,t),this.buildDrawCalls(c,f,this._bufferSize),++l,++u);for(let p=0;p<s.length;p++)s[p]=null;Lt._globalBatch=u}buildDrawCalls(e,t,r){const{_bufferedElements:n,_attributeBuffer:s,_indexBuffer:a,vertexSize:u}=this,l=or._drawCallPool;let c=this._dcIndex,f=this._aIndex,p=this._iIndex,m=l[c];m.start=this._iIndex,m.texArray=e;for(let g=t;g<r;++g){const x=n[g],y=x._texture.baseTexture,S=Zb[y.alphaMode?1:0][x.blendMode];n[g]=null,t<g&&m.blend!==S&&(m.size=p-m.start,t=g,m=l[++c],m.texArray=e,m.start=p),this.packInterleavedGeometry(x,s,a,f,p),f+=x.vertexData.length/2*u,p+=x.indices.length,m.blend=S}t<r&&(m.size=p-m.start,++c),this._dcIndex=c,this._aIndex=f,this._iIndex=p}bindAndClearTexArray(e){const t=this.renderer.texture;for(let r=0;r<e.count;r++)t.bind(e.elements[r],e.ids[r]),e.elements[r]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:r}=this;or.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:r}=this.renderer,n=or._drawCallPool;let s=null;for(let a=0;a<e;a++){const{texArray:u,type:l,size:c,start:f,blend:p}=n[a];s!==u&&(s=u,this.bindAndClearTexArray(u)),this.state.blendMode=p,r.set(this.state),t.drawElements(l,c,t.UNSIGNED_SHORT,f*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),or.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),super.destroy()}getAttributeBuffer(e){const t=ia(Math.ceil(e/8)),r=Wf(t),n=t*8;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);let s=this._aBuffers[n];return s||(this._aBuffers[n]=s=new tT(n*this.vertexSize*4)),s}getIndexBuffer(e){const t=ia(Math.ceil(e/12)),r=Wf(t),n=t*12;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);let s=this._iBuffers[r];return s||(this._iBuffers[r]=s=new Uint16Array(n)),s}packInterleavedGeometry(e,t,r,n,s){const{uint32View:a,float32View:u}=t,l=n/this.vertexSize,c=e.uvs,f=e.indices,p=e.vertexData,m=e._texture.baseTexture._batchLocation,g=Math.min(e.worldAlpha,1),x=Ce.shared.setValue(e._tintRGB).toPremultiplied(g);for(let y=0;y<p.length;y+=2)u[n++]=p[y],u[n++]=p[y+1],u[n++]=c[y],u[n++]=c[y+1],a[n++]=x,u[n++]=m;for(let y=0;y<f.length;y++)r[s++]=l+f[y]}};let ur=or;ur.defaultBatchSize=4096,ur.extension={name:"batch",type:Ct.RendererPlugin},ur._drawCallPool=[],ur._textureArrayPool=[],Gt.add(ur);var PT=`varying vec2 vTextureCoord;
353
+ `;const or=class extends hd{constructor(e){super(e),this.setShaderGenerator(),this.geometryClass=Qf,this.vertexSize=6,this.state=oa.for2d(),this.size=or.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),e.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??ET(32),this._defaultMaxTextures}static set defaultMaxTextures(e){this._defaultMaxTextures=e}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??CT(),this._canUploadSameBuffer}static set canUploadSameBuffer(e){this._canUploadSameBuffer=e}get MAX_TEXTURES(){return Rt("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return RT}static get defaultFragmentTemplate(){return IT}setShaderGenerator({vertex:e=or.defaultVertexSrc,fragment:t=or.defaultFragmentTemplate}={}){this.shaderGenerator=new AT(e,t)}contextChange(){const e=this.renderer.gl;xt.PREFER_ENV===vn.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),or.defaultMaxTextures),this.maxTextures=nT(this.maxTextures,e)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let t=0;t<this._packedGeometryPoolSize;t++)this._packedGeometries[t]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){const{_drawCallPool:e,_textureArrayPool:t}=or,r=this.size/4,n=Math.floor(r/this.maxTextures)+1;for(;e.length<r;)e.push(new Zu);for(;t.length<n;)t.push(new nl);for(let s=0;s<this.maxTextures;s++)this._tempBoundTextures[s]=null}onPrerender(){this._flushId=0}render(e){e._texture.valid&&(this._vertexCount+e.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)}buildTexturesAndDrawCalls(){const{_bufferedTextures:e,maxTextures:t}=this,r=or._textureArrayPool,n=this.renderer.batch,s=this._tempBoundTextures,a=this.renderer.textureGC.count;let u=++Lt._globalBatch,l=0,c=r[0],f=0;n.copyBoundTextures(s,t);for(let p=0;p<this._bufferSize;++p){const m=e[p];e[p]=null,m._batchEnabled!==u&&(c.count>=t&&(n.boundArray(c,s,u,t),this.buildDrawCalls(c,f,p),f=p,c=r[++l],++u),m._batchEnabled=u,m.touched=a,c.elements[c.count++]=m)}c.count>0&&(n.boundArray(c,s,u,t),this.buildDrawCalls(c,f,this._bufferSize),++l,++u);for(let p=0;p<s.length;p++)s[p]=null;Lt._globalBatch=u}buildDrawCalls(e,t,r){const{_bufferedElements:n,_attributeBuffer:s,_indexBuffer:a,vertexSize:u}=this,l=or._drawCallPool;let c=this._dcIndex,f=this._aIndex,p=this._iIndex,m=l[c];m.start=this._iIndex,m.texArray=e;for(let g=t;g<r;++g){const x=n[g],y=x._texture.baseTexture,S=Zb[y.alphaMode?1:0][x.blendMode];n[g]=null,t<g&&m.blend!==S&&(m.size=p-m.start,t=g,m=l[++c],m.texArray=e,m.start=p),this.packInterleavedGeometry(x,s,a,f,p),f+=x.vertexData.length/2*u,p+=x.indices.length,m.blend=S}t<r&&(m.size=p-m.start,++c),this._dcIndex=c,this._aIndex=f,this._iIndex=p}bindAndClearTexArray(e){const t=this.renderer.texture;for(let r=0;r<e.count;r++)t.bind(e.elements[r],e.ids[r]),e.elements[r]=null;e.count=0}updateGeometry(){const{_packedGeometries:e,_attributeBuffer:t,_indexBuffer:r}=this;or.canUploadSameBuffer?(e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(t.rawBinaryData),e[this._flushId]._indexBuffer.update(r),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){const e=this._dcIndex,{gl:t,state:r}=this.renderer,n=or._drawCallPool;let s=null;for(let a=0;a<e;a++){const{texArray:u,type:l,size:c,start:f,blend:p}=n[a];s!==u&&(s=u,this.bindAndClearTexArray(u)),this.state.blendMode=p,r.set(this.state),t.drawElements(l,c,t.UNSIGNED_SHORT,f*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),or.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),super.destroy()}getAttributeBuffer(e){const t=ia(Math.ceil(e/8)),r=Wf(t),n=t*8;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);let s=this._aBuffers[n];return s||(this._aBuffers[n]=s=new tT(n*this.vertexSize*4)),s}getIndexBuffer(e){const t=ia(Math.ceil(e/12)),r=Wf(t),n=t*12;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);let s=this._iBuffers[r];return s||(this._iBuffers[r]=s=new Uint16Array(n)),s}packInterleavedGeometry(e,t,r,n,s){const{uint32View:a,float32View:u}=t,l=n/this.vertexSize,c=e.uvs,f=e.indices,p=e.vertexData,m=e._texture.baseTexture._batchLocation,g=Math.min(e.worldAlpha,1),x=Ce.shared.setValue(e._tintRGB).toPremultiplied(g);for(let y=0;y<p.length;y+=2)u[n++]=p[y],u[n++]=p[y+1],u[n++]=c[y],u[n++]=c[y+1],a[n++]=x,u[n++]=m;for(let y=0;y<f.length;y++)r[s++]=l+f[y]}};let ur=or;ur.defaultBatchSize=4096,ur.extension={name:"batch",type:At.RendererPlugin},ur._drawCallPool=[],ur._textureArrayPool=[],$t.add(ur);var PT=`varying vec2 vTextureCoord;
354
354
 
355
355
  uniform sampler2D uSampler;
356
356
 
@@ -383,7 +383,7 @@ void main(void)
383
383
  gl_Position = filterVertexPosition();
384
384
  vTextureCoord = filterTextureCoord();
385
385
  }
386
- `;const os=class extends as{constructor(e,t,r){const n=Br.from(e||os.defaultVertexSrc,t||os.defaultFragmentSrc);super(n,r),this.padding=0,this.resolution=os.defaultResolution,this.multisample=os.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new oa}apply(e,t,r,n,s){e.applyFilter(this,t,r,n)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return MT}static get defaultFragmentSrc(){return PT}};let Dt=os;Dt.defaultResolution=1,Dt.defaultMultisample=fe.NONE;class ga{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Ce(0),this.alpha=1}init(t){this.clearBeforeRender=t.clearBeforeRender;const{backgroundColor:r,background:n,backgroundAlpha:s}=t,a=n??r;a!==void 0&&(this.color=a),this.alpha=s}get color(){return this._backgroundColor.value}set color(t){this._backgroundColor.setValue(t)}get alpha(){return this._backgroundColor.alpha}set alpha(t){this._backgroundColor.setAlpha(t)}get backgroundColor(){return this._backgroundColor}destroy(){}}ga.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},ga.extension={type:[Ct.RendererSystem,Ct.CanvasRendererSystem],name:"background"},Gt.add(ga);class cd{constructor(t){this.renderer=t,this.emptyRenderer=new hd(t),this.currentRenderer=this.emptyRenderer}setObjectRenderer(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(t,r){const{boundTextures:n}=this.renderer.texture;for(let s=r-1;s>=0;--s)t[s]=n[s]||null,t[s]&&(t[s]._batchLocation=s)}boundArray(t,r,n,s){const{elements:a,ids:u,count:l}=t;let c=0;for(let f=0;f<l;f++){const p=a[f],m=p._batchLocation;if(m>=0&&m<s&&r[m]===p){u[f]=m;continue}for(;c<s;){const g=r[c];if(g&&g._batchEnabled===n&&g._batchLocation===c){c++;continue}u[f]=c,p._batchLocation=c,r[c]=p;break}}}destroy(){this.renderer=null}}cd.extension={type:Ct.RendererSystem,name:"batch"},Gt.add(cd);let fd=0;class ma{constructor(t){this.renderer=t,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=fd++}init(t){if(t.context)this.initFromContext(t.context);else{const r=this.renderer.background.alpha<1,n=t.premultipliedAlpha;this.preserveDrawingBuffer=t.preserveDrawingBuffer,this.useContextAlpha=t.useContextAlpha,this.powerPreference=t.powerPreference,this.initFromOptions({alpha:r,premultipliedAlpha:n,antialias:t.antialias,stencil:!0,preserveDrawingBuffer:t.preserveDrawingBuffer,powerPreference:t.powerPreference})}}initFromContext(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=fd++,this.renderer.runners.contextChange.emit(t);const r=this.renderer.view;r.addEventListener!==void 0&&(r.addEventListener("webglcontextlost",this.handleContextLost,!1),r.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(t){const r=this.createContext(this.renderer.view,t);this.initFromContext(r)}createContext(t,r){let n;if(_t.PREFER_ENV>=vn.WEBGL2&&(n=t.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=t.getContext("webgl",r)||t.getContext("experimental-webgl",r),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl}getExtensions(){const{gl:t}=this,r={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})}handleContextLost(t){t.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const t=this.renderer.view;this.renderer=null,t.removeEventListener!==void 0&&(t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(t){const r=t.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),r&&!r.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const s=n||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=s,s||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}ma.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},ma.extension={type:Ct.RendererSystem,name:"context"},Gt.add(ma);class OT extends Ku{upload(t,r,n){const s=t.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Zr.UNPACK);const a=r.realWidth,u=r.realHeight;return n.width===a&&n.height===u?s.texSubImage2D(r.target,0,0,0,a,u,r.format,n.type,this.data):(n.width=a,n.height=u,s.texImage2D(r.target,0,n.internalFormat,a,u,0,r.format,n.type,this.data)),!0}}class il{constructor(t,r){this.width=Math.round(t||100),this.height=Math.round(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new sr("disposeFramebuffer"),this.multisample=fe.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,r){return this.colorTextures[t]=r||new Lt(null,{scaleMode:Sr.NEAREST,resolution:1,mipmap:yn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new Lt(new OT(null,{width:this.width,height:this.height}),{scaleMode:Sr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:yn.OFF,format:Z.DEPTH_COMPONENT,type:Nt.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(t,r){if(t=Math.round(t),r=Math.round(r),!(t===this.width&&r===this.height)){this.width=t,this.height=r,this.dirtyId++,this.dirtySize++;for(let n=0;n<this.colorTextures.length;n++){const s=this.colorTextures[n],a=s.resolution;s.setSize(t/a,r/a)}if(this.depthTexture){const n=this.depthTexture.resolution;this.depthTexture.setSize(t/n,r/n)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class dd extends Lt{constructor(t={}){if(typeof t=="number"){const r=arguments[0],n=arguments[1],s=arguments[2],a=arguments[3];t={width:r,height:n,scaleMode:s,resolution:a}}t.width=t.width||100,t.height=t.height||100,t.multisample??(t.multisample=fe.NONE),super(null,t),this.mipmap=yn.OFF,this.valid=!0,this._clear=new Ce([0,0,0,0]),this.framebuffer=new il(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=t.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(t){this._clear.setValue(t)}get clearColor(){return this._clear.value}get clear(){return this._clear}resize(t,r){this.framebuffer.resize(t*this.resolution,r*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)}dispose(){this.framebuffer.dispose(),super.dispose()}destroy(){super.destroy(),this.framebuffer.destroyDepthTexture(),this.framebuffer=null}}class rn extends rs{constructor(t){const r=t,n=r.naturalWidth||r.videoWidth||r.width,s=r.naturalHeight||r.videoHeight||r.height;super(n,s),this.source=t,this.noSubImage=!1}static crossOrigin(t,r,n){n===void 0&&!r.startsWith("data:")?t.crossOrigin=Qb(r):n!==!1&&(t.crossOrigin=typeof n=="string"?n:"anonymous")}upload(t,r,n,s){const a=t.gl,u=r.realWidth,l=r.realHeight;if(s=s||this.source,typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement){if(!s.complete||s.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&s instanceof HTMLVideoElement&&s.readyState<=1&&s.buffered.length===0)return!1;return a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Zr.UNPACK),!this.noSubImage&&r.target===a.TEXTURE_2D&&n.width===u&&n.height===l?a.texSubImage2D(a.TEXTURE_2D,0,0,0,r.format,n.type,s):(n.width=u,n.height=l,a.texImage2D(r.target,0,n.internalFormat,r.format,n.type,s)),!0}update(){if(this.destroyed)return;const t=this.source,r=t.naturalWidth||t.videoWidth||t.width,n=t.naturalHeight||t.videoHeight||t.height;this.resize(r,n),super.update()}dispose(){this.source=null}}class pd extends rn{constructor(t,r){if(r=r||{},typeof t=="string"){const n=new Image;rn.crossOrigin(n,t,r.crossorigin),n.src=t,t=n}super(t),!t.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=t.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(r.createBitmap??_t.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this.bitmap=null,this._load=null,r.autoLoad!==!1&&this.load()}load(t){return this._load?this._load:(t!==void 0&&(this.createBitmap=t),this._load=new Promise((r,n)=>{const s=this.source;this.url=s.src;const a=()=>{this.destroyed||(s.onload=null,s.onerror=null,this.resize(s.width,s.height),this._load=null,this.createBitmap?r(this.process()):r(this))};s.complete&&s.src?a():(s.onload=a,s.onerror=u=>{n(u),this.onError.emit(u)})}),this._load)}process(){const t=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const r=globalThis.createImageBitmap,n=!t.crossOrigin||t.crossOrigin==="anonymous";return this._process=fetch(t.src,{mode:n?"cors":"no-cors"}).then(s=>s.blob()).then(s=>r(s,0,0,t.width,t.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Zr.UNPACK?"premultiply":"none"})).then(s=>this.destroyed?Promise.reject():(this.bitmap=s,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(t,r,n){if(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(t,r,n);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(t,r,n,this.bitmap),!this.preserveBitmap){let s=!0;const a=r._glTextures;for(const u in a){const l=a[u];if(l!==n&&l.dirtyId!==r.dirtyId){s=!1;break}}s&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(t){return typeof HTMLImageElement<"u"&&(typeof t=="string"||t instanceof HTMLImageElement)}}class gd{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(t,r,n){const s=r.width,a=r.height;if(n){const u=t.width/2/s,l=t.height/2/a,c=t.x/s+u,f=t.y/a+l;n=ne.add(n,ne.NW),this.x0=c+u*ne.uX(n),this.y0=f+l*ne.uY(n),n=ne.add(n,2),this.x1=c+u*ne.uX(n),this.y1=f+l*ne.uY(n),n=ne.add(n,2),this.x2=c+u*ne.uX(n),this.y2=f+l*ne.uY(n),n=ne.add(n,2),this.x3=c+u*ne.uX(n),this.y3=f+l*ne.uY(n)}else this.x0=t.x/s,this.y0=t.y/a,this.x1=(t.x+t.width)/s,this.y1=t.y/a,this.x2=(t.x+t.width)/s,this.y2=(t.y+t.height)/a,this.x3=t.x/s,this.y3=(t.y+t.height)/a;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const md=new gd;function va(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class Ot extends Gs{constructor(t,r,n,s,a,u,l){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new jt(0,0,1,1)),t instanceof Ot&&(t=t.baseTexture),this.baseTexture=t,this._frame=r,this.trim=s,this.valid=!1,this._uvs=md,this.uvMatrix=null,this.orig=n||r,this._rotate=Number(a||0),a===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=u?new Wt(u.x,u.y):new Wt(0,0),this.defaultBorders=l,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=r:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:r}=this.baseTexture;r!=null&&r.url&&Rr[r.url]&&Ot.removeFromCache(r.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,Ot.removeFromCache(this),this.textureCacheIds=null}clone(){var s;const t=this._frame.clone(),r=this._frame===this.orig?t:this.orig.clone(),n=new Ot(this.baseTexture,!this.noFrame&&t,r,(s=this.trim)==null?void 0:s.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(n._frame=t),n}updateUvs(){this._uvs===md&&(this._uvs=new gd),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,r={},n=_t.STRICT_TEXTURE_CACHE){const s=typeof t=="string";let a=null;if(s)a=t;else if(t instanceof Lt){if(!t.cacheId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t.cacheId=`${l}-${es()}`,Lt.addToCache(t,t.cacheId)}a=t.cacheId}else{if(!t._pixiId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t._pixiId=`${l}_${es()}`}a=t._pixiId}let u=Rr[a];if(s&&n&&!u)throw new Error(`The cacheId "${a}" does not exist in TextureCache.`);return!u&&!(t instanceof Lt)?(r.resolution||(r.resolution=Yf(t)),u=new Ot(new Lt(t,r)),u.baseTexture.cacheId=a,Lt.addToCache(u.baseTexture,a),Ot.addToCache(u,a)):!u&&t instanceof Lt&&(u=new Ot(t),Ot.addToCache(u,a)),u}static fromURL(t,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),s=Ot.from(t,Object.assign({resourceOptions:n},r),!1),a=s.baseTexture.resource;return s.baseTexture.valid?Promise.resolve(s):a.load().then(()=>Promise.resolve(s))}static fromBuffer(t,r,n,s){return new Ot(Lt.fromBuffer(t,r,n,s))}static fromLoader(t,r,n,s){const a=new Lt(t,Object.assign({scaleMode:Lt.defaultOptions.scaleMode,resolution:Yf(r)},s)),{resource:u}=a;u instanceof pd&&(u.url=r);const l=new Ot(a);return n||(n=r),Lt.addToCache(l.baseTexture,n),Ot.addToCache(l,n),n!==r&&(Lt.addToCache(l.baseTexture,r),Ot.addToCache(l,r)),l.baseTexture.valid?Promise.resolve(l):new Promise(c=>{l.baseTexture.once("loaded",()=>c(l))})}static addToCache(t,r){r&&(t.textureCacheIds.includes(r)||t.textureCacheIds.push(r),Rr[r]&&Rr[r]!==t&&console.warn(`Texture added to the cache with an id [${r}] that already had an entry`),Rr[r]=t)}static removeFromCache(t){if(typeof t=="string"){const r=Rr[t];if(r){const n=r.textureCacheIds.indexOf(t);return n>-1&&r.textureCacheIds.splice(n,1),delete Rr[t],r}}else if(t!=null&&t.textureCacheIds){for(let r=0;r<t.textureCacheIds.length;++r)Rr[t.textureCacheIds[r]]===t&&delete Rr[t.textureCacheIds[r]];return t.textureCacheIds.length=0,t}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(t){this._frame=t,this.noFrame=!1;const{x:r,y:n,width:s,height:a}=t,u=r+s>this.baseTexture.width,l=n+a>this.baseTexture.height;if(u||l){const c=u&&l?"and":"or",f=`X: ${r} + ${s} = ${r+s} > ${this.baseTexture.width}`,p=`Y: ${n} + ${a} = ${n+a} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${f} ${c} ${p}`)}this.valid=s&&a&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(t){this._rotate=t,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return Ot._EMPTY||(Ot._EMPTY=new Ot(new Lt),va(Ot._EMPTY),va(Ot._EMPTY.baseTexture)),Ot._EMPTY}static get WHITE(){if(!Ot._WHITE){const t=_t.ADAPTER.createCanvas(16,16),r=t.getContext("2d");t.width=16,t.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),Ot._WHITE=new Ot(Lt.from(t)),va(Ot._WHITE),va(Ot._WHITE.baseTexture)}return Ot._WHITE}}class ya extends Ot{constructor(t,r){super(t,r),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(t){this.framebuffer.multisample=t}resize(t,r,n=!0){const s=this.baseTexture.resolution,a=Math.round(t*s)/s,u=Math.round(r*s)/s;this.valid=a>0&&u>0,this._frame.width=this.orig.width=a,this._frame.height=this.orig.height=u,n&&this.baseTexture.resize(a,u),this.updateUvs()}setResolution(t){const{baseTexture:r}=this;r.resolution!==t&&(r.setResolution(t),this.resize(r.width,r.height,!1))}static create(t){return new ya(new dd(t))}}class vd{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,r,n=fe.NONE){const s=new dd(Object.assign({width:t,height:r,resolution:1,multisample:n},this.textureOptions));return new ya(s)}getOptimalTexture(t,r,n=1,s=fe.NONE){let a;t=Math.ceil(t*n-1e-6),r=Math.ceil(r*n-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||r!==this._pixelsHeight?(t=ia(t),r=ia(r),a=((t&65535)<<16|r&65535)>>>0,s>1&&(a+=s*4294967296)):a=s>1?-s:-1,this.texturePool[a]||(this.texturePool[a]=[]);let u=this.texturePool[a].pop();return u||(u=this.createTexture(t,r,s)),u.filterPoolKey=a,u.setResolution(n),u}getFilterTexture(t,r,n){const s=this.getOptimalTexture(t.width,t.height,r||t.resolution,n||fe.NONE);return s.filterFrame=t.filterFrame,s}returnTexture(t){const r=t.filterPoolKey;t.filterFrame=null,this.texturePool[r].push(t)}returnFilterTexture(t){this.returnTexture(t)}clear(t){if(t=t!==!1,t)for(const r in this.texturePool){const n=this.texturePool[r];if(n)for(let s=0;s<n.length;s++)n[s].destroy(!0)}this.texturePool={}}setScreenSize(t){if(!(t.width===this._pixelsWidth&&t.height===this._pixelsHeight)){this.enableFullScreen=t.width>0&&t.height>0;for(const r in this.texturePool){if(!(Number(r)<0))continue;const n=this.texturePool[r];if(n)for(let s=0;s<n.length;s++)n[s].destroy(!0);this.texturePool[r]=[]}this._pixelsWidth=t.width,this._pixelsHeight=t.height}}}vd.SCREEN_KEY=-1;class FT extends ui{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class NT extends ui{constructor(){super(),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new Re(this.vertices),this.uvBuffer=new Re(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(t,r){let n=0,s=0;return this.uvs[0]=n,this.uvs[1]=s,this.uvs[2]=n+r.width/t.width,this.uvs[3]=s,this.uvs[4]=n+r.width/t.width,this.uvs[5]=s+r.height/t.height,this.uvs[6]=n,this.uvs[7]=s+r.height/t.height,n=r.x,s=r.y,this.vertices[0]=n,this.vertices[1]=s,this.vertices[2]=n+r.width,this.vertices[3]=s,this.vertices[4]=n+r.width,this.vertices[5]=s+r.height,this.vertices[6]=n,this.vertices[7]=s+r.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class LT{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=fe.NONE,this.sourceFrame=new jt,this.destinationFrame=new jt,this.bindingSourceFrame=new jt,this.bindingDestinationFrame=new jt,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const _a=[new Wt,new Wt,new Wt,new Wt],sl=new Pe;class yd{constructor(t){this.renderer=t,this.defaultFilterStack=[{}],this.texturePool=new vd,this.statePool=[],this.quad=new FT,this.quadUv=new NT,this.tempRect=new jt,this.activeState={},this.globalUniforms=new ar({outputFrame:new jt,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}init(){this.texturePool.setScreenSize(this.renderer.view)}push(t,r){const n=this.renderer,s=this.defaultFilterStack,a=this.statePool.pop()||new LT,u=this.renderer.renderTexture;let l=r[0].resolution,c=r[0].multisample,f=r[0].padding,p=r[0].autoFit,m=r[0].legacy??!0;for(let y=1;y<r.length;y++){const S=r[y];l=Math.min(l,S.resolution),c=Math.min(c,S.multisample),f=this.useMaxPadding?Math.max(f,S.padding):f+S.padding,p=p&&S.autoFit,m=m||(S.legacy??!0)}s.length===1&&(this.defaultFilterStack[0].renderTexture=u.current),s.push(a),a.resolution=l,a.multisample=c,a.legacy=m,a.target=t,a.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),a.sourceFrame.pad(f);const g=this.tempRect.copyFrom(u.sourceFrame);n.projection.transform&&this.transformAABB(sl.copyFrom(n.projection.transform).invert(),g),p?(a.sourceFrame.fit(g),(a.sourceFrame.width<=0||a.sourceFrame.height<=0)&&(a.sourceFrame.width=0,a.sourceFrame.height=0)):a.sourceFrame.intersects(g)||(a.sourceFrame.width=0,a.sourceFrame.height=0),this.roundFrame(a.sourceFrame,u.current?u.current.resolution:n.resolution,u.sourceFrame,u.destinationFrame,n.projection.transform),a.renderTexture=this.getOptimalFilterTexture(a.sourceFrame.width,a.sourceFrame.height,l,c),a.filters=r,a.destinationFrame.width=a.renderTexture.width,a.destinationFrame.height=a.renderTexture.height;const x=this.tempRect;x.x=0,x.y=0,x.width=a.sourceFrame.width,x.height=a.sourceFrame.height,a.renderTexture.filterFrame=a.sourceFrame,a.bindingSourceFrame.copyFrom(u.sourceFrame),a.bindingDestinationFrame.copyFrom(u.destinationFrame),a.transform=n.projection.transform,n.projection.transform=null,u.bind(a.renderTexture,a.sourceFrame,x),n.framebuffer.clear(0,0,0,0)}pop(){const t=this.defaultFilterStack,r=t.pop(),n=r.filters;this.activeState=r;const s=this.globalUniforms.uniforms;s.outputFrame=r.sourceFrame,s.resolution=r.resolution;const a=s.inputSize,u=s.inputPixel,l=s.inputClamp;if(a[0]=r.destinationFrame.width,a[1]=r.destinationFrame.height,a[2]=1/a[0],a[3]=1/a[1],u[0]=Math.round(a[0]*r.resolution),u[1]=Math.round(a[1]*r.resolution),u[2]=1/u[0],u[3]=1/u[1],l[0]=.5*u[2],l[1]=.5*u[3],l[2]=r.sourceFrame.width*a[2]-.5*u[2],l[3]=r.sourceFrame.height*a[3]-.5*u[3],r.legacy){const f=s.filterArea;f[0]=r.destinationFrame.width,f[1]=r.destinationFrame.height,f[2]=r.sourceFrame.x,f[3]=r.sourceFrame.y,s.filterClamp=s.inputClamp}this.globalUniforms.update();const c=t[t.length-1];if(this.renderer.framebuffer.blit(),n.length===1)n[0].apply(this,r.renderTexture,c.renderTexture,_n.BLEND,r),this.returnFilterTexture(r.renderTexture);else{let f=r.renderTexture,p=this.getOptimalFilterTexture(f.width,f.height,r.resolution);p.filterFrame=f.filterFrame;let m=0;for(m=0;m<n.length-1;++m){m===1&&r.multisample>1&&(p=this.getOptimalFilterTexture(f.width,f.height,r.resolution),p.filterFrame=f.filterFrame),n[m].apply(this,f,p,_n.CLEAR,r);const g=f;f=p,p=g}n[m].apply(this,f,c.renderTexture,_n.BLEND,r),m>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(f),this.returnFilterTexture(p)}r.clear(),this.statePool.push(r)}bindAndClear(t,r=_n.CLEAR){const{renderTexture:n,state:s}=this.renderer;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t!=null&&t.filterFrame){const u=this.tempRect;u.x=0,u.y=0,u.width=t.filterFrame.width,u.height=t.filterFrame.height,n.bind(t,t.filterFrame,u)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?n.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const a=s.stateId&1||this.forceClear;(r===_n.CLEAR||r===_n.BLIT&&a)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(t,r,n,s){const a=this.renderer;a.state.set(t.state),this.bindAndClear(n,s),t.uniforms.uSampler=r,t.uniforms.filterGlobals=this.globalUniforms,a.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(r._frame,r.filterFrame),a.geometry.bind(this.quadUv),a.geometry.draw(Kr.TRIANGLES)):(a.geometry.bind(this.quad),a.geometry.draw(Kr.TRIANGLE_STRIP))}calculateSpriteMatrix(t,r){const{sourceFrame:n,destinationFrame:s}=this.activeState,{orig:a}=r._texture,u=t.set(s.width,0,0,s.height,n.x,n.y),l=r.worldTransform.copyTo(Pe.TEMP_MATRIX);return l.invert(),u.prepend(l),u.scale(1/a.width,1/a.height),u.translate(r.anchor.x,r.anchor.y),u}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,r,n=1,s=fe.NONE){return this.texturePool.getOptimalTexture(t,r,n,s)}getFilterTexture(t,r,n){if(typeof t=="number"){const a=t;t=r,r=a}t=t||this.activeState.renderTexture;const s=this.texturePool.getOptimalTexture(t.width,t.height,r||t.resolution,n||fe.NONE);return s.filterFrame=t.filterFrame,s}returnFilterTexture(t){this.texturePool.returnTexture(t)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(t,r){const n=_a[0],s=_a[1],a=_a[2],u=_a[3];n.set(r.left,r.top),s.set(r.left,r.bottom),a.set(r.right,r.top),u.set(r.right,r.bottom),t.apply(n,n),t.apply(s,s),t.apply(a,a),t.apply(u,u);const l=Math.min(n.x,s.x,a.x,u.x),c=Math.min(n.y,s.y,a.y,u.y),f=Math.max(n.x,s.x,a.x,u.x),p=Math.max(n.y,s.y,a.y,u.y);r.x=l,r.y=c,r.width=f-l,r.height=p-c}roundFrame(t,r,n,s,a){if(!(t.width<=0||t.height<=0||n.width<=0||n.height<=0)){if(a){const{a:u,b:l,c,d:f}=a;if((Math.abs(l)>1e-4||Math.abs(c)>1e-4)&&(Math.abs(u)>1e-4||Math.abs(f)>1e-4))return}a=a?sl.copyFrom(a):sl.identity(),a.translate(-n.x,-n.y).scale(s.width/n.width,s.height/n.height).translate(s.x,s.y),this.transformAABB(a,t),t.ceil(r),this.transformAABB(a.invert(),t)}}}yd.extension={type:Ct.RendererSystem,name:"filter"},Gt.add(yd);class kT{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=fe.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const BT=new jt;class _d{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new il(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new jt,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;_t.PREFER_ENV===vn.WEBGL_LEGACY&&(r=null,n=null),r?t.drawBuffers=s=>r.drawBuffersWEBGL(s):(this.hasMRT=!1,t.drawBuffers=()=>{}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}bind(t,r,n=0){const{gl:s}=this;if(t){const a=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,s.bindFramebuffer(s.FRAMEBUFFER,a.framebuffer)),a.mipLevel!==n&&(t.dirtyId++,t.dirtyFormat++,a.mipLevel=n),a.dirtyId!==t.dirtyId&&(a.dirtyId=t.dirtyId,a.dirtyFormat!==t.dirtyFormat?(a.dirtyFormat=t.dirtyFormat,a.dirtySize=t.dirtySize,this.updateFramebuffer(t,n)):a.dirtySize!==t.dirtySize&&(a.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(let u=0;u<t.colorTextures.length;u++){const l=t.colorTextures[u];this.renderer.texture.unbind(l.parentTextureArray||l)}if(t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),r){const u=r.width>>n,l=r.height>>n,c=u/r.width;this.setViewport(r.x*c,r.y*c,u,l)}else{const u=t.width>>n,l=t.height>>n;this.setViewport(0,0,u,l)}}else this.current&&(this.current=null,s.bindFramebuffer(s.FRAMEBUFFER,null)),r?this.setViewport(r.x,r.y,r.width,r.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(t,r,n,s){const a=this.viewport;t=Math.round(t),r=Math.round(r),n=Math.round(n),s=Math.round(s),(a.width!==n||a.height!==s||a.x!==t||a.y!==r)&&(a.x=t,a.y=r,a.width=n,a.height=s,this.gl.viewport(t,r,n,s))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(t,r,n,s,a=Qo.COLOR|Qo.DEPTH){const{gl:u}=this;u.clearColor(t,r,n,s),u.clear(a)}initFramebuffer(t){const{gl:r}=this,n=new kT(r.createFramebuffer());return n.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(t),t.disposeRunner.add(this),n}resizeFramebuffer(t){const{gl:r}=this,n=t.glFramebuffers[this.CONTEXT_UID];n.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,n.stencil),n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height));const s=t.colorTextures;let a=s.length;r.drawBuffers||(a=Math.min(a,1));for(let u=0;u<a;u++){const l=s[u],c=l.parentTextureArray||l;this.renderer.texture.bind(c,0),u===0&&n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,c._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height))}t.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(t.depthTexture,0)}updateFramebuffer(t,r){const{gl:n}=this,s=t.glFramebuffers[this.CONTEXT_UID],a=t.colorTextures;let u=a.length;n.drawBuffers||(u=Math.min(u,1)),s.multisample>1&&this.canMultisampleFramebuffer(t)?s.msaaBuffer=s.msaaBuffer||n.createRenderbuffer():s.msaaBuffer&&(n.deleteRenderbuffer(s.msaaBuffer),s.msaaBuffer=null,s.blitFramebuffer&&(s.blitFramebuffer.dispose(),s.blitFramebuffer=null));const l=[];for(let c=0;c<u;c++){const f=a[c],p=f.parentTextureArray||f;this.renderer.texture.bind(p,0),c===0&&s.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,s.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,s.multisample,p._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,s.msaaBuffer)):(n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+c,f.target,p._glTextures[this.CONTEXT_UID].texture,r),l.push(n.COLOR_ATTACHMENT0+c))}if(l.length>1&&n.drawBuffers(l),t.depthTexture&&this.writeDepthTexture){const f=t.depthTexture;this.renderer.texture.bind(f,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,f._glTextures[this.CONTEXT_UID].texture,r)}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(s.stencil=s.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,s.stencil),s.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,s.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,s.stencil)):s.stencil&&(n.deleteRenderbuffer(s.stencil),s.stencil=null)}canMultisampleFramebuffer(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture}detectSamples(t){const{msaaSamples:r}=this;let n=fe.NONE;if(t<=1||r===null)return n;for(let s=0;s<r.length;s++)if(r[s]<=t){n=r[s];break}return n===1&&(n=fe.NONE),n}blit(t,r,n){const{current:s,renderer:a,gl:u,CONTEXT_UID:l}=this;if(a.context.webGLVersion!==2||!s)return;const c=s.glFramebuffers[l];if(!c)return;if(!t){if(!c.msaaBuffer)return;const p=s.colorTextures[0];if(!p)return;c.blitFramebuffer||(c.blitFramebuffer=new il(s.width,s.height),c.blitFramebuffer.addColorTexture(0,p)),t=c.blitFramebuffer,t.colorTextures[0]!==p&&(t.colorTextures[0]=p,t.dirtyId++,t.dirtyFormat++),(t.width!==s.width||t.height!==s.height)&&(t.width=s.width,t.height=s.height,t.dirtyId++,t.dirtySize++)}r||(r=BT,r.width=s.width,r.height=s.height),n||(n=r);const f=r.width===n.width&&r.height===n.height;this.bind(t),u.bindFramebuffer(u.READ_FRAMEBUFFER,c.framebuffer),u.blitFramebuffer(r.left,r.top,r.right,r.bottom,n.left,n.top,n.right,n.bottom,u.COLOR_BUFFER_BIT,f?u.NEAREST:u.LINEAR)}disposeFramebuffer(t,r){const n=t.glFramebuffers[this.CONTEXT_UID],s=this.gl;if(!n)return;delete t.glFramebuffers[this.CONTEXT_UID];const a=this.managedFramebuffers.indexOf(t);a>=0&&this.managedFramebuffers.splice(a,1),t.disposeRunner.remove(this),r||(s.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&s.deleteRenderbuffer(n.msaaBuffer),n.stencil&&s.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&this.disposeFramebuffer(n.blitFramebuffer,r)}disposeAll(t){const r=this.managedFramebuffers;this.managedFramebuffers=[];for(let n=0;n<r.length;n++)this.disposeFramebuffer(r[n],t)}forceStencil(){const t=this.current;if(!t)return;const r=t.glFramebuffers[this.CONTEXT_UID];if(!r||r.stencil)return;t.stencil=!0;const n=t.width,s=t.height,a=this.gl,u=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,u),r.msaaBuffer?a.renderbufferStorageMultisample(a.RENDERBUFFER,r.multisample,a.DEPTH24_STENCIL8,n,s):a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_STENCIL,n,s),r.stencil=u,a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.RENDERBUFFER,u)}reset(){this.current=this.unknownFramebuffer,this.viewport=new jt}destroy(){this.renderer=null}}_d.extension={type:Ct.RendererSystem,name:"framebuffer"},Gt.add(_d);const al={5126:4,5123:2,5121:1};class xd{constructor(t){this.renderer=t,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl,r=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,r.webGLVersion!==2){let n=this.renderer.context.extensions.vertexArrayObject;_t.PREFER_ENV===vn.WEBGL_LEGACY&&(n=null),n?(t.createVertexArray=()=>n.createVertexArrayOES(),t.bindVertexArray=s=>n.bindVertexArrayOES(s),t.deleteVertexArray=s=>n.deleteVertexArrayOES(s)):(this.hasVao=!1,t.createVertexArray=()=>null,t.bindVertexArray=()=>null,t.deleteVertexArray=()=>null)}if(r.webGLVersion!==2){const n=t.getExtension("ANGLE_instanced_arrays");n?(t.vertexAttribDivisor=(s,a)=>n.vertexAttribDivisorANGLE(s,a),t.drawElementsInstanced=(s,a,u,l,c)=>n.drawElementsInstancedANGLE(s,a,u,l,c),t.drawArraysInstanced=(s,a,u,l)=>n.drawArraysInstancedANGLE(s,a,u,l)):this.hasInstance=!1}this.canUseUInt32ElementIndex=r.webGLVersion===2||!!r.extensions.uint32ElementIndex}bind(t,r){r=r||this.renderer.shader.shader;const{gl:n}=this;let s=t.glVertexArrayObjects[this.CONTEXT_UID],a=!1;s||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=s={},a=!0);const u=s[r.program.id]||this.initGeometryVao(t,r,a);this._activeGeometry=t,this._activeVao!==u&&(this._activeVao=u,this.hasVao?n.bindVertexArray(u):this.activateVao(t,r.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,r=this.renderer.buffer;for(let n=0;n<t.buffers.length;n++){const s=t.buffers[n];r.update(s)}}checkCompatibility(t,r){const n=t.attributes,s=r.attributeData;for(const a in s)if(!n[a])throw new Error(`shader and geometry incompatible, geometry missing the "${a}" attribute`)}getSignature(t,r){const n=t.attributes,s=r.attributeData,a=["g",t.id];for(const u in n)s[u]&&a.push(u,s[u].location);return a.join("-")}initGeometryVao(t,r,n=!0){const s=this.gl,a=this.CONTEXT_UID,u=this.renderer.buffer,l=r.program;l.glPrograms[a]||this.renderer.shader.generateProgram(r),this.checkCompatibility(t,l);const c=this.getSignature(t,l),f=t.glVertexArrayObjects[this.CONTEXT_UID];let p=f[c];if(p)return f[l.id]=p,p;const m=t.buffers,g=t.attributes,x={},y={};for(const S in m)x[S]=0,y[S]=0;for(const S in g)!g[S].size&&l.attributeData[S]?g[S].size=l.attributeData[S].size:g[S].size||console.warn(`PIXI Geometry attribute '${S}' size cannot be determined (likely the bound shader does not have the attribute)`),x[g[S].buffer]+=g[S].size*al[g[S].type];for(const S in g){const T=g[S],w=T.size;T.stride===void 0&&(x[T.buffer]===w*al[T.type]?T.stride=0:T.stride=x[T.buffer]),T.start===void 0&&(T.start=y[T.buffer],y[T.buffer]+=w*al[T.type])}p=s.createVertexArray(),s.bindVertexArray(p);for(let S=0;S<m.length;S++){const T=m[S];u.bind(T),n&&T._glBuffers[a].refCount++}return this.activateVao(t,l),f[l.id]=p,f[c]=p,s.bindVertexArray(null),u.unbind(Ar.ARRAY_BUFFER),p}disposeGeometry(t,r){var l;if(!this.managedGeometries[t.id])return;delete this.managedGeometries[t.id];const n=t.glVertexArrayObjects[this.CONTEXT_UID],s=this.gl,a=t.buffers,u=(l=this.renderer)==null?void 0:l.buffer;if(t.disposeRunner.remove(this),!!n){if(u)for(let c=0;c<a.length;c++){const f=a[c]._glBuffers[this.CONTEXT_UID];f&&(f.refCount--,f.refCount===0&&!r&&u.dispose(a[c],r))}if(!r){for(const c in n)if(c[0]==="g"){const f=n[c];this._activeVao===f&&this.unbind(),s.deleteVertexArray(f)}}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(t){const r=Object.keys(this.managedGeometries);for(let n=0;n<r.length;n++)this.disposeGeometry(this.managedGeometries[r[n]],t)}activateVao(t,r){const n=this.gl,s=this.CONTEXT_UID,a=this.renderer.buffer,u=t.buffers,l=t.attributes;t.indexBuffer&&a.bind(t.indexBuffer);let c=null;for(const f in l){const p=l[f],m=u[p.buffer],g=m._glBuffers[s];if(r.attributeData[f]){c!==g&&(a.bind(m),c=g);const x=r.attributeData[f].location;if(n.enableVertexAttribArray(x),n.vertexAttribPointer(x,p.size,p.type||n.FLOAT,p.normalized,p.stride,p.start),p.instance)if(this.hasInstance)n.vertexAttribDivisor(x,p.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(t,r,n,s){const{gl:a}=this,u=this._activeGeometry;if(u.indexBuffer){const l=u.indexBuffer.data.BYTES_PER_ELEMENT,c=l===2?a.UNSIGNED_SHORT:a.UNSIGNED_INT;l===2||l===4&&this.canUseUInt32ElementIndex?u.instanced?a.drawElementsInstanced(t,r||u.indexBuffer.data.length,c,(n||0)*l,s||1):a.drawElements(t,r||u.indexBuffer.data.length,c,(n||0)*l):console.warn("unsupported index buffer type: uint32")}else u.instanced?a.drawArraysInstanced(t,n,r||u.getSize(),s||1):a.drawArrays(t,n,r||u.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}xd.extension={type:Ct.RendererSystem,name:"geometry"},Gt.add(xd);const bd=new Pe;class DT{constructor(t,r){this._texture=t,this.mapCoord=new Pe,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof r>"u"?.5:r,this.isSimple=!1}get texture(){return this._texture}set texture(t){this._texture=t,this._textureID=-1}multiplyUvs(t,r){r===void 0&&(r=t);const n=this.mapCoord;for(let s=0;s<t.length;s+=2){const a=t[s],u=t[s+1];r[s]=a*n.a+u*n.c+n.tx,r[s+1]=a*n.b+u*n.d+n.ty}return r}update(t){const r=this._texture;if(!r||!r.valid||!t&&this._textureID===r._updateID)return!1;this._textureID=r._updateID,this._updateID++;const n=r._uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);const s=r.orig,a=r.trim;a&&(bd.set(s.width/a.width,0,0,s.height/a.height,-a.x/a.width,-a.y/a.height),this.mapCoord.append(bd));const u=r.baseTexture,l=this.uClampFrame,c=this.clampMargin/u.resolution,f=this.clampOffset;return l[0]=(r._frame.x+c+f)/u.width,l[1]=(r._frame.y+c+f)/u.height,l[2]=(r._frame.x+r._frame.width-c+f)/u.width,l[3]=(r._frame.y+r._frame.height-c+f)/u.height,this.uClampOffset[0]=f/u.realWidth,this.uClampOffset[1]=f/u.realHeight,this.isSimple=r._frame.width===u.width&&r._frame.height===u.height&&r.rotate===0,!0}}var UT=`varying vec2 vMaskCoord;
386
+ `;const os=class extends as{constructor(e,t,r){const n=Br.from(e||os.defaultVertexSrc,t||os.defaultFragmentSrc);super(n,r),this.padding=0,this.resolution=os.defaultResolution,this.multisample=os.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new oa}apply(e,t,r,n,s){e.applyFilter(this,t,r,n)}get blendMode(){return this.state.blendMode}set blendMode(e){this.state.blendMode=e}get resolution(){return this._resolution}set resolution(e){this._resolution=e}static get defaultVertexSrc(){return MT}static get defaultFragmentSrc(){return PT}};let Dt=os;Dt.defaultResolution=1,Dt.defaultMultisample=fe.NONE;class ga{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Ce(0),this.alpha=1}init(t){this.clearBeforeRender=t.clearBeforeRender;const{backgroundColor:r,background:n,backgroundAlpha:s}=t,a=n??r;a!==void 0&&(this.color=a),this.alpha=s}get color(){return this._backgroundColor.value}set color(t){this._backgroundColor.setValue(t)}get alpha(){return this._backgroundColor.alpha}set alpha(t){this._backgroundColor.setAlpha(t)}get backgroundColor(){return this._backgroundColor}destroy(){}}ga.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0},ga.extension={type:[At.RendererSystem,At.CanvasRendererSystem],name:"background"},$t.add(ga);class cd{constructor(t){this.renderer=t,this.emptyRenderer=new hd(t),this.currentRenderer=this.emptyRenderer}setObjectRenderer(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(t,r){const{boundTextures:n}=this.renderer.texture;for(let s=r-1;s>=0;--s)t[s]=n[s]||null,t[s]&&(t[s]._batchLocation=s)}boundArray(t,r,n,s){const{elements:a,ids:u,count:l}=t;let c=0;for(let f=0;f<l;f++){const p=a[f],m=p._batchLocation;if(m>=0&&m<s&&r[m]===p){u[f]=m;continue}for(;c<s;){const g=r[c];if(g&&g._batchEnabled===n&&g._batchLocation===c){c++;continue}u[f]=c,p._batchLocation=c,r[c]=p;break}}}destroy(){this.renderer=null}}cd.extension={type:At.RendererSystem,name:"batch"},$t.add(cd);let fd=0;class ma{constructor(t){this.renderer=t,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=fd++}init(t){if(t.context)this.initFromContext(t.context);else{const r=this.renderer.background.alpha<1,n=t.premultipliedAlpha;this.preserveDrawingBuffer=t.preserveDrawingBuffer,this.useContextAlpha=t.useContextAlpha,this.powerPreference=t.powerPreference,this.initFromOptions({alpha:r,premultipliedAlpha:n,antialias:t.antialias,stencil:!0,preserveDrawingBuffer:t.preserveDrawingBuffer,powerPreference:t.powerPreference})}}initFromContext(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=fd++,this.renderer.runners.contextChange.emit(t);const r=this.renderer.view;r.addEventListener!==void 0&&(r.addEventListener("webglcontextlost",this.handleContextLost,!1),r.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(t){const r=this.createContext(this.renderer.view,t);this.initFromContext(r)}createContext(t,r){let n;if(xt.PREFER_ENV>=vn.WEBGL2&&(n=t.getContext("webgl2",r)),n)this.webGLVersion=2;else if(this.webGLVersion=1,n=t.getContext("webgl",r)||t.getContext("experimental-webgl",r),!n)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl}getExtensions(){const{gl:t}=this,r={loseContext:t.getExtension("WEBGL_lose_context"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,r,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,r,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})}handleContextLost(t){t.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){const t=this.renderer.view;this.renderer=null,t.removeEventListener!==void 0&&(t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(t){const r=t.getContextAttributes(),n="WebGL2RenderingContext"in globalThis&&t instanceof globalThis.WebGL2RenderingContext;n&&(this.webGLVersion=2),r&&!r.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");const s=n||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=s,s||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}}ma.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"},ma.extension={type:At.RendererSystem,name:"context"},$t.add(ma);class OT extends Ku{upload(t,r,n){const s=t.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Zr.UNPACK);const a=r.realWidth,u=r.realHeight;return n.width===a&&n.height===u?s.texSubImage2D(r.target,0,0,0,a,u,r.format,n.type,this.data):(n.width=a,n.height=u,s.texImage2D(r.target,0,n.internalFormat,a,u,0,r.format,n.type,this.data)),!0}}class il{constructor(t,r){this.width=Math.round(t||100),this.height=Math.round(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new sr("disposeFramebuffer"),this.multisample=fe.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(t=0,r){return this.colorTextures[t]=r||new Lt(null,{scaleMode:Sr.NEAREST,resolution:1,mipmap:yn.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(t){return this.depthTexture=t||new Lt(new OT(null,{width:this.width,height:this.height}),{scaleMode:Sr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:yn.OFF,format:Z.DEPTH_COMPONENT,type:Nt.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(t,r){if(t=Math.round(t),r=Math.round(r),!(t===this.width&&r===this.height)){this.width=t,this.height=r,this.dirtyId++,this.dirtySize++;for(let n=0;n<this.colorTextures.length;n++){const s=this.colorTextures[n],a=s.resolution;s.setSize(t/a,r/a)}if(this.depthTexture){const n=this.depthTexture.resolution;this.depthTexture.setSize(t/n,r/n)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}}class dd extends Lt{constructor(t={}){if(typeof t=="number"){const r=arguments[0],n=arguments[1],s=arguments[2],a=arguments[3];t={width:r,height:n,scaleMode:s,resolution:a}}t.width=t.width||100,t.height=t.height||100,t.multisample??(t.multisample=fe.NONE),super(null,t),this.mipmap=yn.OFF,this.valid=!0,this._clear=new Ce([0,0,0,0]),this.framebuffer=new il(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=t.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(t){this._clear.setValue(t)}get clearColor(){return this._clear.value}get clear(){return this._clear}resize(t,r){this.framebuffer.resize(t*this.resolution,r*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)}dispose(){this.framebuffer.dispose(),super.dispose()}destroy(){super.destroy(),this.framebuffer.destroyDepthTexture(),this.framebuffer=null}}class rn extends rs{constructor(t){const r=t,n=r.naturalWidth||r.videoWidth||r.width,s=r.naturalHeight||r.videoHeight||r.height;super(n,s),this.source=t,this.noSubImage=!1}static crossOrigin(t,r,n){n===void 0&&!r.startsWith("data:")?t.crossOrigin=Qb(r):n!==!1&&(t.crossOrigin=typeof n=="string"?n:"anonymous")}upload(t,r,n,s){const a=t.gl,u=r.realWidth,l=r.realHeight;if(s=s||this.source,typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement){if(!s.complete||s.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&s instanceof HTMLVideoElement&&s.readyState<=1&&s.buffered.length===0)return!1;return a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.alphaMode===Zr.UNPACK),!this.noSubImage&&r.target===a.TEXTURE_2D&&n.width===u&&n.height===l?a.texSubImage2D(a.TEXTURE_2D,0,0,0,r.format,n.type,s):(n.width=u,n.height=l,a.texImage2D(r.target,0,n.internalFormat,r.format,n.type,s)),!0}update(){if(this.destroyed)return;const t=this.source,r=t.naturalWidth||t.videoWidth||t.width,n=t.naturalHeight||t.videoHeight||t.height;this.resize(r,n),super.update()}dispose(){this.source=null}}class pd extends rn{constructor(t,r){if(r=r||{},typeof t=="string"){const n=new Image;rn.crossOrigin(n,t,r.crossorigin),n.src=t,t=n}super(t),!t.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=t.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(r.createBitmap??xt.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this.bitmap=null,this._load=null,r.autoLoad!==!1&&this.load()}load(t){return this._load?this._load:(t!==void 0&&(this.createBitmap=t),this._load=new Promise((r,n)=>{const s=this.source;this.url=s.src;const a=()=>{this.destroyed||(s.onload=null,s.onerror=null,this.resize(s.width,s.height),this._load=null,this.createBitmap?r(this.process()):r(this))};s.complete&&s.src?a():(s.onload=a,s.onerror=u=>{n(u),this.onError.emit(u)})}),this._load)}process(){const t=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);const r=globalThis.createImageBitmap,n=!t.crossOrigin||t.crossOrigin==="anonymous";return this._process=fetch(t.src,{mode:n?"cors":"no-cors"}).then(s=>s.blob()).then(s=>r(s,0,0,t.width,t.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Zr.UNPACK?"premultiply":"none"})).then(s=>this.destroyed?Promise.reject():(this.bitmap=s,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(t,r,n){if(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(t,r,n);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(t,r,n,this.bitmap),!this.preserveBitmap){let s=!0;const a=r._glTextures;for(const u in a){const l=a[u];if(l!==n&&l.dirtyId!==r.dirtyId){s=!1;break}}s&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(t){return typeof HTMLImageElement<"u"&&(typeof t=="string"||t instanceof HTMLImageElement)}}class gd{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(t,r,n){const s=r.width,a=r.height;if(n){const u=t.width/2/s,l=t.height/2/a,c=t.x/s+u,f=t.y/a+l;n=ne.add(n,ne.NW),this.x0=c+u*ne.uX(n),this.y0=f+l*ne.uY(n),n=ne.add(n,2),this.x1=c+u*ne.uX(n),this.y1=f+l*ne.uY(n),n=ne.add(n,2),this.x2=c+u*ne.uX(n),this.y2=f+l*ne.uY(n),n=ne.add(n,2),this.x3=c+u*ne.uX(n),this.y3=f+l*ne.uY(n)}else this.x0=t.x/s,this.y0=t.y/a,this.x1=(t.x+t.width)/s,this.y1=t.y/a,this.x2=(t.x+t.width)/s,this.y2=(t.y+t.height)/a,this.x3=t.x/s,this.y3=(t.y+t.height)/a;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}}const md=new gd;function va(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}class Mt extends Gs{constructor(t,r,n,s,a,u,l){if(super(),this.noFrame=!1,r||(this.noFrame=!0,r=new jt(0,0,1,1)),t instanceof Mt&&(t=t.baseTexture),this.baseTexture=t,this._frame=r,this.trim=s,this.valid=!1,this._uvs=md,this.uvMatrix=null,this.orig=n||r,this._rotate=Number(a||0),a===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=u?new Wt(u.x,u.y):new Wt(0,0),this.defaultBorders=l,this._updateID=0,this.textureCacheIds=[],t.valid?this.noFrame?t.valid&&this.onBaseTextureUpdated(t):this.frame=r:t.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&t.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(t){if(this.baseTexture){if(t){const{resource:r}=this.baseTexture;r!=null&&r.url&&Rr[r.url]&&Mt.removeFromCache(r.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,Mt.removeFromCache(this),this.textureCacheIds=null}clone(){var s;const t=this._frame.clone(),r=this._frame===this.orig?t:this.orig.clone(),n=new Mt(this.baseTexture,!this.noFrame&&t,r,(s=this.trim)==null?void 0:s.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(n._frame=t),n}updateUvs(){this._uvs===md&&(this._uvs=new gd),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(t,r={},n=xt.STRICT_TEXTURE_CACHE){const s=typeof t=="string";let a=null;if(s)a=t;else if(t instanceof Lt){if(!t.cacheId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t.cacheId=`${l}-${es()}`,Lt.addToCache(t,t.cacheId)}a=t.cacheId}else{if(!t._pixiId){const l=(r==null?void 0:r.pixiIdPrefix)||"pixiid";t._pixiId=`${l}_${es()}`}a=t._pixiId}let u=Rr[a];if(s&&n&&!u)throw new Error(`The cacheId "${a}" does not exist in TextureCache.`);return!u&&!(t instanceof Lt)?(r.resolution||(r.resolution=Yf(t)),u=new Mt(new Lt(t,r)),u.baseTexture.cacheId=a,Lt.addToCache(u.baseTexture,a),Mt.addToCache(u,a)):!u&&t instanceof Lt&&(u=new Mt(t),Mt.addToCache(u,a)),u}static fromURL(t,r){const n=Object.assign({autoLoad:!1},r==null?void 0:r.resourceOptions),s=Mt.from(t,Object.assign({resourceOptions:n},r),!1),a=s.baseTexture.resource;return s.baseTexture.valid?Promise.resolve(s):a.load().then(()=>Promise.resolve(s))}static fromBuffer(t,r,n,s){return new Mt(Lt.fromBuffer(t,r,n,s))}static fromLoader(t,r,n,s){const a=new Lt(t,Object.assign({scaleMode:Lt.defaultOptions.scaleMode,resolution:Yf(r)},s)),{resource:u}=a;u instanceof pd&&(u.url=r);const l=new Mt(a);return n||(n=r),Lt.addToCache(l.baseTexture,n),Mt.addToCache(l,n),n!==r&&(Lt.addToCache(l.baseTexture,r),Mt.addToCache(l,r)),l.baseTexture.valid?Promise.resolve(l):new Promise(c=>{l.baseTexture.once("loaded",()=>c(l))})}static addToCache(t,r){r&&(t.textureCacheIds.includes(r)||t.textureCacheIds.push(r),Rr[r]&&Rr[r]!==t&&console.warn(`Texture added to the cache with an id [${r}] that already had an entry`),Rr[r]=t)}static removeFromCache(t){if(typeof t=="string"){const r=Rr[t];if(r){const n=r.textureCacheIds.indexOf(t);return n>-1&&r.textureCacheIds.splice(n,1),delete Rr[t],r}}else if(t!=null&&t.textureCacheIds){for(let r=0;r<t.textureCacheIds.length;++r)Rr[t.textureCacheIds[r]]===t&&delete Rr[t.textureCacheIds[r]];return t.textureCacheIds.length=0,t}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(t){this._frame=t,this.noFrame=!1;const{x:r,y:n,width:s,height:a}=t,u=r+s>this.baseTexture.width,l=n+a>this.baseTexture.height;if(u||l){const c=u&&l?"and":"or",f=`X: ${r} + ${s} = ${r+s} > ${this.baseTexture.width}`,p=`Y: ${n} + ${a} = ${n+a} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${f} ${c} ${p}`)}this.valid=s&&a&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=t),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(t){this._rotate=t,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return Mt._EMPTY||(Mt._EMPTY=new Mt(new Lt),va(Mt._EMPTY),va(Mt._EMPTY.baseTexture)),Mt._EMPTY}static get WHITE(){if(!Mt._WHITE){const t=xt.ADAPTER.createCanvas(16,16),r=t.getContext("2d");t.width=16,t.height=16,r.fillStyle="white",r.fillRect(0,0,16,16),Mt._WHITE=new Mt(Lt.from(t)),va(Mt._WHITE),va(Mt._WHITE.baseTexture)}return Mt._WHITE}}class ya extends Mt{constructor(t,r){super(t,r),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(t){this.framebuffer.multisample=t}resize(t,r,n=!0){const s=this.baseTexture.resolution,a=Math.round(t*s)/s,u=Math.round(r*s)/s;this.valid=a>0&&u>0,this._frame.width=this.orig.width=a,this._frame.height=this.orig.height=u,n&&this.baseTexture.resize(a,u),this.updateUvs()}setResolution(t){const{baseTexture:r}=this;r.resolution!==t&&(r.setResolution(t),this.resize(r.width,r.height,!1))}static create(t){return new ya(new dd(t))}}class vd{constructor(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(t,r,n=fe.NONE){const s=new dd(Object.assign({width:t,height:r,resolution:1,multisample:n},this.textureOptions));return new ya(s)}getOptimalTexture(t,r,n=1,s=fe.NONE){let a;t=Math.ceil(t*n-1e-6),r=Math.ceil(r*n-1e-6),!this.enableFullScreen||t!==this._pixelsWidth||r!==this._pixelsHeight?(t=ia(t),r=ia(r),a=((t&65535)<<16|r&65535)>>>0,s>1&&(a+=s*4294967296)):a=s>1?-s:-1,this.texturePool[a]||(this.texturePool[a]=[]);let u=this.texturePool[a].pop();return u||(u=this.createTexture(t,r,s)),u.filterPoolKey=a,u.setResolution(n),u}getFilterTexture(t,r,n){const s=this.getOptimalTexture(t.width,t.height,r||t.resolution,n||fe.NONE);return s.filterFrame=t.filterFrame,s}returnTexture(t){const r=t.filterPoolKey;t.filterFrame=null,this.texturePool[r].push(t)}returnFilterTexture(t){this.returnTexture(t)}clear(t){if(t=t!==!1,t)for(const r in this.texturePool){const n=this.texturePool[r];if(n)for(let s=0;s<n.length;s++)n[s].destroy(!0)}this.texturePool={}}setScreenSize(t){if(!(t.width===this._pixelsWidth&&t.height===this._pixelsHeight)){this.enableFullScreen=t.width>0&&t.height>0;for(const r in this.texturePool){if(!(Number(r)<0))continue;const n=this.texturePool[r];if(n)for(let s=0;s<n.length;s++)n[s].destroy(!0);this.texturePool[r]=[]}this._pixelsWidth=t.width,this._pixelsHeight=t.height}}}vd.SCREEN_KEY=-1;class FT extends ui{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}}class NT extends ui{constructor(){super(),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new Re(this.vertices),this.uvBuffer=new Re(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(t,r){let n=0,s=0;return this.uvs[0]=n,this.uvs[1]=s,this.uvs[2]=n+r.width/t.width,this.uvs[3]=s,this.uvs[4]=n+r.width/t.width,this.uvs[5]=s+r.height/t.height,this.uvs[6]=n,this.uvs[7]=s+r.height/t.height,n=r.x,s=r.y,this.vertices[0]=n,this.vertices[1]=s,this.vertices[2]=n+r.width,this.vertices[3]=s,this.vertices[4]=n+r.width,this.vertices[5]=s+r.height,this.vertices[6]=n,this.vertices[7]=s+r.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}}class LT{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=fe.NONE,this.sourceFrame=new jt,this.destinationFrame=new jt,this.bindingSourceFrame=new jt,this.bindingDestinationFrame=new jt,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}}const _a=[new Wt,new Wt,new Wt,new Wt],sl=new Pe;class yd{constructor(t){this.renderer=t,this.defaultFilterStack=[{}],this.texturePool=new vd,this.statePool=[],this.quad=new FT,this.quadUv=new NT,this.tempRect=new jt,this.activeState={},this.globalUniforms=new ar({outputFrame:new jt,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}init(){this.texturePool.setScreenSize(this.renderer.view)}push(t,r){const n=this.renderer,s=this.defaultFilterStack,a=this.statePool.pop()||new LT,u=this.renderer.renderTexture;let l=r[0].resolution,c=r[0].multisample,f=r[0].padding,p=r[0].autoFit,m=r[0].legacy??!0;for(let y=1;y<r.length;y++){const S=r[y];l=Math.min(l,S.resolution),c=Math.min(c,S.multisample),f=this.useMaxPadding?Math.max(f,S.padding):f+S.padding,p=p&&S.autoFit,m=m||(S.legacy??!0)}s.length===1&&(this.defaultFilterStack[0].renderTexture=u.current),s.push(a),a.resolution=l,a.multisample=c,a.legacy=m,a.target=t,a.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),a.sourceFrame.pad(f);const g=this.tempRect.copyFrom(u.sourceFrame);n.projection.transform&&this.transformAABB(sl.copyFrom(n.projection.transform).invert(),g),p?(a.sourceFrame.fit(g),(a.sourceFrame.width<=0||a.sourceFrame.height<=0)&&(a.sourceFrame.width=0,a.sourceFrame.height=0)):a.sourceFrame.intersects(g)||(a.sourceFrame.width=0,a.sourceFrame.height=0),this.roundFrame(a.sourceFrame,u.current?u.current.resolution:n.resolution,u.sourceFrame,u.destinationFrame,n.projection.transform),a.renderTexture=this.getOptimalFilterTexture(a.sourceFrame.width,a.sourceFrame.height,l,c),a.filters=r,a.destinationFrame.width=a.renderTexture.width,a.destinationFrame.height=a.renderTexture.height;const x=this.tempRect;x.x=0,x.y=0,x.width=a.sourceFrame.width,x.height=a.sourceFrame.height,a.renderTexture.filterFrame=a.sourceFrame,a.bindingSourceFrame.copyFrom(u.sourceFrame),a.bindingDestinationFrame.copyFrom(u.destinationFrame),a.transform=n.projection.transform,n.projection.transform=null,u.bind(a.renderTexture,a.sourceFrame,x),n.framebuffer.clear(0,0,0,0)}pop(){const t=this.defaultFilterStack,r=t.pop(),n=r.filters;this.activeState=r;const s=this.globalUniforms.uniforms;s.outputFrame=r.sourceFrame,s.resolution=r.resolution;const a=s.inputSize,u=s.inputPixel,l=s.inputClamp;if(a[0]=r.destinationFrame.width,a[1]=r.destinationFrame.height,a[2]=1/a[0],a[3]=1/a[1],u[0]=Math.round(a[0]*r.resolution),u[1]=Math.round(a[1]*r.resolution),u[2]=1/u[0],u[3]=1/u[1],l[0]=.5*u[2],l[1]=.5*u[3],l[2]=r.sourceFrame.width*a[2]-.5*u[2],l[3]=r.sourceFrame.height*a[3]-.5*u[3],r.legacy){const f=s.filterArea;f[0]=r.destinationFrame.width,f[1]=r.destinationFrame.height,f[2]=r.sourceFrame.x,f[3]=r.sourceFrame.y,s.filterClamp=s.inputClamp}this.globalUniforms.update();const c=t[t.length-1];if(this.renderer.framebuffer.blit(),n.length===1)n[0].apply(this,r.renderTexture,c.renderTexture,_n.BLEND,r),this.returnFilterTexture(r.renderTexture);else{let f=r.renderTexture,p=this.getOptimalFilterTexture(f.width,f.height,r.resolution);p.filterFrame=f.filterFrame;let m=0;for(m=0;m<n.length-1;++m){m===1&&r.multisample>1&&(p=this.getOptimalFilterTexture(f.width,f.height,r.resolution),p.filterFrame=f.filterFrame),n[m].apply(this,f,p,_n.CLEAR,r);const g=f;f=p,p=g}n[m].apply(this,f,c.renderTexture,_n.BLEND,r),m>1&&r.multisample>1&&this.returnFilterTexture(r.renderTexture),this.returnFilterTexture(f),this.returnFilterTexture(p)}r.clear(),this.statePool.push(r)}bindAndClear(t,r=_n.CLEAR){const{renderTexture:n,state:s}=this.renderer;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t!=null&&t.filterFrame){const u=this.tempRect;u.x=0,u.y=0,u.width=t.filterFrame.width,u.height=t.filterFrame.height,n.bind(t,t.filterFrame,u)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?n.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);const a=s.stateId&1||this.forceClear;(r===_n.CLEAR||r===_n.BLIT&&a)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(t,r,n,s){const a=this.renderer;a.state.set(t.state),this.bindAndClear(n,s),t.uniforms.uSampler=r,t.uniforms.filterGlobals=this.globalUniforms,a.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(r._frame,r.filterFrame),a.geometry.bind(this.quadUv),a.geometry.draw(Kr.TRIANGLES)):(a.geometry.bind(this.quad),a.geometry.draw(Kr.TRIANGLE_STRIP))}calculateSpriteMatrix(t,r){const{sourceFrame:n,destinationFrame:s}=this.activeState,{orig:a}=r._texture,u=t.set(s.width,0,0,s.height,n.x,n.y),l=r.worldTransform.copyTo(Pe.TEMP_MATRIX);return l.invert(),u.prepend(l),u.scale(1/a.width,1/a.height),u.translate(r.anchor.x,r.anchor.y),u}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(t,r,n=1,s=fe.NONE){return this.texturePool.getOptimalTexture(t,r,n,s)}getFilterTexture(t,r,n){if(typeof t=="number"){const a=t;t=r,r=a}t=t||this.activeState.renderTexture;const s=this.texturePool.getOptimalTexture(t.width,t.height,r||t.resolution,n||fe.NONE);return s.filterFrame=t.filterFrame,s}returnFilterTexture(t){this.texturePool.returnTexture(t)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(t,r){const n=_a[0],s=_a[1],a=_a[2],u=_a[3];n.set(r.left,r.top),s.set(r.left,r.bottom),a.set(r.right,r.top),u.set(r.right,r.bottom),t.apply(n,n),t.apply(s,s),t.apply(a,a),t.apply(u,u);const l=Math.min(n.x,s.x,a.x,u.x),c=Math.min(n.y,s.y,a.y,u.y),f=Math.max(n.x,s.x,a.x,u.x),p=Math.max(n.y,s.y,a.y,u.y);r.x=l,r.y=c,r.width=f-l,r.height=p-c}roundFrame(t,r,n,s,a){if(!(t.width<=0||t.height<=0||n.width<=0||n.height<=0)){if(a){const{a:u,b:l,c,d:f}=a;if((Math.abs(l)>1e-4||Math.abs(c)>1e-4)&&(Math.abs(u)>1e-4||Math.abs(f)>1e-4))return}a=a?sl.copyFrom(a):sl.identity(),a.translate(-n.x,-n.y).scale(s.width/n.width,s.height/n.height).translate(s.x,s.y),this.transformAABB(a,t),t.ceil(r),this.transformAABB(a.invert(),t)}}}yd.extension={type:At.RendererSystem,name:"filter"},$t.add(yd);class kT{constructor(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=fe.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}}const BT=new jt;class _d{constructor(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new il(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new jt,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let r=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;xt.PREFER_ENV===vn.WEBGL_LEGACY&&(r=null,n=null),r?t.drawBuffers=s=>r.drawBuffersWEBGL(s):(this.hasMRT=!1,t.drawBuffers=()=>{}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)}bind(t,r,n=0){const{gl:s}=this;if(t){const a=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,s.bindFramebuffer(s.FRAMEBUFFER,a.framebuffer)),a.mipLevel!==n&&(t.dirtyId++,t.dirtyFormat++,a.mipLevel=n),a.dirtyId!==t.dirtyId&&(a.dirtyId=t.dirtyId,a.dirtyFormat!==t.dirtyFormat?(a.dirtyFormat=t.dirtyFormat,a.dirtySize=t.dirtySize,this.updateFramebuffer(t,n)):a.dirtySize!==t.dirtySize&&(a.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(let u=0;u<t.colorTextures.length;u++){const l=t.colorTextures[u];this.renderer.texture.unbind(l.parentTextureArray||l)}if(t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),r){const u=r.width>>n,l=r.height>>n,c=u/r.width;this.setViewport(r.x*c,r.y*c,u,l)}else{const u=t.width>>n,l=t.height>>n;this.setViewport(0,0,u,l)}}else this.current&&(this.current=null,s.bindFramebuffer(s.FRAMEBUFFER,null)),r?this.setViewport(r.x,r.y,r.width,r.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(t,r,n,s){const a=this.viewport;t=Math.round(t),r=Math.round(r),n=Math.round(n),s=Math.round(s),(a.width!==n||a.height!==s||a.x!==t||a.y!==r)&&(a.x=t,a.y=r,a.width=n,a.height=s,this.gl.viewport(t,r,n,s))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(t,r,n,s,a=Qo.COLOR|Qo.DEPTH){const{gl:u}=this;u.clearColor(t,r,n,s),u.clear(a)}initFramebuffer(t){const{gl:r}=this,n=new kT(r.createFramebuffer());return n.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(t),t.disposeRunner.add(this),n}resizeFramebuffer(t){const{gl:r}=this,n=t.glFramebuffers[this.CONTEXT_UID];n.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,n.stencil),n.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height));const s=t.colorTextures;let a=s.length;r.drawBuffers||(a=Math.min(a,1));for(let u=0;u<a;u++){const l=s[u],c=l.parentTextureArray||l;this.renderer.texture.bind(c,0),u===0&&n.msaaBuffer&&(r.bindRenderbuffer(r.RENDERBUFFER,n.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,n.multisample,c._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height))}t.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(t.depthTexture,0)}updateFramebuffer(t,r){const{gl:n}=this,s=t.glFramebuffers[this.CONTEXT_UID],a=t.colorTextures;let u=a.length;n.drawBuffers||(u=Math.min(u,1)),s.multisample>1&&this.canMultisampleFramebuffer(t)?s.msaaBuffer=s.msaaBuffer||n.createRenderbuffer():s.msaaBuffer&&(n.deleteRenderbuffer(s.msaaBuffer),s.msaaBuffer=null,s.blitFramebuffer&&(s.blitFramebuffer.dispose(),s.blitFramebuffer=null));const l=[];for(let c=0;c<u;c++){const f=a[c],p=f.parentTextureArray||f;this.renderer.texture.bind(p,0),c===0&&s.msaaBuffer?(n.bindRenderbuffer(n.RENDERBUFFER,s.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,s.multisample,p._glTextures[this.CONTEXT_UID].internalFormat,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,s.msaaBuffer)):(n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+c,f.target,p._glTextures[this.CONTEXT_UID].texture,r),l.push(n.COLOR_ATTACHMENT0+c))}if(l.length>1&&n.drawBuffers(l),t.depthTexture&&this.writeDepthTexture){const f=t.depthTexture;this.renderer.texture.bind(f,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,f._glTextures[this.CONTEXT_UID].texture,r)}(t.stencil||t.depth)&&!(t.depthTexture&&this.writeDepthTexture)?(s.stencil=s.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,s.stencil),s.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,s.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,s.stencil)):s.stencil&&(n.deleteRenderbuffer(s.stencil),s.stencil=null)}canMultisampleFramebuffer(t){return this.renderer.context.webGLVersion!==1&&t.colorTextures.length<=1&&!t.depthTexture}detectSamples(t){const{msaaSamples:r}=this;let n=fe.NONE;if(t<=1||r===null)return n;for(let s=0;s<r.length;s++)if(r[s]<=t){n=r[s];break}return n===1&&(n=fe.NONE),n}blit(t,r,n){const{current:s,renderer:a,gl:u,CONTEXT_UID:l}=this;if(a.context.webGLVersion!==2||!s)return;const c=s.glFramebuffers[l];if(!c)return;if(!t){if(!c.msaaBuffer)return;const p=s.colorTextures[0];if(!p)return;c.blitFramebuffer||(c.blitFramebuffer=new il(s.width,s.height),c.blitFramebuffer.addColorTexture(0,p)),t=c.blitFramebuffer,t.colorTextures[0]!==p&&(t.colorTextures[0]=p,t.dirtyId++,t.dirtyFormat++),(t.width!==s.width||t.height!==s.height)&&(t.width=s.width,t.height=s.height,t.dirtyId++,t.dirtySize++)}r||(r=BT,r.width=s.width,r.height=s.height),n||(n=r);const f=r.width===n.width&&r.height===n.height;this.bind(t),u.bindFramebuffer(u.READ_FRAMEBUFFER,c.framebuffer),u.blitFramebuffer(r.left,r.top,r.right,r.bottom,n.left,n.top,n.right,n.bottom,u.COLOR_BUFFER_BIT,f?u.NEAREST:u.LINEAR)}disposeFramebuffer(t,r){const n=t.glFramebuffers[this.CONTEXT_UID],s=this.gl;if(!n)return;delete t.glFramebuffers[this.CONTEXT_UID];const a=this.managedFramebuffers.indexOf(t);a>=0&&this.managedFramebuffers.splice(a,1),t.disposeRunner.remove(this),r||(s.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&s.deleteRenderbuffer(n.msaaBuffer),n.stencil&&s.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&this.disposeFramebuffer(n.blitFramebuffer,r)}disposeAll(t){const r=this.managedFramebuffers;this.managedFramebuffers=[];for(let n=0;n<r.length;n++)this.disposeFramebuffer(r[n],t)}forceStencil(){const t=this.current;if(!t)return;const r=t.glFramebuffers[this.CONTEXT_UID];if(!r||r.stencil)return;t.stencil=!0;const n=t.width,s=t.height,a=this.gl,u=a.createRenderbuffer();a.bindRenderbuffer(a.RENDERBUFFER,u),r.msaaBuffer?a.renderbufferStorageMultisample(a.RENDERBUFFER,r.multisample,a.DEPTH24_STENCIL8,n,s):a.renderbufferStorage(a.RENDERBUFFER,a.DEPTH_STENCIL,n,s),r.stencil=u,a.framebufferRenderbuffer(a.FRAMEBUFFER,a.DEPTH_STENCIL_ATTACHMENT,a.RENDERBUFFER,u)}reset(){this.current=this.unknownFramebuffer,this.viewport=new jt}destroy(){this.renderer=null}}_d.extension={type:At.RendererSystem,name:"framebuffer"},$t.add(_d);const al={5126:4,5123:2,5121:1};class xd{constructor(t){this.renderer=t,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);const t=this.gl=this.renderer.gl,r=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,r.webGLVersion!==2){let n=this.renderer.context.extensions.vertexArrayObject;xt.PREFER_ENV===vn.WEBGL_LEGACY&&(n=null),n?(t.createVertexArray=()=>n.createVertexArrayOES(),t.bindVertexArray=s=>n.bindVertexArrayOES(s),t.deleteVertexArray=s=>n.deleteVertexArrayOES(s)):(this.hasVao=!1,t.createVertexArray=()=>null,t.bindVertexArray=()=>null,t.deleteVertexArray=()=>null)}if(r.webGLVersion!==2){const n=t.getExtension("ANGLE_instanced_arrays");n?(t.vertexAttribDivisor=(s,a)=>n.vertexAttribDivisorANGLE(s,a),t.drawElementsInstanced=(s,a,u,l,c)=>n.drawElementsInstancedANGLE(s,a,u,l,c),t.drawArraysInstanced=(s,a,u,l)=>n.drawArraysInstancedANGLE(s,a,u,l)):this.hasInstance=!1}this.canUseUInt32ElementIndex=r.webGLVersion===2||!!r.extensions.uint32ElementIndex}bind(t,r){r=r||this.renderer.shader.shader;const{gl:n}=this;let s=t.glVertexArrayObjects[this.CONTEXT_UID],a=!1;s||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=s={},a=!0);const u=s[r.program.id]||this.initGeometryVao(t,r,a);this._activeGeometry=t,this._activeVao!==u&&(this._activeVao=u,this.hasVao?n.bindVertexArray(u):this.activateVao(t,r.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){const t=this._activeGeometry,r=this.renderer.buffer;for(let n=0;n<t.buffers.length;n++){const s=t.buffers[n];r.update(s)}}checkCompatibility(t,r){const n=t.attributes,s=r.attributeData;for(const a in s)if(!n[a])throw new Error(`shader and geometry incompatible, geometry missing the "${a}" attribute`)}getSignature(t,r){const n=t.attributes,s=r.attributeData,a=["g",t.id];for(const u in n)s[u]&&a.push(u,s[u].location);return a.join("-")}initGeometryVao(t,r,n=!0){const s=this.gl,a=this.CONTEXT_UID,u=this.renderer.buffer,l=r.program;l.glPrograms[a]||this.renderer.shader.generateProgram(r),this.checkCompatibility(t,l);const c=this.getSignature(t,l),f=t.glVertexArrayObjects[this.CONTEXT_UID];let p=f[c];if(p)return f[l.id]=p,p;const m=t.buffers,g=t.attributes,x={},y={};for(const S in m)x[S]=0,y[S]=0;for(const S in g)!g[S].size&&l.attributeData[S]?g[S].size=l.attributeData[S].size:g[S].size||console.warn(`PIXI Geometry attribute '${S}' size cannot be determined (likely the bound shader does not have the attribute)`),x[g[S].buffer]+=g[S].size*al[g[S].type];for(const S in g){const T=g[S],w=T.size;T.stride===void 0&&(x[T.buffer]===w*al[T.type]?T.stride=0:T.stride=x[T.buffer]),T.start===void 0&&(T.start=y[T.buffer],y[T.buffer]+=w*al[T.type])}p=s.createVertexArray(),s.bindVertexArray(p);for(let S=0;S<m.length;S++){const T=m[S];u.bind(T),n&&T._glBuffers[a].refCount++}return this.activateVao(t,l),f[l.id]=p,f[c]=p,s.bindVertexArray(null),u.unbind(Ar.ARRAY_BUFFER),p}disposeGeometry(t,r){var l;if(!this.managedGeometries[t.id])return;delete this.managedGeometries[t.id];const n=t.glVertexArrayObjects[this.CONTEXT_UID],s=this.gl,a=t.buffers,u=(l=this.renderer)==null?void 0:l.buffer;if(t.disposeRunner.remove(this),!!n){if(u)for(let c=0;c<a.length;c++){const f=a[c]._glBuffers[this.CONTEXT_UID];f&&(f.refCount--,f.refCount===0&&!r&&u.dispose(a[c],r))}if(!r){for(const c in n)if(c[0]==="g"){const f=n[c];this._activeVao===f&&this.unbind(),s.deleteVertexArray(f)}}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(t){const r=Object.keys(this.managedGeometries);for(let n=0;n<r.length;n++)this.disposeGeometry(this.managedGeometries[r[n]],t)}activateVao(t,r){const n=this.gl,s=this.CONTEXT_UID,a=this.renderer.buffer,u=t.buffers,l=t.attributes;t.indexBuffer&&a.bind(t.indexBuffer);let c=null;for(const f in l){const p=l[f],m=u[p.buffer],g=m._glBuffers[s];if(r.attributeData[f]){c!==g&&(a.bind(m),c=g);const x=r.attributeData[f].location;if(n.enableVertexAttribArray(x),n.vertexAttribPointer(x,p.size,p.type||n.FLOAT,p.normalized,p.stride,p.start),p.instance)if(this.hasInstance)n.vertexAttribDivisor(x,p.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(t,r,n,s){const{gl:a}=this,u=this._activeGeometry;if(u.indexBuffer){const l=u.indexBuffer.data.BYTES_PER_ELEMENT,c=l===2?a.UNSIGNED_SHORT:a.UNSIGNED_INT;l===2||l===4&&this.canUseUInt32ElementIndex?u.instanced?a.drawElementsInstanced(t,r||u.indexBuffer.data.length,c,(n||0)*l,s||1):a.drawElements(t,r||u.indexBuffer.data.length,c,(n||0)*l):console.warn("unsupported index buffer type: uint32")}else u.instanced?a.drawArraysInstanced(t,n,r||u.getSize(),s||1):a.drawArrays(t,n,r||u.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}}xd.extension={type:At.RendererSystem,name:"geometry"},$t.add(xd);const bd=new Pe;class DT{constructor(t,r){this._texture=t,this.mapCoord=new Pe,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof r>"u"?.5:r,this.isSimple=!1}get texture(){return this._texture}set texture(t){this._texture=t,this._textureID=-1}multiplyUvs(t,r){r===void 0&&(r=t);const n=this.mapCoord;for(let s=0;s<t.length;s+=2){const a=t[s],u=t[s+1];r[s]=a*n.a+u*n.c+n.tx,r[s+1]=a*n.b+u*n.d+n.ty}return r}update(t){const r=this._texture;if(!r||!r.valid||!t&&this._textureID===r._updateID)return!1;this._textureID=r._updateID,this._updateID++;const n=r._uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);const s=r.orig,a=r.trim;a&&(bd.set(s.width/a.width,0,0,s.height/a.height,-a.x/a.width,-a.y/a.height),this.mapCoord.append(bd));const u=r.baseTexture,l=this.uClampFrame,c=this.clampMargin/u.resolution,f=this.clampOffset;return l[0]=(r._frame.x+c+f)/u.width,l[1]=(r._frame.y+c+f)/u.height,l[2]=(r._frame.x+r._frame.width-c+f)/u.width,l[3]=(r._frame.y+r._frame.height-c+f)/u.height,this.uClampOffset[0]=f/u.realWidth,this.uClampOffset[1]=f/u.realHeight,this.isSimple=r._frame.width===u.width&&r._frame.height===u.height&&r.rotate===0,!0}}var UT=`varying vec2 vMaskCoord;
387
387
  varying vec2 vTextureCoord;
388
388
 
389
389
  uniform sampler2D uSampler;
@@ -424,7 +424,7 @@ void main(void)
424
424
  vTextureCoord = aTextureCoord;
425
425
  vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
426
426
  }
427
- `;class GT extends Dt{constructor(t,r,n){let s=null;typeof t!="string"&&r===void 0&&n===void 0&&(s=t,t=void 0,r=void 0,n=void 0),super(t||$T,r||UT,n),this.maskSprite=s,this.maskMatrix=new Pe}get maskSprite(){return this._maskSprite}set maskSprite(t){this._maskSprite=t,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(t,r,n,s){const a=this._maskSprite,u=a._texture;u.valid&&(u.uvMatrix||(u.uvMatrix=new DT(u,0)),u.uvMatrix.update(),this.uniforms.npmAlpha=u.baseTexture.alphaMode?0:1,this.uniforms.mask=u,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,a).prepend(u.uvMatrix.mapCoord),this.uniforms.alpha=a.worldAlpha,this.uniforms.maskClamp=u.uvMatrix.uClampFrame,t.applyFilter(this,r,n,s))}}class zT{constructor(t=null){this.type=de.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Dt.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(t){t?this._filters?this._filters[0]=t:this._filters=[t]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=de.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class Td{constructor(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)}push(t,r){let n=r;if(!n.isMaskData){const a=this.maskDataPool.pop()||new zT;a.pooled=!0,a.maskObject=r,n=a}const s=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(n.copyCountersOrReset(s),n._colorMask=s?s._colorMask:15,n.autoDetect&&this.detect(n),n._target=t,n.type!==de.SPRITE&&this.maskStack.push(n),n.enabled)switch(n.type){case de.SCISSOR:this.renderer.scissor.push(n);break;case de.STENCIL:this.renderer.stencil.push(n);break;case de.SPRITE:n.copyCountersOrReset(null),this.pushSpriteMask(n);break;case de.COLOR:this.pushColorMask(n);break}n.type===de.SPRITE&&this.maskStack.push(n)}pop(t){const r=this.maskStack.pop();if(!(!r||r._target!==t)){if(r.enabled)switch(r.type){case de.SCISSOR:this.renderer.scissor.pop(r);break;case de.STENCIL:this.renderer.stencil.pop(r.maskObject);break;case de.SPRITE:this.popSpriteMask(r);break;case de.COLOR:this.popColorMask(r);break}if(r.reset(),r.pooled&&this.maskDataPool.push(r),this.maskStack.length!==0){const n=this.maskStack[this.maskStack.length-1];n.type===de.SPRITE&&n._filters&&(n._filters[0].maskSprite=n.maskObject)}}}detect(t){const r=t.maskObject;r?r.isSprite?t.type=de.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(t)?t.type=de.SCISSOR:t.type=de.STENCIL:t.type=de.COLOR}pushSpriteMask(t){const{maskObject:r}=t,n=t._target;let s=t._filters;s||(s=this.alphaMaskPool[this.alphaMaskIndex],s||(s=this.alphaMaskPool[this.alphaMaskIndex]=[new GT]));const a=this.renderer,u=a.renderTexture;let l,c;if(u.current){const p=u.current;l=t.resolution||p.resolution,c=t.multisample??p.multisample}else l=t.resolution||a.resolution,c=t.multisample??a.multisample;s[0].resolution=l,s[0].multisample=c,s[0].maskSprite=r;const f=n.filterArea;n.filterArea=r.getBounds(!0),a.filter.push(n,s),n.filterArea=f,t._filters||this.alphaMaskIndex++}popSpriteMask(t){this.renderer.filter.pop(),t._filters?t._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(t){const r=t._colorMask,n=t._colorMask=r&t.colorMask;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}popColorMask(t){const r=t._colorMask,n=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}destroy(){this.renderer=null}}Td.extension={type:Ct.RendererSystem,name:"mask"},Gt.add(Td);class wd{constructor(t){this.renderer=t,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(t){const{gl:r}=this.renderer,n=this.getStackLength();this.maskStack=t;const s=this.getStackLength();s!==n&&(s===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Sd=new Pe,Ad=[],xa=class extends wd{constructor(e){super(e),this.glConst=_t.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:r}=e,{renderer:n}=this,s=n.renderTexture,a=r.getBounds(!0,Ad.pop()??new jt);this.roundFrameToPixels(a,s.current?s.current.resolution:n.resolution,s.sourceFrame,s.destinationFrame,n.projection.transform),t&&a.fit(t),e._scissorRectLocal=a}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:r,c:n,d:s}=e;return(Math.abs(r)>1e-4||Math.abs(n)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(s)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||xa.isMatrixRotated(t.worldTransform)||xa.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const r=e._scissorRectLocal;return r.width>0&&r.height>0}roundFrameToPixels(e,t,r,n,s){xa.isMatrixRotated(s)||(s=s?Sd.copyFrom(s):Sd.identity(),s.translate(-r.x,-r.y).scale(n.width/r.width,n.height/r.height).translate(n.x,n.y),this.renderer.filter.transformAABB(s,e),e.fit(n),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&Ad.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};let Cd=xa;Cd.extension={type:Ct.RendererSystem,name:"scissor"},Gt.add(Cd);class Ed extends wd{constructor(t){super(t),this.glConst=_t.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0}push(t){const r=t.maskObject,{gl:n}=this.renderer,s=t._stencilCounter;s===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),t._stencilCounter++;const a=t._colorMask;a!==0&&(t._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,s,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,a!==0&&(t._colorMask=a,n.colorMask((a&1)!==0,(a&2)!==0,(a&4)!==0,(a&8)!==0)),this._useCurrent()}pop(t){const r=this.renderer.gl;if(this.getStackLength()===0)r.disable(r.STENCIL_TEST);else{const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,s=n?n._colorMask:15;s!==0&&(n._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilOp(r.KEEP,r.KEEP,r.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,s!==0&&(n._colorMask=s,r.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)),this._useCurrent()}}_useCurrent(){const t=this.renderer.gl;t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)}}Ed.extension={type:Ct.RendererSystem,name:"stencil"},Gt.add(Ed);class Id{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return Rt("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return Rt("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return Rt("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),t.events}}})}init(){const t=this.rendererPlugins;for(const r in t)this.plugins[r]=new t[r](this.renderer)}destroy(){for(const t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null}}Id.extension={type:[Ct.RendererSystem,Ct.CanvasRendererSystem],name:"_plugin"},Gt.add(Id);class Rd{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Pe,this.transform=null}update(t,r,n,s){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,s),this.transform&&this.projectionMatrix.append(this.transform);const a=this.renderer;a.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,a.globalUniforms.update(),a.shader.shader&&a.shader.syncUniformGroup(a.shader.shader.uniforms.globals)}calculateProjection(t,r,n,s){const a=this.projectionMatrix,u=s?-1:1;a.identity(),a.a=1/r.width*2,a.d=u*(1/r.height*2),a.tx=-1-r.x*a.a,a.ty=-u-r.y*a.d}setTransform(t){}destroy(){this.renderer=null}}Rd.extension={type:Ct.RendererSystem,name:"projection"},Gt.add(Rd);const HT=new el;class Pd{constructor(t){this.renderer=t,this._tempMatrix=new Pe}generateTexture(t,r){const{region:n,...s}=r||{},a=n||t.getLocalBounds(null,!0);a.width===0&&(a.width=1),a.height===0&&(a.height=1);const u=ya.create({width:a.width,height:a.height,...s});this._tempMatrix.tx=-a.x,this._tempMatrix.ty=-a.y;const l=t.transform;return t.transform=HT,this.renderer.render(t,{renderTexture:u,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=l,u}destroy(){}}Pd.extension={type:[Ct.RendererSystem,Ct.CanvasRendererSystem],name:"textureGenerator"},Gt.add(Pd);const Rn=new jt,us=new jt;class Md{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new jt,this.destinationFrame=new jt,this.viewportFrame=new jt}bind(t=null,r,n){const s=this.renderer;this.current=t;let a,u,l;t?(a=t.baseTexture,l=a.resolution,r||(Rn.width=t.frame.width,Rn.height=t.frame.height,r=Rn),n||(us.x=t.frame.x,us.y=t.frame.y,us.width=r.width,us.height=r.height,n=us),u=a.framebuffer):(l=s.resolution,r||(Rn.width=s._view.screen.width,Rn.height=s._view.screen.height,r=Rn),n||(n=Rn,n.width=r.width,n.height=r.height));const c=this.viewportFrame;c.x=n.x*l,c.y=n.y*l,c.width=n.width*l,c.height=n.height*l,t||(c.y=s.view.height-(c.y+c.height)),c.ceil(),this.renderer.framebuffer.bind(u,c),this.renderer.projection.update(n,r,l,!u),t?this.renderer.mask.setMaskStack(a.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)}clear(t,r){const n=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,s=t?Ce.shared.setValue(t):n,a=this.destinationFrame,u=this.current?this.current.baseTexture:this.renderer._view.screen,l=a.width!==u.width||a.height!==u.height;if(l){let{x:c,y:f,width:p,height:m}=this.viewportFrame;c=Math.round(c),f=Math.round(f),p=Math.round(p),m=Math.round(m),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(c,f,p,m)}this.renderer.framebuffer.clear(s.red,s.green,s.blue,s.alpha,r),l&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Md.extension={type:Ct.RendererSystem,name:"renderTexture"},Gt.add(Md);class VT{constructor(t,r){this.program=t,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function jT(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let s=0;s<n;s++){const a=t.getActiveAttrib(e,s);if(a.name.startsWith("gl_"))continue;const u=ud(t,a.type),l={type:u,name:a.name,size:ad(u),location:t.getAttribLocation(e,a.name)};r[a.name]=l}return r}function XT(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let s=0;s<n;s++){const a=t.getActiveUniform(e,s),u=a.name.replace(/\[.*?\]$/,""),l=!!a.name.match(/\[.*?\]$/),c=ud(t,a.type);r[u]={name:u,index:s,type:c,size:a.size,isArray:l,value:nd(c,a.size)}}return r}function WT(e,t){var c;const r=rd(e,e.VERTEX_SHADER,t.vertexSrc),n=rd(e,e.FRAGMENT_SHADER,t.fragmentSrc),s=e.createProgram();e.attachShader(s,r),e.attachShader(s,n);const a=(c=t.extra)==null?void 0:c.transformFeedbackVaryings;if(a&&(typeof e.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):e.transformFeedbackVaryings(s,a.names,a.bufferMode==="separate"?e.SEPARATE_ATTRIBS:e.INTERLEAVED_ATTRIBS)),e.linkProgram(s),e.getProgramParameter(s,e.LINK_STATUS)||xT(e,s,r,n),t.attributeData=jT(s,e),t.uniformData=XT(s,e),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(t.vertexSrc)){const f=Object.keys(t.attributeData);f.sort((p,m)=>p>m?1:-1);for(let p=0;p<f.length;p++)t.attributeData[f[p]].location=p,e.bindAttribLocation(s,p,f[p]);e.linkProgram(s)}e.deleteShader(r),e.deleteShader(n);const u={};for(const f in t.uniformData){const p=t.uniformData[f];u[f]={location:e.getUniformLocation(s,f),value:nd(p.type,p.size)}}return new VT(s,u)}function qT(e,t,r,n,s){r.buffer.update(s)}const YT={float:`
427
+ `;class GT extends Dt{constructor(t,r,n){let s=null;typeof t!="string"&&r===void 0&&n===void 0&&(s=t,t=void 0,r=void 0,n=void 0),super(t||$T,r||UT,n),this.maskSprite=s,this.maskMatrix=new Pe}get maskSprite(){return this._maskSprite}set maskSprite(t){this._maskSprite=t,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(t,r,n,s){const a=this._maskSprite,u=a._texture;u.valid&&(u.uvMatrix||(u.uvMatrix=new DT(u,0)),u.uvMatrix.update(),this.uniforms.npmAlpha=u.baseTexture.alphaMode?0:1,this.uniforms.mask=u,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,a).prepend(u.uvMatrix.mapCoord),this.uniforms.alpha=a.worldAlpha,this.uniforms.maskClamp=u.uvMatrix.uClampFrame,t.applyFilter(this,r,n,s))}}class zT{constructor(t=null){this.type=de.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=Dt.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(t){t?this._filters?this._filters[0]=t:this._filters=[t]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=de.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}}class Td{constructor(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)}push(t,r){let n=r;if(!n.isMaskData){const a=this.maskDataPool.pop()||new zT;a.pooled=!0,a.maskObject=r,n=a}const s=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(n.copyCountersOrReset(s),n._colorMask=s?s._colorMask:15,n.autoDetect&&this.detect(n),n._target=t,n.type!==de.SPRITE&&this.maskStack.push(n),n.enabled)switch(n.type){case de.SCISSOR:this.renderer.scissor.push(n);break;case de.STENCIL:this.renderer.stencil.push(n);break;case de.SPRITE:n.copyCountersOrReset(null),this.pushSpriteMask(n);break;case de.COLOR:this.pushColorMask(n);break}n.type===de.SPRITE&&this.maskStack.push(n)}pop(t){const r=this.maskStack.pop();if(!(!r||r._target!==t)){if(r.enabled)switch(r.type){case de.SCISSOR:this.renderer.scissor.pop(r);break;case de.STENCIL:this.renderer.stencil.pop(r.maskObject);break;case de.SPRITE:this.popSpriteMask(r);break;case de.COLOR:this.popColorMask(r);break}if(r.reset(),r.pooled&&this.maskDataPool.push(r),this.maskStack.length!==0){const n=this.maskStack[this.maskStack.length-1];n.type===de.SPRITE&&n._filters&&(n._filters[0].maskSprite=n.maskObject)}}}detect(t){const r=t.maskObject;r?r.isSprite?t.type=de.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(t)?t.type=de.SCISSOR:t.type=de.STENCIL:t.type=de.COLOR}pushSpriteMask(t){const{maskObject:r}=t,n=t._target;let s=t._filters;s||(s=this.alphaMaskPool[this.alphaMaskIndex],s||(s=this.alphaMaskPool[this.alphaMaskIndex]=[new GT]));const a=this.renderer,u=a.renderTexture;let l,c;if(u.current){const p=u.current;l=t.resolution||p.resolution,c=t.multisample??p.multisample}else l=t.resolution||a.resolution,c=t.multisample??a.multisample;s[0].resolution=l,s[0].multisample=c,s[0].maskSprite=r;const f=n.filterArea;n.filterArea=r.getBounds(!0),a.filter.push(n,s),n.filterArea=f,t._filters||this.alphaMaskIndex++}popSpriteMask(t){this.renderer.filter.pop(),t._filters?t._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(t){const r=t._colorMask,n=t._colorMask=r&t.colorMask;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}popColorMask(t){const r=t._colorMask,n=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;n!==r&&this.renderer.gl.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)}destroy(){this.renderer=null}}Td.extension={type:At.RendererSystem,name:"mask"},$t.add(Td);class wd{constructor(t){this.renderer=t,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(t){const{gl:r}=this.renderer,n=this.getStackLength();this.maskStack=t;const s=this.getStackLength();s!==n&&(s===0?r.disable(this.glConst):(r.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}}const Sd=new Pe,Ad=[],xa=class extends wd{constructor(e){super(e),this.glConst=xt.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){const e=this.maskStack[this.maskStack.length-1];return e?e._scissorCounter:0}calcScissorRect(e){if(e._scissorRectLocal)return;const t=e._scissorRect,{maskObject:r}=e,{renderer:n}=this,s=n.renderTexture,a=r.getBounds(!0,Ad.pop()??new jt);this.roundFrameToPixels(a,s.current?s.current.resolution:n.resolution,s.sourceFrame,s.destinationFrame,n.projection.transform),t&&a.fit(t),e._scissorRectLocal=a}static isMatrixRotated(e){if(!e)return!1;const{a:t,b:r,c:n,d:s}=e;return(Math.abs(r)>1e-4||Math.abs(n)>1e-4)&&(Math.abs(t)>1e-4||Math.abs(s)>1e-4)}testScissor(e){const{maskObject:t}=e;if(!t.isFastRect||!t.isFastRect()||xa.isMatrixRotated(t.worldTransform)||xa.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(e);const r=e._scissorRectLocal;return r.width>0&&r.height>0}roundFrameToPixels(e,t,r,n,s){xa.isMatrixRotated(s)||(s=s?Sd.copyFrom(s):Sd.identity(),s.translate(-r.x,-r.y).scale(n.width/r.width,n.height/r.height).translate(n.x,n.y),this.renderer.filter.transformAABB(s,e),e.fit(n),e.x=Math.round(e.x*t),e.y=Math.round(e.y*t),e.width=Math.round(e.width*t),e.height=Math.round(e.height*t))}push(e){e._scissorRectLocal||this.calcScissorRect(e);const{gl:t}=this.renderer;e._scissorRect||t.enable(t.SCISSOR_TEST),e._scissorCounter++,e._scissorRect=e._scissorRectLocal,this._useCurrent()}pop(e){const{gl:t}=this.renderer;e&&Ad.push(e._scissorRectLocal),this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)}_useCurrent(){const e=this.maskStack[this.maskStack.length-1]._scissorRect;let t;this.renderer.renderTexture.current?t=e.y:t=this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)}};let Cd=xa;Cd.extension={type:At.RendererSystem,name:"scissor"},$t.add(Cd);class Ed extends wd{constructor(t){super(t),this.glConst=xt.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){const t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0}push(t){const r=t.maskObject,{gl:n}=this.renderer,s=t._stencilCounter;s===0&&(this.renderer.framebuffer.forceStencil(),n.clearStencil(0),n.clear(n.STENCIL_BUFFER_BIT),n.enable(n.STENCIL_TEST)),t._stencilCounter++;const a=t._colorMask;a!==0&&(t._colorMask=0,n.colorMask(!1,!1,!1,!1)),n.stencilFunc(n.EQUAL,s,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),r.renderable=!0,r.render(this.renderer),this.renderer.batch.flush(),r.renderable=!1,a!==0&&(t._colorMask=a,n.colorMask((a&1)!==0,(a&2)!==0,(a&4)!==0,(a&8)!==0)),this._useCurrent()}pop(t){const r=this.renderer.gl;if(this.getStackLength()===0)r.disable(r.STENCIL_TEST);else{const n=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,s=n?n._colorMask:15;s!==0&&(n._colorMask=0,r.colorMask(!1,!1,!1,!1)),r.stencilOp(r.KEEP,r.KEEP,r.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,s!==0&&(n._colorMask=s,r.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)),this._useCurrent()}}_useCurrent(){const t=this.renderer.gl;t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)}}Ed.extension={type:At.RendererSystem,name:"stencil"},$t.add(Ed);class Id{constructor(t){this.renderer=t,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return Rt("7.0.0","renderer.plugins.extract has moved to renderer.extract"),t.extract}},prepare:{enumerable:!1,get(){return Rt("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),t.prepare}},interaction:{enumerable:!1,get(){return Rt("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),t.events}}})}init(){const t=this.rendererPlugins;for(const r in t)this.plugins[r]=new t[r](this.renderer)}destroy(){for(const t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null}}Id.extension={type:[At.RendererSystem,At.CanvasRendererSystem],name:"_plugin"},$t.add(Id);class Rd{constructor(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new Pe,this.transform=null}update(t,r,n,s){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=r||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,s),this.transform&&this.projectionMatrix.append(this.transform);const a=this.renderer;a.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,a.globalUniforms.update(),a.shader.shader&&a.shader.syncUniformGroup(a.shader.shader.uniforms.globals)}calculateProjection(t,r,n,s){const a=this.projectionMatrix,u=s?-1:1;a.identity(),a.a=1/r.width*2,a.d=u*(1/r.height*2),a.tx=-1-r.x*a.a,a.ty=-u-r.y*a.d}setTransform(t){}destroy(){this.renderer=null}}Rd.extension={type:At.RendererSystem,name:"projection"},$t.add(Rd);const HT=new el;class Pd{constructor(t){this.renderer=t,this._tempMatrix=new Pe}generateTexture(t,r){const{region:n,...s}=r||{},a=n||t.getLocalBounds(null,!0);a.width===0&&(a.width=1),a.height===0&&(a.height=1);const u=ya.create({width:a.width,height:a.height,...s});this._tempMatrix.tx=-a.x,this._tempMatrix.ty=-a.y;const l=t.transform;return t.transform=HT,this.renderer.render(t,{renderTexture:u,transform:this._tempMatrix,skipUpdateTransform:!!t.parent,blit:!0}),t.transform=l,u}destroy(){}}Pd.extension={type:[At.RendererSystem,At.CanvasRendererSystem],name:"textureGenerator"},$t.add(Pd);const Rn=new jt,us=new jt;class Md{constructor(t){this.renderer=t,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new jt,this.destinationFrame=new jt,this.viewportFrame=new jt}bind(t=null,r,n){const s=this.renderer;this.current=t;let a,u,l;t?(a=t.baseTexture,l=a.resolution,r||(Rn.width=t.frame.width,Rn.height=t.frame.height,r=Rn),n||(us.x=t.frame.x,us.y=t.frame.y,us.width=r.width,us.height=r.height,n=us),u=a.framebuffer):(l=s.resolution,r||(Rn.width=s._view.screen.width,Rn.height=s._view.screen.height,r=Rn),n||(n=Rn,n.width=r.width,n.height=r.height));const c=this.viewportFrame;c.x=n.x*l,c.y=n.y*l,c.width=n.width*l,c.height=n.height*l,t||(c.y=s.view.height-(c.y+c.height)),c.ceil(),this.renderer.framebuffer.bind(u,c),this.renderer.projection.update(n,r,l,!u),t?this.renderer.mask.setMaskStack(a.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(r),this.destinationFrame.copyFrom(n)}clear(t,r){const n=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,s=t?Ce.shared.setValue(t):n,a=this.destinationFrame,u=this.current?this.current.baseTexture:this.renderer._view.screen,l=a.width!==u.width||a.height!==u.height;if(l){let{x:c,y:f,width:p,height:m}=this.viewportFrame;c=Math.round(c),f=Math.round(f),p=Math.round(p),m=Math.round(m),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(c,f,p,m)}this.renderer.framebuffer.clear(s.red,s.green,s.blue,s.alpha,r),l&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}}Md.extension={type:At.RendererSystem,name:"renderTexture"},$t.add(Md);class VT{constructor(t,r){this.program=t,this.uniformData=r,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}}function jT(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let s=0;s<n;s++){const a=t.getActiveAttrib(e,s);if(a.name.startsWith("gl_"))continue;const u=ud(t,a.type),l={type:u,name:a.name,size:ad(u),location:t.getAttribLocation(e,a.name)};r[a.name]=l}return r}function XT(e,t){const r={},n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let s=0;s<n;s++){const a=t.getActiveUniform(e,s),u=a.name.replace(/\[.*?\]$/,""),l=!!a.name.match(/\[.*?\]$/),c=ud(t,a.type);r[u]={name:u,index:s,type:c,size:a.size,isArray:l,value:nd(c,a.size)}}return r}function WT(e,t){var c;const r=rd(e,e.VERTEX_SHADER,t.vertexSrc),n=rd(e,e.FRAGMENT_SHADER,t.fragmentSrc),s=e.createProgram();e.attachShader(s,r),e.attachShader(s,n);const a=(c=t.extra)==null?void 0:c.transformFeedbackVaryings;if(a&&(typeof e.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):e.transformFeedbackVaryings(s,a.names,a.bufferMode==="separate"?e.SEPARATE_ATTRIBS:e.INTERLEAVED_ATTRIBS)),e.linkProgram(s),e.getProgramParameter(s,e.LINK_STATUS)||xT(e,s,r,n),t.attributeData=jT(s,e),t.uniformData=XT(s,e),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(t.vertexSrc)){const f=Object.keys(t.attributeData);f.sort((p,m)=>p>m?1:-1);for(let p=0;p<f.length;p++)t.attributeData[f[p]].location=p,e.bindAttribLocation(s,p,f[p]);e.linkProgram(s)}e.deleteShader(r),e.deleteShader(n);const u={};for(const f in t.uniformData){const p=t.uniformData[f];u[f]={location:e.getUniformLocation(s,f),value:nd(p.type,p.size)}}return new VT(s,u)}function qT(e,t,r,n,s){r.buffer.update(s)}const YT={float:`
428
428
  data[offset] = v;
429
429
  `,vec2:`
430
430
  data[offset] = v[0];
@@ -494,7 +494,7 @@ void main(void)
494
494
  `)}}return a.push(`
495
495
  renderer.buffer.update(buffer);
496
496
  `),{size:s,syncFunc:new Function("ud","uv","renderer","syncData","buffer",a.join(`
497
- `))}}let QT=0;const ba={textureCount:0,uboCount:0};class Fd{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=QT++}systemCheck(){if(!TT())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,r){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const n=t.program,s=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==n&&(this.program=n,this.gl.useProgram(s.program)),r||(ba.textureCount=0,ba.uboCount=0,this.syncUniformGroup(t.uniformGroup,ba)),s}setUniforms(t){const r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,t,this.renderer)}syncUniformGroup(t,r){const n=this.getGlProgram();(!t.static||t.dirtyId!==n.uniformDirtyGroups[t.id])&&(n.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,n,r))}syncUniforms(t,r,n){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(r.uniformData,t.uniforms,this.renderer,n)}createSyncGroups(t){const r=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=vT(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[r],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,r){const n=this.getGlProgram();if(!t.static||t.dirtyId!==0||!n.uniformGroups[t.id]){t.dirtyId=0;const s=n.uniformGroups[t.id]||this.createSyncBufferGroup(t,n,r);t.buffer.update(),s(n.uniformData,t.uniforms,this.renderer,ba,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,n.uniformBufferBindings[r])}createSyncBufferGroup(t,r,n){const{gl:s}=this.renderer;this.renderer.buffer.bind(t.buffer);const a=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,s.uniformBlockBinding(r.program,a,this.shader.uniformBindCount),this.shader.uniformBindCount++;const u=this.getSignature(t,this.shader.program.uniformData,"ubo");let l=this._uboCache[u];if(l||(l=this._uboCache[u]=JT(t,this.shader.program.uniformData)),t.autoManage){const c=new Float32Array(l.size/4);t.buffer.update(c)}return r.uniformGroups[t.id]=l.syncFunc,r.uniformGroups[t.id]}getSignature(t,r,n){const s=t.uniforms,a=[`${n}-`];for(const u in s)a.push(u),r[u]&&a.push(r[u].type);return a.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const r=this.gl,n=t.program,s=WT(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=s,s}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Fd.extension={type:Ct.RendererSystem,name:"shader"},Gt.add(Fd);class Ta{constructor(t){this.renderer=t}run(t){const{renderer:r}=this;r.runners.init.emit(r.options),t.hello&&console.log(`PixiJS 7.2.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}Ta.defaultOptions={hello:!1},Ta.extension={type:[Ct.RendererSystem,Ct.CanvasRendererSystem],name:"startup"},Gt.add(Ta);function tw(e,t=[]){return t[ht.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.ADD]=[e.ONE,e.ONE],t[ht.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.NONE]=[0,0],t[ht.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[ht.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[ht.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[ht.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[ht.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[ht.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[ht.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[ht.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[ht.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[ht.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const ew=0,rw=1,nw=2,iw=3,sw=4,aw=5,ol=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=ht.NONE,this._blendEq=!1,this.map=[],this.map[ew]=this.setBlend,this.map[rw]=this.setOffset,this.map[nw]=this.setCullFace,this.map[iw]=this.setDepthTest,this.map[sw]=this.setFrontFace,this.map[aw]=this.setDepthMask,this.checks=[],this.defaultState=new oa,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=tw(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,r=0;for(;t;)t&1&&this.map[r].call(this,!!(e.data&1<<r)),t=t>>1,r++;this.stateId=e.data}for(let t=0;t<this.checks.length;t++)this.checks[t](this,e)}forceState(e){e=e||this.defaultState;for(let t=0;t<this.map.length;t++)this.map[t].call(this,!!(e.data&1<<t));for(let t=0;t<this.checks.length;t++)this.checks[t](this,e);this.stateId=e.data}setBlend(e){this.updateCheck(ol.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this.updateCheck(ol.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(e===this.blendMode)return;this.blendMode=e;const t=this.blendModes[e],r=this.gl;t.length===2?r.blendFunc(t[0],t[1]):r.blendFuncSeparate(t[0],t[1],t[2],t[3]),t.length===6?(this._blendEq=!0,r.blendEquationSeparate(t[4],t[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}setPolygonOffset(e,t){this.gl.polygonOffset(e,t)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(e,t){const r=this.checks.indexOf(e);t&&r===-1?this.checks.push(e):!t&&r!==-1&&this.checks.splice(r,1)}static checkBlendMode(e,t){e.setBlendMode(t.blendMode)}static checkPolygonOffset(e,t){e.setPolygonOffset(1,t.polygonOffset)}destroy(){this.gl=null}};let Nd=ol;Nd.extension={type:Ct.RendererSystem,name:"state"},Gt.add(Nd);class ow extends Gs{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(t){this.addRunners(...t.runners);const r=(t.priority??[]).filter(s=>t.systems[s]),n=[...r,...Object.keys(t.systems).filter(s=>!r.includes(s))];for(const s of n)this.addSystem(t.systems[s],s)}addRunners(...t){t.forEach(r=>{this.runners[r]=new sr(r)})}addSystem(t,r){const n=new t(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=n,this._systemsHash[r]=n;for(const s in this.runners)this.runners[s].add(n);return this}emitWithCustomOptions(t,r){const n=Object.keys(this._systemsHash);t.items.forEach(s=>{const a=n.find(u=>this._systemsHash[u]===s);s[t.name](r[a])})}destroy(){Object.values(this.runners).forEach(t=>{t.destroy()}),this._systemsHash={}}}const wa=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=wa.defaultMaxIdle,this.checkCountMax=wa.defaultCheckCountMax,this.mode=wa.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==eu.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let r=!1;for(let n=0;n<t.length;n++){const s=t[n];!s.framebuffer&&this.count-s.touched>this.maxIdle&&(e.destroyTexture(s,!0),t[n]=null,r=!0)}if(r){let n=0;for(let s=0;s<t.length;s++)t[s]!==null&&(t[n++]=t[s]);t.length=n}}unload(e){const t=this.renderer.texture,r=e._texture;r&&!r.framebuffer&&t.destroyTexture(r);for(let n=e.children.length-1;n>=0;n--)this.unload(e.children[n])}destroy(){this.renderer=null}};let lr=wa;lr.defaultMode=eu.AUTO,lr.defaultMaxIdle=60*60,lr.defaultCheckCountMax=60*10,lr.extension={type:Ct.RendererSystem,name:"textureGC"},Gt.add(lr);class ul{constructor(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Nt.UNSIGNED_BYTE,this.internalFormat=Z.RGBA,this.samplerType=0}}function uw(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[Nt.UNSIGNED_BYTE]:{[Z.RGBA]:e.RGBA8,[Z.RGB]:e.RGB8,[Z.RG]:e.RG8,[Z.RED]:e.R8,[Z.RGBA_INTEGER]:e.RGBA8UI,[Z.RGB_INTEGER]:e.RGB8UI,[Z.RG_INTEGER]:e.RG8UI,[Z.RED_INTEGER]:e.R8UI,[Z.ALPHA]:e.ALPHA,[Z.LUMINANCE]:e.LUMINANCE,[Z.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Nt.BYTE]:{[Z.RGBA]:e.RGBA8_SNORM,[Z.RGB]:e.RGB8_SNORM,[Z.RG]:e.RG8_SNORM,[Z.RED]:e.R8_SNORM,[Z.RGBA_INTEGER]:e.RGBA8I,[Z.RGB_INTEGER]:e.RGB8I,[Z.RG_INTEGER]:e.RG8I,[Z.RED_INTEGER]:e.R8I},[Nt.UNSIGNED_SHORT]:{[Z.RGBA_INTEGER]:e.RGBA16UI,[Z.RGB_INTEGER]:e.RGB16UI,[Z.RG_INTEGER]:e.RG16UI,[Z.RED_INTEGER]:e.R16UI,[Z.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[Nt.SHORT]:{[Z.RGBA_INTEGER]:e.RGBA16I,[Z.RGB_INTEGER]:e.RGB16I,[Z.RG_INTEGER]:e.RG16I,[Z.RED_INTEGER]:e.R16I},[Nt.UNSIGNED_INT]:{[Z.RGBA_INTEGER]:e.RGBA32UI,[Z.RGB_INTEGER]:e.RGB32UI,[Z.RG_INTEGER]:e.RG32UI,[Z.RED_INTEGER]:e.R32UI,[Z.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[Nt.INT]:{[Z.RGBA_INTEGER]:e.RGBA32I,[Z.RGB_INTEGER]:e.RGB32I,[Z.RG_INTEGER]:e.RG32I,[Z.RED_INTEGER]:e.R32I},[Nt.FLOAT]:{[Z.RGBA]:e.RGBA32F,[Z.RGB]:e.RGB32F,[Z.RG]:e.RG32F,[Z.RED]:e.R32F,[Z.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[Nt.HALF_FLOAT]:{[Z.RGBA]:e.RGBA16F,[Z.RGB]:e.RGB16F,[Z.RG]:e.RG16F,[Z.RED]:e.R16F},[Nt.UNSIGNED_SHORT_5_6_5]:{[Z.RGB]:e.RGB565},[Nt.UNSIGNED_SHORT_4_4_4_4]:{[Z.RGBA]:e.RGBA4},[Nt.UNSIGNED_SHORT_5_5_5_1]:{[Z.RGBA]:e.RGB5_A1},[Nt.UNSIGNED_INT_2_10_10_10_REV]:{[Z.RGBA]:e.RGB10_A2,[Z.RGBA_INTEGER]:e.RGB10_A2UI},[Nt.UNSIGNED_INT_10F_11F_11F_REV]:{[Z.RGB]:e.R11F_G11F_B10F},[Nt.UNSIGNED_INT_5_9_9_9_REV]:{[Z.RGB]:e.RGB9_E5},[Nt.UNSIGNED_INT_24_8]:{[Z.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[Nt.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Z.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[Nt.UNSIGNED_BYTE]:{[Z.RGBA]:e.RGBA,[Z.RGB]:e.RGB,[Z.ALPHA]:e.ALPHA,[Z.LUMINANCE]:e.LUMINANCE,[Z.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Nt.UNSIGNED_SHORT_5_6_5]:{[Z.RGB]:e.RGB},[Nt.UNSIGNED_SHORT_4_4_4_4]:{[Z.RGBA]:e.RGBA},[Nt.UNSIGNED_SHORT_5_5_5_1]:{[Z.RGBA]:e.RGBA}},t}class Ld{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Lt,this.hasIntegerTextures=!1}contextChange(){const t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=uw(t);const r=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let s=0;s<r;s++)this.boundTextures[s]=null;this.emptyTextures={};const n=new ul(t.createTexture());t.bindTexture(t.TEXTURE_2D,n.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=n,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new ul(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(let s=0;s<6;s++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(let s=0;s<this.boundTextures.length;s++)this.bind(null,s)}bind(t,r=0){const{gl:n}=this;if(t=t==null?void 0:t.castToBaseTexture(),t!=null&&t.valid&&!t.parentTextureArray){t.touched=this.renderer.textureGC.count;const s=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[r]!==t&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(t.target,s.texture)),s.dirtyId!==t.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(t)):s.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(t),this.boundTextures[r]=t}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture}unbind(t){const{gl:r,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let s=0;s<n.length;s++)n[s]===this.unknownTexture&&this.bind(null,s)}for(let s=0;s<n.length;s++)n[s]===t&&(this.currentLocation!==s&&(r.activeTexture(r.TEXTURE0+s),this.currentLocation=s),r.bindTexture(t.target,this.emptyTextures[t.target].texture),n[s]=null)}ensureSamplerType(t){const{boundTextures:r,hasIntegerTextures:n,CONTEXT_UID:s}=this;if(n)for(let a=t-1;a>=0;--a){const u=r[a];u&&u._glTextures[s].samplerType!==tu.FLOAT&&this.renderer.texture.unbind(u)}}initTexture(t){const r=new ul(this.gl.createTexture());return r.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),r}initTextureType(t,r){var n;r.internalFormat=((n=this.internalFormats[t.type])==null?void 0:n[t.format])??t.format,this.webGLVersion===2&&t.type===Nt.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=t.type}updateTexture(t){var s;const r=t._glTextures[this.CONTEXT_UID];if(!r)return;const n=this.renderer;if(this.initTextureType(t,r),(s=t.resource)!=null&&s.upload(n,t,r))r.samplerType!==tu.FLOAT&&(this.hasIntegerTextures=!0);else{const a=t.realWidth,u=t.realHeight,l=n.gl;(r.width!==a||r.height!==u||r.dirtyId<0)&&(r.width=a,r.height=u,l.texImage2D(t.target,0,r.internalFormat,a,u,0,t.format,r.type,null))}t.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(t),r.dirtyId=t.dirtyId}destroyTexture(t,r){const{gl:n}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),n.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!r)){const s=this.managedTextures.indexOf(t);s!==-1&&sa(this.managedTextures,s,1)}}updateTextureStyle(t){var n;const r=t._glTextures[this.CONTEXT_UID];r&&((t.mipmap===yn.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?r.mipmap=!1:r.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?r.wrapMode=ji.CLAMP:r.wrapMode=t.wrapMode,(n=t.resource)!=null&&n.style(this.renderer,t,r)||this.setStyle(t,r),r.dirtyStyleId=t.dirtyStyleId)}setStyle(t,r){const n=this.gl;if(r.mipmap&&t.mipmap!==yn.ON_MANUAL&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Sr.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const s=this.renderer.context.extensions.anisotropicFiltering;if(s&&t.anisotropicLevel>0&&t.scaleMode===Sr.LINEAR){const a=Math.min(t.anisotropicLevel,n.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,s.TEXTURE_MAX_ANISOTROPY_EXT,a)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Sr.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===Sr.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}Ld.extension={type:Ct.RendererSystem,name:"texture"},Gt.add(Ld);class kd{constructor(t){this.renderer=t}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,s=t._glTransformFeedbacks[n]||this.createGLTransformFeedback(t);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,s)}unbind(){const{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(t,r){const{gl:n,renderer:s}=this;r&&s.shader.bind(r),n.beginTransformFeedback(t)}endTransformFeedback(){const{gl:t}=this;t.endTransformFeedback()}createGLTransformFeedback(t){const{gl:r,renderer:n,CONTEXT_UID:s}=this,a=r.createTransformFeedback();t._glTransformFeedbacks[s]=a,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,a);for(let u=0;u<t.buffers.length;u++){const l=t.buffers[u];l&&(n.buffer.update(l),l._glBuffers[s].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,u,l._glBuffers[s].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),t.disposeRunner.add(this),a}disposeTransformFeedback(t,r){const n=t._glTransformFeedbacks[this.CONTEXT_UID],s=this.gl;t.disposeRunner.remove(this);const a=this.renderer.buffer;if(a)for(let u=0;u<t.buffers.length;u++){const l=t.buffers[u];if(!l)continue;const c=l._glBuffers[this.CONTEXT_UID];c&&(c.refCount--,c.refCount===0&&!r&&a.dispose(l,r))}n&&(r||s.deleteTransformFeedback(n),delete t._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}kd.extension={type:Ct.RendererSystem,name:"transformFeedback"},Gt.add(kd);class Sa{constructor(t){this.renderer=t}init(t){this.screen=new jt(0,0,t.width,t.height),this.element=t.view||_t.ADAPTER.createCanvas(),this.resolution=t.resolution||_t.RESOLUTION,this.autoDensity=!!t.autoDensity}resizeView(t,r){this.element.width=Math.round(t*this.resolution),this.element.height=Math.round(r*this.resolution);const n=this.element.width/this.resolution,s=this.element.height/this.resolution;this.screen.width=n,this.screen.height=s,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${s}px`),this.renderer.emit("resize",n,s),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(t){var r;t&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}Sa.defaultOptions={width:800,height:600,resolution:_t.RESOLUTION,autoDensity:!1},Sa.extension={type:[Ct.RendererSystem,Ct.CanvasRendererSystem],name:"_view"},Gt.add(Sa),_t.PREFER_ENV=vn.WEBGL2,_t.STRICT_TEXTURE_CACHE=!1,_t.RENDER_OPTIONS={...ma.defaultOptions,...ga.defaultOptions,...Sa.defaultOptions,...Ta.defaultOptions},Object.defineProperties(_t,{WRAP_MODE:{get(){return Lt.defaultOptions.wrapMode},set(e){Rt("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),Lt.defaultOptions.wrapMode=e}},SCALE_MODE:{get(){return Lt.defaultOptions.scaleMode},set(e){Rt("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),Lt.defaultOptions.scaleMode=e}},MIPMAP_TEXTURES:{get(){return Lt.defaultOptions.mipmap},set(e){Rt("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),Lt.defaultOptions.mipmap=e}},ANISOTROPIC_LEVEL:{get(){return Lt.defaultOptions.anisotropicLevel},set(e){Rt("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),Lt.defaultOptions.anisotropicLevel=e}},FILTER_RESOLUTION:{get(){return Rt("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Dt.defaultResolution},set(e){Dt.defaultResolution=e}},FILTER_MULTISAMPLE:{get(){return Rt("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Dt.defaultMultisample},set(e){Dt.defaultMultisample=e}},SPRITE_MAX_TEXTURES:{get(){return ur.defaultMaxTextures},set(e){Rt("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),ur.defaultMaxTextures=e}},SPRITE_BATCH_SIZE:{get(){return ur.defaultBatchSize},set(e){Rt("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),ur.defaultBatchSize=e}},CAN_UPLOAD_SAME_BUFFER:{get(){return ur.canUploadSameBuffer},set(e){Rt("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),ur.canUploadSameBuffer=e}},GC_MODE:{get(){return lr.defaultMode},set(e){Rt("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),lr.defaultMode=e}},GC_MAX_IDLE:{get(){return lr.defaultMaxIdle},set(e){Rt("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),lr.defaultMaxIdle=e}},GC_MAX_CHECK_COUNT:{get(){return lr.defaultCheckCountMax},set(e){Rt("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),lr.defaultCheckCountMax=e}},PRECISION_VERTEX:{get(){return Br.defaultVertexPrecision},set(e){Rt("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Br.defaultVertexPrecision=e}},PRECISION_FRAGMENT:{get(){return Br.defaultFragmentPrecision},set(e){Rt("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Br.defaultFragmentPrecision=e}}});var Aa=(e=>(e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY",e))(Aa||{});class ll{constructor(t,r=null,n=0,s=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=r,this.priority=n,this.once=s}match(t,r=null){return this.fn===t&&this.context===r}emit(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const r=this.next;return this.next=t?null:r,this.previous=null,r}}const Ue=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new ll(null,null,1/0),this.deltaMS=1/Ue.targetFPMS,this.elapsedMS=1/Ue.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,r=Aa.NORMAL){return this._addListener(new ll(e,t,r))}addOnce(e,t,r=Aa.NORMAL){return this._addListener(new ll(e,t,r,!0))}_addListener(e){let t=this._head.next,r=this._head;if(!t)e.connect(r);else{for(;t;){if(e.priority>t.priority){e.connect(r);break}r=t,t=t.next}e.previous||e.connect(r)}return this._startIfPossible(),this}remove(e,t){let r=this._head.next;for(;r;)r.match(e,t)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const s=e-this._lastFrame|0;if(s<this._minElapsedMS)return;this._lastFrame=e-s%this._minElapsedMS}this.deltaMS=t,this.deltaTime=this.deltaMS*Ue.targetFPMS;const r=this._head;let n=r.next;for(;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const t=Math.min(this.maxFPS,e),r=Math.min(Math.max(0,t)/1e3,Ue.targetFPMS);this._maxElapsedMS=1/r}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){if(e===0)this._minElapsedMS=0;else{const t=Math.max(this.minFPS,e);this._minElapsedMS=1/(t/1e3)}}static get shared(){if(!Ue._shared){const e=Ue._shared=new Ue;e.autoStart=!0,e._protected=!0}return Ue._shared}static get system(){if(!Ue._system){const e=Ue._system=new Ue;e.autoStart=!0,e._protected=!0}return Ue._system}};let hr=Ue;hr.targetFPMS=.06,Object.defineProperties(_t,{TARGET_FPMS:{get(){return hr.targetFPMS},set(e){Rt("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),hr.targetFPMS=e}}});class Bd{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,Aa.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?hr.shared:new hr,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}Bd.extension=Ct.Application,Gt.add(Bd);const lw=[];Gt.handleByList(Ct.Renderer,lw);class Dd{constructor(t){this.renderer=t}contextChange(t){let r;if(this.renderer.context.webGLVersion===1){const n=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,n)}else{const n=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,n)}r>=fe.HIGH?this.multisample=fe.HIGH:r>=fe.MEDIUM?this.multisample=fe.MEDIUM:r>=fe.LOW?this.multisample=fe.LOW:this.multisample=fe.NONE}destroy(){}}Dd.extension={type:Ct.RendererSystem,name:"_multisample"},Gt.add(Dd);class hw{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Ud{constructor(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,s=t._glBuffers[n]||this.createGLBuffer(t);r.bindBuffer(t.type,s.buffer)}unbind(t){const{gl:r}=this;r.bindBuffer(t,null)}bindBufferBase(t,r){const{gl:n,CONTEXT_UID:s}=this;if(this.boundBufferBases[r]!==t){const a=t._glBuffers[s]||this.createGLBuffer(t);this.boundBufferBases[r]=t,n.bindBufferBase(n.UNIFORM_BUFFER,r,a.buffer)}}bindBufferRange(t,r,n){const{gl:s,CONTEXT_UID:a}=this;n=n||0;const u=t._glBuffers[a]||this.createGLBuffer(t);s.bindBufferRange(s.UNIFORM_BUFFER,r||0,u.buffer,n*256,256)}update(t){const{gl:r,CONTEXT_UID:n}=this,s=t._glBuffers[n]||this.createGLBuffer(t);if(t._updateID!==s.updateID)if(s.updateID=t._updateID,r.bindBuffer(t.type,s.buffer),s.byteLength>=t.data.byteLength)r.bufferSubData(t.type,0,t.data);else{const a=t.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;s.byteLength=t.data.byteLength,r.bufferData(t.type,t.data,a)}}dispose(t,r){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const n=t._glBuffers[this.CONTEXT_UID],s=this.gl;t.disposeRunner.remove(this),n&&(r||s.deleteBuffer(n.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const r=Object.keys(this.managedBuffers);for(let n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],t)}createGLBuffer(t){const{CONTEXT_UID:r,gl:n}=this;return t._glBuffers[r]=new hw(n.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[r]}}Ud.extension={type:Ct.RendererSystem,name:"buffer"},Gt.add(Ud);class $d{constructor(t){this.renderer=t}render(t,r){const n=this.renderer;let s,a,u,l;if(r&&(s=r.renderTexture,a=r.clear,u=r.transform,l=r.skipUpdateTransform),this.renderingToScreen=!s,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=u,!n.context.isLost){if(s||(this.lastObjectRendered=t),!l){const c=t.enableTempParent();t.updateTransform(),t.disableTempParent(c)}n.renderTexture.bind(s),n.batch.currentRenderer.start(),(a??n.background.clearBeforeRender)&&n.renderTexture.clear(),t.render(n),n.batch.currentRenderer.flush(),s&&(r.blit&&n.framebuffer.blit(),s.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}$d.extension={type:Ct.RendererSystem,name:"objectRenderer"},Gt.add($d);const hl=class extends ow{constructor(e){super(),this.type=Fc.WEBGL,e=Object.assign({},_t.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new ar({projectionMatrix:new Pe},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:hl.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(Rt("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=hl.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:$b()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return Rt("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return Rt("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return Rt("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return Rt("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(e){Rt("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=e}get backgroundAlpha(){return Rt("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(e){Rt("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=e}get powerPreference(){return Rt("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(e,t){return this.textureGenerator.generateTexture(e,t)}};let fi=hl;fi.extension={type:Ct.Renderer,priority:1},fi.__plugins={},fi.__systems={},Gt.handleByMap(Ct.RendererPlugin,fi.__plugins),Gt.handleByMap(Ct.RendererSystem,fi.__systems),Gt.add(fi);class Gd extends rs{constructor(t,r){const{width:n,height:s}=r||{};super(n,s),this.items=[],this.itemDirtyIds=[];for(let a=0;a<t;a++){const u=new Lt;this.items.push(u),this.itemDirtyIds.push(-2)}this.length=t,this._load=null,this.baseTexture=null}initFromArray(t,r){for(let n=0;n<this.length;n++)t[n]&&(t[n].castToBaseTexture?this.addBaseTextureAt(t[n].castToBaseTexture(),n):t[n]instanceof rs?this.addResourceAt(t[n],n):this.addResourceAt(Zf(t[n],r),n))}dispose(){for(let t=0,r=this.length;t<r;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(t,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[r].setResource(t),this}bind(t){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=t,this.items[r].on("update",t.update,t)}unbind(t){super.unbind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",t.update,t)}load(){if(this._load)return this._load;const r=this.items.map(n=>n.resource).filter(n=>n).map(n=>n.load());return this._load=Promise.all(r).then(()=>{const{realWidth:n,realHeight:s}=this.items[0];return this.resize(n,s),Promise.resolve(this)}),this._load}}class cw extends Gd{constructor(t,r){const{width:n,height:s}=r||{};let a,u;Array.isArray(t)?(a=t,u=t.length):u=t,super(u,{width:n,height:s}),a&&this.initFromArray(a,r)}addBaseTextureAt(t,r){if(t.resource)this.addResourceAt(t.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(t){super.bind(t),t.target=qn.TEXTURE_2D_ARRAY}upload(t,r,n){const{length:s,itemDirtyIds:a,items:u}=this,{gl:l}=t;n.dirtyId<0&&l.texImage3D(l.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,s,0,r.format,n.type,null);for(let c=0;c<s;c++){const f=u[c];a[c]<f.dirtyId&&(a[c]=f.dirtyId,f.valid&&l.texSubImage3D(l.TEXTURE_2D_ARRAY,0,0,0,c,f.resource.width,f.resource.height,1,r.format,n.type,f.resource.source))}return!0}}class fw extends rn{constructor(t){super(t)}static test(t){const{OffscreenCanvas:r}=globalThis;return r&&t instanceof r?!0:globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement}}const ls=class extends Gd{constructor(e,t){const{width:r,height:n,autoLoad:s,linkBaseTexture:a}=t||{};if(e&&e.length!==ls.SIDES)throw new Error(`Invalid length. Got ${e.length}, expected 6`);super(6,{width:r,height:n});for(let u=0;u<ls.SIDES;u++)this.items[u].target=qn.TEXTURE_CUBE_MAP_POSITIVE_X+u;this.linkBaseTexture=a!==!1,e&&this.initFromArray(e,t),s!==!1&&this.load()}bind(e){super.bind(e),e.target=qn.TEXTURE_CUBE_MAP}addBaseTextureAt(e,t,r){if(r===void 0&&(r=this.linkBaseTexture),!this.items[t])throw new Error(`Index ${t} is out of bounds`);if(!this.linkBaseTexture||e.parentTextureArray||Object.keys(e._glTextures).length>0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=qn.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,r){const n=this.itemDirtyIds;for(let s=0;s<ls.SIDES;s++){const a=this.items[s];(n[s]<a.dirtyId||r.dirtyId<t.dirtyId)&&(a.valid&&a.resource?(a.resource.upload(e,a,r),n[s]=a.dirtyId):n[s]<-1&&(e.gl.texImage2D(a.target,0,r.internalFormat,t.realWidth,t.realHeight,0,t.format,r.type,null),n[s]=-1))}return!0}static test(e){return Array.isArray(e)&&e.length===ls.SIDES}};let zd=ls;zd.SIDES=6;class di extends rn{constructor(t,r){r=r||{};let n,s;typeof t=="string"?(n=di.EMPTY,s=t):(n=t,s=null),super(n),this.url=s,this.crossOrigin=r.crossOrigin??!0,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(t,r)=>{if(this.url===null){t(this);return}try{const n=await _t.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const s=await n.blob();if(this.destroyed)return;const a=await createImageBitmap(s,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Zr.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=a,this.update(),t(this)}catch(n){if(this.destroyed)return;r(n),this.onError.emit(n)}}),this._load)}upload(t,r,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(t,r,n)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof t=="string"||t instanceof ImageBitmap)}static get EMPTY(){return di._EMPTY=di._EMPTY??_t.ADAPTER.createCanvas(0,0),di._EMPTY}}const Ca=class extends rn{constructor(e,t){t=t||{},super(_t.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),e(this)},Ca.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;rn.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,r=e.height;if(!t||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let n=t*this.scale,s=r*this.scale;(this._overrideWidth||this._overrideHeight)&&(n=this._overrideWidth||this._overrideHeight/r*t,s=this._overrideHeight||this._overrideWidth/t*r),n=Math.round(n),s=Math.round(s);const a=this.source;a.width=n,a.height=s,a._pixiId=`canvas_${es()}`,a.getContext("2d").drawImage(e,0,0,t,r,0,0,n,s),this._resolve(),this._resolve=null}}static getSize(e){const t=Ca.SVG_SIZE.exec(e),r={};return t&&(r[t[1]]=Math.round(parseFloat(t[3])),r[t[5]]=Math.round(parseFloat(t[7]))),r}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&Ca.SVG_XML.test(e)}};let cl=Ca;cl.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,cl.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const fl=class extends rn{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);const n=e[0].src||e[0];rn.crossOrigin(r,n,t.crossorigin);for(let s=0;s<e.length;++s){const a=document.createElement("source");let{src:u,mime:l}=e[s];u=u||e[s];const c=u.split("?").shift().toLowerCase(),f=c.slice(c.lastIndexOf(".")+1);l=l||fl.MIME_TYPES[f]||`video/${f}`,a.src=u,a.type=l,r.appendChild(a)}e=r}super(e),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),t.autoLoad!==!1&&this.load()}update(e=0){if(!this.destroyed){const t=hr.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;const e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise(t=>{this.valid?t(this):(this._resolve=t,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(hr.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(hr.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._isConnectedToTicker&&(hr.shared.remove(this.update,this),this._isConnectedToTicker=!1);const e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(hr.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(hr.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e)}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||fl.TYPES.includes(t)}};let dl=fl;dl.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],dl.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},Yu.push(di,pd,fw,dl,cl,Ku,zd,cw);var dw=`attribute vec2 aVertexPosition;
497
+ `))}}let QT=0;const ba={textureCount:0,uboCount:0};class Fd{constructor(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=QT++}systemCheck(){if(!TT())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(t){this.gl=t,this.reset()}bind(t,r){t.disposeRunner.add(this),t.uniforms.globals=this.renderer.globalUniforms;const n=t.program,s=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==n&&(this.program=n,this.gl.useProgram(s.program)),r||(ba.textureCount=0,ba.uboCount=0,this.syncUniformGroup(t.uniformGroup,ba)),s}setUniforms(t){const r=this.shader.program,n=r.glPrograms[this.renderer.CONTEXT_UID];r.syncUniforms(n.uniformData,t,this.renderer)}syncUniformGroup(t,r){const n=this.getGlProgram();(!t.static||t.dirtyId!==n.uniformDirtyGroups[t.id])&&(n.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,n,r))}syncUniforms(t,r,n){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(r.uniformData,t.uniforms,this.renderer,n)}createSyncGroups(t){const r=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[r]||(this.cache[r]=vT(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[r],t.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(t,r){const n=this.getGlProgram();if(!t.static||t.dirtyId!==0||!n.uniformGroups[t.id]){t.dirtyId=0;const s=n.uniformGroups[t.id]||this.createSyncBufferGroup(t,n,r);t.buffer.update(),s(n.uniformData,t.uniforms,this.renderer,ba,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,n.uniformBufferBindings[r])}createSyncBufferGroup(t,r,n){const{gl:s}=this.renderer;this.renderer.buffer.bind(t.buffer);const a=this.gl.getUniformBlockIndex(r.program,n);r.uniformBufferBindings[n]=this.shader.uniformBindCount,s.uniformBlockBinding(r.program,a,this.shader.uniformBindCount),this.shader.uniformBindCount++;const u=this.getSignature(t,this.shader.program.uniformData,"ubo");let l=this._uboCache[u];if(l||(l=this._uboCache[u]=JT(t,this.shader.program.uniformData)),t.autoManage){const c=new Float32Array(l.size/4);t.buffer.update(c)}return r.uniformGroups[t.id]=l.syncFunc,r.uniformGroups[t.id]}getSignature(t,r,n){const s=t.uniforms,a=[`${n}-`];for(const u in s)a.push(u),r[u]&&a.push(r[u].type);return a.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(t){const r=this.gl,n=t.program,s=WT(r,n);return n.glPrograms[this.renderer.CONTEXT_UID]=s,s}reset(){this.program=null,this.shader=null}disposeShader(t){this.shader===t&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}}Fd.extension={type:At.RendererSystem,name:"shader"},$t.add(Fd);class Ta{constructor(t){this.renderer=t}run(t){const{renderer:r}=this;r.runners.init.emit(r.options),t.hello&&console.log(`PixiJS 7.2.3 - ${r.rendererLogId} - https://pixijs.com`),r.resize(r.screen.width,r.screen.height)}destroy(){}}Ta.defaultOptions={hello:!1},Ta.extension={type:[At.RendererSystem,At.CanvasRendererSystem],name:"startup"},$t.add(Ta);function tw(e,t=[]){return t[ht.NORMAL]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.ADD]=[e.ONE,e.ONE],t[ht.MULTIPLY]=[e.DST_COLOR,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.SCREEN]=[e.ONE,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.OVERLAY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.DARKEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.LIGHTEN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.COLOR_DODGE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.COLOR_BURN]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.HARD_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.SOFT_LIGHT]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.DIFFERENCE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.EXCLUSION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.HUE]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.SATURATION]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.COLOR]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.LUMINOSITY]=[e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.NONE]=[0,0],t[ht.NORMAL_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.ADD_NPM]=[e.SRC_ALPHA,e.ONE,e.ONE,e.ONE],t[ht.SCREEN_NPM]=[e.SRC_ALPHA,e.ONE_MINUS_SRC_COLOR,e.ONE,e.ONE_MINUS_SRC_ALPHA],t[ht.SRC_IN]=[e.DST_ALPHA,e.ZERO],t[ht.SRC_OUT]=[e.ONE_MINUS_DST_ALPHA,e.ZERO],t[ht.SRC_ATOP]=[e.DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[ht.DST_OVER]=[e.ONE_MINUS_DST_ALPHA,e.ONE],t[ht.DST_IN]=[e.ZERO,e.SRC_ALPHA],t[ht.DST_OUT]=[e.ZERO,e.ONE_MINUS_SRC_ALPHA],t[ht.DST_ATOP]=[e.ONE_MINUS_DST_ALPHA,e.SRC_ALPHA],t[ht.XOR]=[e.ONE_MINUS_DST_ALPHA,e.ONE_MINUS_SRC_ALPHA],t[ht.SUBTRACT]=[e.ONE,e.ONE,e.ONE,e.ONE,e.FUNC_REVERSE_SUBTRACT,e.FUNC_ADD],t}const ew=0,rw=1,nw=2,iw=3,sw=4,aw=5,ol=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=ht.NONE,this._blendEq=!1,this.map=[],this.map[ew]=this.setBlend,this.map[rw]=this.setOffset,this.map[nw]=this.setCullFace,this.map[iw]=this.setDepthTest,this.map[sw]=this.setFrontFace,this.map[aw]=this.setDepthMask,this.checks=[],this.defaultState=new oa,this.defaultState.blend=!0}contextChange(e){this.gl=e,this.blendModes=tw(e),this.set(this.defaultState),this.reset()}set(e){if(e=e||this.defaultState,this.stateId!==e.data){let t=this.stateId^e.data,r=0;for(;t;)t&1&&this.map[r].call(this,!!(e.data&1<<r)),t=t>>1,r++;this.stateId=e.data}for(let t=0;t<this.checks.length;t++)this.checks[t](this,e)}forceState(e){e=e||this.defaultState;for(let t=0;t<this.map.length;t++)this.map[t].call(this,!!(e.data&1<<t));for(let t=0;t<this.checks.length;t++)this.checks[t](this,e);this.stateId=e.data}setBlend(e){this.updateCheck(ol.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)}setOffset(e){this.updateCheck(ol.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(e){this.gl[e?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(e){this.gl.depthMask(e)}setCullFace(e){this.gl[e?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(e){this.gl.frontFace(this.gl[e?"CW":"CCW"])}setBlendMode(e){if(e===this.blendMode)return;this.blendMode=e;const t=this.blendModes[e],r=this.gl;t.length===2?r.blendFunc(t[0],t[1]):r.blendFuncSeparate(t[0],t[1],t[2],t[3]),t.length===6?(this._blendEq=!0,r.blendEquationSeparate(t[4],t[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}setPolygonOffset(e,t){this.gl.polygonOffset(e,t)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(e,t){const r=this.checks.indexOf(e);t&&r===-1?this.checks.push(e):!t&&r!==-1&&this.checks.splice(r,1)}static checkBlendMode(e,t){e.setBlendMode(t.blendMode)}static checkPolygonOffset(e,t){e.setPolygonOffset(1,t.polygonOffset)}destroy(){this.gl=null}};let Nd=ol;Nd.extension={type:At.RendererSystem,name:"state"},$t.add(Nd);class ow extends Gs{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(t){this.addRunners(...t.runners);const r=(t.priority??[]).filter(s=>t.systems[s]),n=[...r,...Object.keys(t.systems).filter(s=>!r.includes(s))];for(const s of n)this.addSystem(t.systems[s],s)}addRunners(...t){t.forEach(r=>{this.runners[r]=new sr(r)})}addSystem(t,r){const n=new t(this);if(this[r])throw new Error(`Whoops! The name "${r}" is already in use`);this[r]=n,this._systemsHash[r]=n;for(const s in this.runners)this.runners[s].add(n);return this}emitWithCustomOptions(t,r){const n=Object.keys(this._systemsHash);t.items.forEach(s=>{const a=n.find(u=>this._systemsHash[u]===s);s[t.name](r[a])})}destroy(){Object.values(this.runners).forEach(t=>{t.destroy()}),this._systemsHash={}}}const wa=class{constructor(e){this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=wa.defaultMaxIdle,this.checkCountMax=wa.defaultCheckCountMax,this.mode=wa.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==eu.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){const e=this.renderer.texture,t=e.managedTextures;let r=!1;for(let n=0;n<t.length;n++){const s=t[n];!s.framebuffer&&this.count-s.touched>this.maxIdle&&(e.destroyTexture(s,!0),t[n]=null,r=!0)}if(r){let n=0;for(let s=0;s<t.length;s++)t[s]!==null&&(t[n++]=t[s]);t.length=n}}unload(e){const t=this.renderer.texture,r=e._texture;r&&!r.framebuffer&&t.destroyTexture(r);for(let n=e.children.length-1;n>=0;n--)this.unload(e.children[n])}destroy(){this.renderer=null}};let lr=wa;lr.defaultMode=eu.AUTO,lr.defaultMaxIdle=60*60,lr.defaultCheckCountMax=60*10,lr.extension={type:At.RendererSystem,name:"textureGC"},$t.add(lr);class ul{constructor(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Nt.UNSIGNED_BYTE,this.internalFormat=Z.RGBA,this.samplerType=0}}function uw(e){let t;return"WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext?t={[Nt.UNSIGNED_BYTE]:{[Z.RGBA]:e.RGBA8,[Z.RGB]:e.RGB8,[Z.RG]:e.RG8,[Z.RED]:e.R8,[Z.RGBA_INTEGER]:e.RGBA8UI,[Z.RGB_INTEGER]:e.RGB8UI,[Z.RG_INTEGER]:e.RG8UI,[Z.RED_INTEGER]:e.R8UI,[Z.ALPHA]:e.ALPHA,[Z.LUMINANCE]:e.LUMINANCE,[Z.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Nt.BYTE]:{[Z.RGBA]:e.RGBA8_SNORM,[Z.RGB]:e.RGB8_SNORM,[Z.RG]:e.RG8_SNORM,[Z.RED]:e.R8_SNORM,[Z.RGBA_INTEGER]:e.RGBA8I,[Z.RGB_INTEGER]:e.RGB8I,[Z.RG_INTEGER]:e.RG8I,[Z.RED_INTEGER]:e.R8I},[Nt.UNSIGNED_SHORT]:{[Z.RGBA_INTEGER]:e.RGBA16UI,[Z.RGB_INTEGER]:e.RGB16UI,[Z.RG_INTEGER]:e.RG16UI,[Z.RED_INTEGER]:e.R16UI,[Z.DEPTH_COMPONENT]:e.DEPTH_COMPONENT16},[Nt.SHORT]:{[Z.RGBA_INTEGER]:e.RGBA16I,[Z.RGB_INTEGER]:e.RGB16I,[Z.RG_INTEGER]:e.RG16I,[Z.RED_INTEGER]:e.R16I},[Nt.UNSIGNED_INT]:{[Z.RGBA_INTEGER]:e.RGBA32UI,[Z.RGB_INTEGER]:e.RGB32UI,[Z.RG_INTEGER]:e.RG32UI,[Z.RED_INTEGER]:e.R32UI,[Z.DEPTH_COMPONENT]:e.DEPTH_COMPONENT24},[Nt.INT]:{[Z.RGBA_INTEGER]:e.RGBA32I,[Z.RGB_INTEGER]:e.RGB32I,[Z.RG_INTEGER]:e.RG32I,[Z.RED_INTEGER]:e.R32I},[Nt.FLOAT]:{[Z.RGBA]:e.RGBA32F,[Z.RGB]:e.RGB32F,[Z.RG]:e.RG32F,[Z.RED]:e.R32F,[Z.DEPTH_COMPONENT]:e.DEPTH_COMPONENT32F},[Nt.HALF_FLOAT]:{[Z.RGBA]:e.RGBA16F,[Z.RGB]:e.RGB16F,[Z.RG]:e.RG16F,[Z.RED]:e.R16F},[Nt.UNSIGNED_SHORT_5_6_5]:{[Z.RGB]:e.RGB565},[Nt.UNSIGNED_SHORT_4_4_4_4]:{[Z.RGBA]:e.RGBA4},[Nt.UNSIGNED_SHORT_5_5_5_1]:{[Z.RGBA]:e.RGB5_A1},[Nt.UNSIGNED_INT_2_10_10_10_REV]:{[Z.RGBA]:e.RGB10_A2,[Z.RGBA_INTEGER]:e.RGB10_A2UI},[Nt.UNSIGNED_INT_10F_11F_11F_REV]:{[Z.RGB]:e.R11F_G11F_B10F},[Nt.UNSIGNED_INT_5_9_9_9_REV]:{[Z.RGB]:e.RGB9_E5},[Nt.UNSIGNED_INT_24_8]:{[Z.DEPTH_STENCIL]:e.DEPTH24_STENCIL8},[Nt.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[Z.DEPTH_STENCIL]:e.DEPTH32F_STENCIL8}}:t={[Nt.UNSIGNED_BYTE]:{[Z.RGBA]:e.RGBA,[Z.RGB]:e.RGB,[Z.ALPHA]:e.ALPHA,[Z.LUMINANCE]:e.LUMINANCE,[Z.LUMINANCE_ALPHA]:e.LUMINANCE_ALPHA},[Nt.UNSIGNED_SHORT_5_6_5]:{[Z.RGB]:e.RGB},[Nt.UNSIGNED_SHORT_4_4_4_4]:{[Z.RGBA]:e.RGBA},[Nt.UNSIGNED_SHORT_5_5_5_1]:{[Z.RGBA]:e.RGBA}},t}class Ld{constructor(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Lt,this.hasIntegerTextures=!1}contextChange(){const t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=uw(t);const r=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=r;for(let s=0;s<r;s++)this.boundTextures[s]=null;this.emptyTextures={};const n=new ul(t.createTexture());t.bindTexture(t.TEXTURE_2D,n.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=n,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new ul(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(let s=0;s<6;s++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(let s=0;s<this.boundTextures.length;s++)this.bind(null,s)}bind(t,r=0){const{gl:n}=this;if(t=t==null?void 0:t.castToBaseTexture(),t!=null&&t.valid&&!t.parentTextureArray){t.touched=this.renderer.textureGC.count;const s=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[r]!==t&&(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(t.target,s.texture)),s.dirtyId!==t.dirtyId?(this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),this.updateTexture(t)):s.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(t),this.boundTextures[r]=t}else this.currentLocation!==r&&(this.currentLocation=r,n.activeTexture(n.TEXTURE0+r)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[r]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture}unbind(t){const{gl:r,boundTextures:n}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let s=0;s<n.length;s++)n[s]===this.unknownTexture&&this.bind(null,s)}for(let s=0;s<n.length;s++)n[s]===t&&(this.currentLocation!==s&&(r.activeTexture(r.TEXTURE0+s),this.currentLocation=s),r.bindTexture(t.target,this.emptyTextures[t.target].texture),n[s]=null)}ensureSamplerType(t){const{boundTextures:r,hasIntegerTextures:n,CONTEXT_UID:s}=this;if(n)for(let a=t-1;a>=0;--a){const u=r[a];u&&u._glTextures[s].samplerType!==tu.FLOAT&&this.renderer.texture.unbind(u)}}initTexture(t){const r=new ul(this.gl.createTexture());return r.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=r,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),r}initTextureType(t,r){var n;r.internalFormat=((n=this.internalFormats[t.type])==null?void 0:n[t.format])??t.format,this.webGLVersion===2&&t.type===Nt.HALF_FLOAT?r.type=this.gl.HALF_FLOAT:r.type=t.type}updateTexture(t){var s;const r=t._glTextures[this.CONTEXT_UID];if(!r)return;const n=this.renderer;if(this.initTextureType(t,r),(s=t.resource)!=null&&s.upload(n,t,r))r.samplerType!==tu.FLOAT&&(this.hasIntegerTextures=!0);else{const a=t.realWidth,u=t.realHeight,l=n.gl;(r.width!==a||r.height!==u||r.dirtyId<0)&&(r.width=a,r.height=u,l.texImage2D(t.target,0,r.internalFormat,a,u,0,t.format,r.type,null))}t.dirtyStyleId!==r.dirtyStyleId&&this.updateTextureStyle(t),r.dirtyId=t.dirtyId}destroyTexture(t,r){const{gl:n}=this;if(t=t.castToBaseTexture(),t._glTextures[this.CONTEXT_UID]&&(this.unbind(t),n.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!r)){const s=this.managedTextures.indexOf(t);s!==-1&&sa(this.managedTextures,s,1)}}updateTextureStyle(t){var n;const r=t._glTextures[this.CONTEXT_UID];r&&((t.mipmap===yn.POW2||this.webGLVersion!==2)&&!t.isPowerOfTwo?r.mipmap=!1:r.mipmap=t.mipmap>=1,this.webGLVersion!==2&&!t.isPowerOfTwo?r.wrapMode=ji.CLAMP:r.wrapMode=t.wrapMode,(n=t.resource)!=null&&n.style(this.renderer,t,r)||this.setStyle(t,r),r.dirtyStyleId=t.dirtyStyleId)}setStyle(t,r){const n=this.gl;if(r.mipmap&&t.mipmap!==yn.ON_MANUAL&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,r.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,r.wrapMode),r.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Sr.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);const s=this.renderer.context.extensions.anisotropicFiltering;if(s&&t.anisotropicLevel>0&&t.scaleMode===Sr.LINEAR){const a=Math.min(t.anisotropicLevel,n.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,s.TEXTURE_MAX_ANISOTROPY_EXT,a)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===Sr.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===Sr.LINEAR?n.LINEAR:n.NEAREST)}destroy(){this.renderer=null}}Ld.extension={type:At.RendererSystem,name:"texture"},$t.add(Ld);class kd{constructor(t){this.renderer=t}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,s=t._glTransformFeedbacks[n]||this.createGLTransformFeedback(t);r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,s)}unbind(){const{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(t,r){const{gl:n,renderer:s}=this;r&&s.shader.bind(r),n.beginTransformFeedback(t)}endTransformFeedback(){const{gl:t}=this;t.endTransformFeedback()}createGLTransformFeedback(t){const{gl:r,renderer:n,CONTEXT_UID:s}=this,a=r.createTransformFeedback();t._glTransformFeedbacks[s]=a,r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,a);for(let u=0;u<t.buffers.length;u++){const l=t.buffers[u];l&&(n.buffer.update(l),l._glBuffers[s].refCount++,r.bindBufferBase(r.TRANSFORM_FEEDBACK_BUFFER,u,l._glBuffers[s].buffer||null))}return r.bindTransformFeedback(r.TRANSFORM_FEEDBACK,null),t.disposeRunner.add(this),a}disposeTransformFeedback(t,r){const n=t._glTransformFeedbacks[this.CONTEXT_UID],s=this.gl;t.disposeRunner.remove(this);const a=this.renderer.buffer;if(a)for(let u=0;u<t.buffers.length;u++){const l=t.buffers[u];if(!l)continue;const c=l._glBuffers[this.CONTEXT_UID];c&&(c.refCount--,c.refCount===0&&!r&&a.dispose(l,r))}n&&(r||s.deleteTransformFeedback(n),delete t._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}}kd.extension={type:At.RendererSystem,name:"transformFeedback"},$t.add(kd);class Sa{constructor(t){this.renderer=t}init(t){this.screen=new jt(0,0,t.width,t.height),this.element=t.view||xt.ADAPTER.createCanvas(),this.resolution=t.resolution||xt.RESOLUTION,this.autoDensity=!!t.autoDensity}resizeView(t,r){this.element.width=Math.round(t*this.resolution),this.element.height=Math.round(r*this.resolution);const n=this.element.width/this.resolution,s=this.element.height/this.resolution;this.screen.width=n,this.screen.height=s,this.autoDensity&&(this.element.style.width=`${n}px`,this.element.style.height=`${s}px`),this.renderer.emit("resize",n,s),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(t){var r;t&&((r=this.element.parentNode)==null||r.removeChild(this.element)),this.renderer=null,this.element=null,this.screen=null}}Sa.defaultOptions={width:800,height:600,resolution:xt.RESOLUTION,autoDensity:!1},Sa.extension={type:[At.RendererSystem,At.CanvasRendererSystem],name:"_view"},$t.add(Sa),xt.PREFER_ENV=vn.WEBGL2,xt.STRICT_TEXTURE_CACHE=!1,xt.RENDER_OPTIONS={...ma.defaultOptions,...ga.defaultOptions,...Sa.defaultOptions,...Ta.defaultOptions},Object.defineProperties(xt,{WRAP_MODE:{get(){return Lt.defaultOptions.wrapMode},set(e){Rt("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),Lt.defaultOptions.wrapMode=e}},SCALE_MODE:{get(){return Lt.defaultOptions.scaleMode},set(e){Rt("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),Lt.defaultOptions.scaleMode=e}},MIPMAP_TEXTURES:{get(){return Lt.defaultOptions.mipmap},set(e){Rt("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),Lt.defaultOptions.mipmap=e}},ANISOTROPIC_LEVEL:{get(){return Lt.defaultOptions.anisotropicLevel},set(e){Rt("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),Lt.defaultOptions.anisotropicLevel=e}},FILTER_RESOLUTION:{get(){return Rt("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),Dt.defaultResolution},set(e){Dt.defaultResolution=e}},FILTER_MULTISAMPLE:{get(){return Rt("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),Dt.defaultMultisample},set(e){Dt.defaultMultisample=e}},SPRITE_MAX_TEXTURES:{get(){return ur.defaultMaxTextures},set(e){Rt("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),ur.defaultMaxTextures=e}},SPRITE_BATCH_SIZE:{get(){return ur.defaultBatchSize},set(e){Rt("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),ur.defaultBatchSize=e}},CAN_UPLOAD_SAME_BUFFER:{get(){return ur.canUploadSameBuffer},set(e){Rt("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),ur.canUploadSameBuffer=e}},GC_MODE:{get(){return lr.defaultMode},set(e){Rt("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),lr.defaultMode=e}},GC_MAX_IDLE:{get(){return lr.defaultMaxIdle},set(e){Rt("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),lr.defaultMaxIdle=e}},GC_MAX_CHECK_COUNT:{get(){return lr.defaultCheckCountMax},set(e){Rt("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),lr.defaultCheckCountMax=e}},PRECISION_VERTEX:{get(){return Br.defaultVertexPrecision},set(e){Rt("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),Br.defaultVertexPrecision=e}},PRECISION_FRAGMENT:{get(){return Br.defaultFragmentPrecision},set(e){Rt("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),Br.defaultFragmentPrecision=e}}});var Aa=(e=>(e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY",e))(Aa||{});class ll{constructor(t,r=null,n=0,s=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=r,this.priority=n,this.once=s}match(t,r=null){return this.fn===t&&this.context===r}emit(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));const r=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),r}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const r=this.next;return this.next=t?null:r,this.previous=null,r}}const Ue=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new ll(null,null,1/0),this.deltaMS=1/Ue.targetFPMS,this.elapsedMS=1/Ue.targetFPMS,this._tick=e=>{this._requestId=null,this.started&&(this.update(e),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(e,t,r=Aa.NORMAL){return this._addListener(new ll(e,t,r))}addOnce(e,t,r=Aa.NORMAL){return this._addListener(new ll(e,t,r,!0))}_addListener(e){let t=this._head.next,r=this._head;if(!t)e.connect(r);else{for(;t;){if(e.priority>t.priority){e.connect(r);break}r=t,t=t.next}e.previous||e.connect(r)}return this._startIfPossible(),this}remove(e,t){let r=this._head.next;for(;r;)r.match(e,t)?r=r.destroy():r=r.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let e=0,t=this._head;for(;t=t.next;)e++;return e}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let e=this._head.next;for(;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}}update(e=performance.now()){let t;if(e>this.lastTime){if(t=this.elapsedMS=e-this.lastTime,t>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){const s=e-this._lastFrame|0;if(s<this._minElapsedMS)return;this._lastFrame=e-s%this._minElapsedMS}this.deltaMS=t,this.deltaTime=this.deltaMS*Ue.targetFPMS;const r=this._head;let n=r.next;for(;n;)n=n.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=e}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(e){const t=Math.min(this.maxFPS,e),r=Math.min(Math.max(0,t)/1e3,Ue.targetFPMS);this._maxElapsedMS=1/r}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(e){if(e===0)this._minElapsedMS=0;else{const t=Math.max(this.minFPS,e);this._minElapsedMS=1/(t/1e3)}}static get shared(){if(!Ue._shared){const e=Ue._shared=new Ue;e.autoStart=!0,e._protected=!0}return Ue._shared}static get system(){if(!Ue._system){const e=Ue._system=new Ue;e.autoStart=!0,e._protected=!0}return Ue._system}};let hr=Ue;hr.targetFPMS=.06,Object.defineProperties(xt,{TARGET_FPMS:{get(){return hr.targetFPMS},set(e){Rt("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),hr.targetFPMS=e}}});class Bd{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set(r){this._ticker&&this._ticker.remove(this.render,this),this._ticker=r,r&&r.add(this.render,this,Aa.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?hr.shared:new hr,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}Bd.extension=At.Application,$t.add(Bd);const lw=[];$t.handleByList(At.Renderer,lw);class Dd{constructor(t){this.renderer=t}contextChange(t){let r;if(this.renderer.context.webGLVersion===1){const n=t.getParameter(t.FRAMEBUFFER_BINDING);t.bindFramebuffer(t.FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.FRAMEBUFFER,n)}else{const n=t.getParameter(t.DRAW_FRAMEBUFFER_BINDING);t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),r=t.getParameter(t.SAMPLES),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,n)}r>=fe.HIGH?this.multisample=fe.HIGH:r>=fe.MEDIUM?this.multisample=fe.MEDIUM:r>=fe.LOW?this.multisample=fe.LOW:this.multisample=fe.NONE}destroy(){}}Dd.extension={type:At.RendererSystem,name:"_multisample"},$t.add(Dd);class hw{constructor(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}}class Ud{constructor(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(t){const{gl:r,CONTEXT_UID:n}=this,s=t._glBuffers[n]||this.createGLBuffer(t);r.bindBuffer(t.type,s.buffer)}unbind(t){const{gl:r}=this;r.bindBuffer(t,null)}bindBufferBase(t,r){const{gl:n,CONTEXT_UID:s}=this;if(this.boundBufferBases[r]!==t){const a=t._glBuffers[s]||this.createGLBuffer(t);this.boundBufferBases[r]=t,n.bindBufferBase(n.UNIFORM_BUFFER,r,a.buffer)}}bindBufferRange(t,r,n){const{gl:s,CONTEXT_UID:a}=this;n=n||0;const u=t._glBuffers[a]||this.createGLBuffer(t);s.bindBufferRange(s.UNIFORM_BUFFER,r||0,u.buffer,n*256,256)}update(t){const{gl:r,CONTEXT_UID:n}=this,s=t._glBuffers[n]||this.createGLBuffer(t);if(t._updateID!==s.updateID)if(s.updateID=t._updateID,r.bindBuffer(t.type,s.buffer),s.byteLength>=t.data.byteLength)r.bufferSubData(t.type,0,t.data);else{const a=t.static?r.STATIC_DRAW:r.DYNAMIC_DRAW;s.byteLength=t.data.byteLength,r.bufferData(t.type,t.data,a)}}dispose(t,r){if(!this.managedBuffers[t.id])return;delete this.managedBuffers[t.id];const n=t._glBuffers[this.CONTEXT_UID],s=this.gl;t.disposeRunner.remove(this),n&&(r||s.deleteBuffer(n.buffer),delete t._glBuffers[this.CONTEXT_UID])}disposeAll(t){const r=Object.keys(this.managedBuffers);for(let n=0;n<r.length;n++)this.dispose(this.managedBuffers[r[n]],t)}createGLBuffer(t){const{CONTEXT_UID:r,gl:n}=this;return t._glBuffers[r]=new hw(n.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[r]}}Ud.extension={type:At.RendererSystem,name:"buffer"},$t.add(Ud);class $d{constructor(t){this.renderer=t}render(t,r){const n=this.renderer;let s,a,u,l;if(r&&(s=r.renderTexture,a=r.clear,u=r.transform,l=r.skipUpdateTransform),this.renderingToScreen=!s,n.runners.prerender.emit(),n.emit("prerender"),n.projection.transform=u,!n.context.isLost){if(s||(this.lastObjectRendered=t),!l){const c=t.enableTempParent();t.updateTransform(),t.disableTempParent(c)}n.renderTexture.bind(s),n.batch.currentRenderer.start(),(a??n.background.clearBeforeRender)&&n.renderTexture.clear(),t.render(n),n.batch.currentRenderer.flush(),s&&(r.blit&&n.framebuffer.blit(),s.baseTexture.update()),n.runners.postrender.emit(),n.projection.transform=null,n.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}}$d.extension={type:At.RendererSystem,name:"objectRenderer"},$t.add($d);const hl=class extends ow{constructor(e){super(),this.type=Fc.WEBGL,e=Object.assign({},xt.RENDER_OPTIONS,e),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new ar({projectionMatrix:new Pe},!0);const t={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:hl.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(t),"useContextAlpha"in e&&(Rt("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),e.premultipliedAlpha=e.useContextAlpha&&e.useContextAlpha!=="notMultiplied",e.backgroundAlpha=e.useContextAlpha===!1?1:e.backgroundAlpha),this._plugin.rendererPlugins=hl.__plugins,this.options=e,this.startup.run(this.options)}static test(e){return e!=null&&e.forceCanvas?!1:$b()}render(e,t){this.objectRenderer.render(e,t)}resize(e,t){this._view.resizeView(e,t)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(e=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:e}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(e){this._view.resolution=e,this.runners.resolutionChange.emit(e)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return Rt("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return Rt("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return Rt("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return Rt("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(e){Rt("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=e}get backgroundAlpha(){return Rt("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(e){Rt("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=e}get powerPreference(){return Rt("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(e,t){return this.textureGenerator.generateTexture(e,t)}};let fi=hl;fi.extension={type:At.Renderer,priority:1},fi.__plugins={},fi.__systems={},$t.handleByMap(At.RendererPlugin,fi.__plugins),$t.handleByMap(At.RendererSystem,fi.__systems),$t.add(fi);class Gd extends rs{constructor(t,r){const{width:n,height:s}=r||{};super(n,s),this.items=[],this.itemDirtyIds=[];for(let a=0;a<t;a++){const u=new Lt;this.items.push(u),this.itemDirtyIds.push(-2)}this.length=t,this._load=null,this.baseTexture=null}initFromArray(t,r){for(let n=0;n<this.length;n++)t[n]&&(t[n].castToBaseTexture?this.addBaseTextureAt(t[n].castToBaseTexture(),n):t[n]instanceof rs?this.addResourceAt(t[n],n):this.addResourceAt(Zf(t[n],r),n))}dispose(){for(let t=0,r=this.length;t<r;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(t,r){if(!this.items[r])throw new Error(`Index ${r} is out of bounds`);return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[r].setResource(t),this}bind(t){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=t,this.items[r].on("update",t.update,t)}unbind(t){super.unbind(t);for(let r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",t.update,t)}load(){if(this._load)return this._load;const r=this.items.map(n=>n.resource).filter(n=>n).map(n=>n.load());return this._load=Promise.all(r).then(()=>{const{realWidth:n,realHeight:s}=this.items[0];return this.resize(n,s),Promise.resolve(this)}),this._load}}class cw extends Gd{constructor(t,r){const{width:n,height:s}=r||{};let a,u;Array.isArray(t)?(a=t,u=t.length):u=t,super(u,{width:n,height:s}),a&&this.initFromArray(a,r)}addBaseTextureAt(t,r){if(t.resource)this.addResourceAt(t.resource,r);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(t){super.bind(t),t.target=qn.TEXTURE_2D_ARRAY}upload(t,r,n){const{length:s,itemDirtyIds:a,items:u}=this,{gl:l}=t;n.dirtyId<0&&l.texImage3D(l.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,s,0,r.format,n.type,null);for(let c=0;c<s;c++){const f=u[c];a[c]<f.dirtyId&&(a[c]=f.dirtyId,f.valid&&l.texSubImage3D(l.TEXTURE_2D_ARRAY,0,0,0,c,f.resource.width,f.resource.height,1,r.format,n.type,f.resource.source))}return!0}}class fw extends rn{constructor(t){super(t)}static test(t){const{OffscreenCanvas:r}=globalThis;return r&&t instanceof r?!0:globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement}}const ls=class extends Gd{constructor(e,t){const{width:r,height:n,autoLoad:s,linkBaseTexture:a}=t||{};if(e&&e.length!==ls.SIDES)throw new Error(`Invalid length. Got ${e.length}, expected 6`);super(6,{width:r,height:n});for(let u=0;u<ls.SIDES;u++)this.items[u].target=qn.TEXTURE_CUBE_MAP_POSITIVE_X+u;this.linkBaseTexture=a!==!1,e&&this.initFromArray(e,t),s!==!1&&this.load()}bind(e){super.bind(e),e.target=qn.TEXTURE_CUBE_MAP}addBaseTextureAt(e,t,r){if(r===void 0&&(r=this.linkBaseTexture),!this.items[t])throw new Error(`Index ${t} is out of bounds`);if(!this.linkBaseTexture||e.parentTextureArray||Object.keys(e._glTextures).length>0)if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("CubeResource does not support copying of renderTexture.");else e.target=qn.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this}upload(e,t,r){const n=this.itemDirtyIds;for(let s=0;s<ls.SIDES;s++){const a=this.items[s];(n[s]<a.dirtyId||r.dirtyId<t.dirtyId)&&(a.valid&&a.resource?(a.resource.upload(e,a,r),n[s]=a.dirtyId):n[s]<-1&&(e.gl.texImage2D(a.target,0,r.internalFormat,t.realWidth,t.realHeight,0,t.format,r.type,null),n[s]=-1))}return!0}static test(e){return Array.isArray(e)&&e.length===ls.SIDES}};let zd=ls;zd.SIDES=6;class di extends rn{constructor(t,r){r=r||{};let n,s;typeof t=="string"?(n=di.EMPTY,s=t):(n=t,s=null),super(n),this.url=s,this.crossOrigin=r.crossOrigin??!0,this.alphaMode=typeof r.alphaMode=="number"?r.alphaMode:null,this._load=null,r.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(t,r)=>{if(this.url===null){t(this);return}try{const n=await xt.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;const s=await n.blob();if(this.destroyed)return;const a=await createImageBitmap(s,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Zr.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=a,this.update(),t(this)}catch(n){if(this.destroyed)return;r(n),this.onError.emit(n)}}),this._load)}upload(t,r,n){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(r.alphaMode=this.alphaMode),super.upload(t,r,n)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(t){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof t=="string"||t instanceof ImageBitmap)}static get EMPTY(){return di._EMPTY=di._EMPTY??xt.ADAPTER.createCanvas(0,0),di._EMPTY}}const Ca=class extends rn{constructor(e,t){t=t||{},super(xt.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=e,this.scale=t.scale||1,this._overrideWidth=t.width,this._overrideHeight=t.height,this._resolve=null,this._crossorigin=t.crossorigin,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(e=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),e(this)},Ca.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){const e=new Image;rn.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=t=>{this._resolve&&(e.onerror=null,this.onError.emit(t))},e.onload=()=>{if(!this._resolve)return;const t=e.width,r=e.height;if(!t||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let n=t*this.scale,s=r*this.scale;(this._overrideWidth||this._overrideHeight)&&(n=this._overrideWidth||this._overrideHeight/r*t,s=this._overrideHeight||this._overrideWidth/t*r),n=Math.round(n),s=Math.round(s);const a=this.source;a.width=n,a.height=s,a._pixiId=`canvas_${es()}`,a.getContext("2d").drawImage(e,0,0,t,r,0,0,n,s),this._resolve(),this._resolve=null}}static getSize(e){const t=Ca.SVG_SIZE.exec(e),r={};return t&&(r[t[1]]=Math.round(parseFloat(t[3])),r[t[5]]=Math.round(parseFloat(t[7]))),r}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(e,t){return t==="svg"||typeof e=="string"&&e.startsWith("data:image/svg+xml")||typeof e=="string"&&Ca.SVG_XML.test(e)}};let cl=Ca;cl.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,cl.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;const fl=class extends rn{constructor(e,t){if(t=t||{},!(e instanceof HTMLVideoElement)){const r=document.createElement("video");r.setAttribute("preload","auto"),r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),typeof e=="string"&&(e=[e]);const n=e[0].src||e[0];rn.crossOrigin(r,n,t.crossorigin);for(let s=0;s<e.length;++s){const a=document.createElement("source");let{src:u,mime:l}=e[s];u=u||e[s];const c=u.split("?").shift().toLowerCase(),f=c.slice(c.lastIndexOf(".")+1);l=l||fl.MIME_TYPES[f]||`video/${f}`,a.src=u,a.type=l,r.appendChild(a)}e=r}super(e),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),t.autoLoad!==!1&&this.load()}update(e=0){if(!this.destroyed){const t=hr.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;const e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise(t=>{this.valid?t(this):(this._resolve=t,e.load())}),this._load}_onError(e){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(e)}_isSourcePlaying(){const e=this.source;return!e.paused&&!e.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(hr.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(hr.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){const e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);const t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()}dispose(){this._isConnectedToTicker&&(hr.shared.remove(this.update,this),this._isConnectedToTicker=!1);const e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(hr.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(hr.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(e){e!==this._updateFPS&&(this._updateFPS=e)}static test(e,t){return globalThis.HTMLVideoElement&&e instanceof HTMLVideoElement||fl.TYPES.includes(t)}};let dl=fl;dl.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],dl.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},Yu.push(di,pd,fw,dl,cl,Ku,zd,cw);var dw=`attribute vec2 aVertexPosition;
498
498
  attribute vec2 aTextureCoord;
499
499
 
500
500
  uniform mat3 projectionMatrix;
@@ -647,7 +647,7 @@ void main() {
647
647
  bloomColor.rgb *= bloomScale;
648
648
  gl_FragColor = color + bloomColor;
649
649
  }
650
- `;const Vd=class extends Dt{constructor(t){super(Hd,bw),this.bloomScale=1,this.brightness=1,this._resolution=_t.FILTER_RESOLUTION,typeof t=="number"&&(t={threshold:t});const r=Object.assign(Vd.defaults,t);this.bloomScale=r.bloomScale,this.brightness=r.brightness;const{kernels:n,blur:s,quality:a,pixelSize:u,resolution:l}=r;this._extractFilter=new xw(r.threshold),this._extractFilter.resolution=l,this._blurFilter=n?new hs(n):new hs(s,a),this.pixelSize=u,this.resolution=l}apply(t,r,n,s,a){const u=t.getFilterTexture();this._extractFilter.apply(t,r,u,1,a);const l=t.getFilterTexture();this._blurFilter.apply(t,u,l,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=l,t.applyFilter(this,r,n,s),t.returnFilterTexture(l),t.returnFilterTexture(u)}get resolution(){return this._resolution}set resolution(t){this._resolution=t,this._extractFilter&&(this._extractFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)}get threshold(){return this._extractFilter.threshold}set threshold(t){this._extractFilter.threshold=t}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get blur(){return this._blurFilter.blur}set blur(t){this._blurFilter.blur=t}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){this._blurFilter.pixelSize=t}};let Tw=Vd;Tw.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:_t.FILTER_RESOLUTION};var ww=`attribute vec2 aVertexPosition;
650
+ `;const Vd=class extends Dt{constructor(t){super(Hd,bw),this.bloomScale=1,this.brightness=1,this._resolution=xt.FILTER_RESOLUTION,typeof t=="number"&&(t={threshold:t});const r=Object.assign(Vd.defaults,t);this.bloomScale=r.bloomScale,this.brightness=r.brightness;const{kernels:n,blur:s,quality:a,pixelSize:u,resolution:l}=r;this._extractFilter=new xw(r.threshold),this._extractFilter.resolution=l,this._blurFilter=n?new hs(n):new hs(s,a),this.pixelSize=u,this.resolution=l}apply(t,r,n,s,a){const u=t.getFilterTexture();this._extractFilter.apply(t,r,u,1,a);const l=t.getFilterTexture();this._blurFilter.apply(t,u,l,1),this.uniforms.bloomScale=this.bloomScale,this.uniforms.brightness=this.brightness,this.uniforms.bloomTexture=l,t.applyFilter(this,r,n,s),t.returnFilterTexture(l),t.returnFilterTexture(u)}get resolution(){return this._resolution}set resolution(t){this._resolution=t,this._extractFilter&&(this._extractFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)}get threshold(){return this._extractFilter.threshold}set threshold(t){this._extractFilter.threshold=t}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get blur(){return this._blurFilter.blur}set blur(t){this._blurFilter.blur=t}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){this._blurFilter.pixelSize=t}};let Tw=Vd;Tw.defaults={threshold:.5,bloomScale:1,brightness:1,kernels:null,blur:8,quality:4,pixelSize:1,resolution:xt.FILTER_RESOLUTION};var ww=`attribute vec2 aVertexPosition;
651
651
  attribute vec2 aTextureCoord;
652
652
 
653
653
  uniform mat3 projectionMatrix;
@@ -834,7 +834,7 @@ void main(void)
834
834
  vTextureCoord = aTextureCoord;
835
835
  vFilterCoord = vTextureCoord * inputSize.xy / outputFrame.zw;
836
836
  }
837
- `,Pn=Pn||{};Pn.stringify=function(){var e={"visit_linear-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return e.visit_gradient(t)},"visit_radial-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return e.visit_gradient(t)},visit_gradient:function(t){var r=e.visit(t.orientation);return r&&(r+=", "),t.type+"("+r+e.visit(t.colorStops)+")"},visit_shape:function(t){var r=t.value,n=e.visit(t.at),s=e.visit(t.style);return s&&(r+=" "+s),n&&(r+=" at "+n),r},"visit_default-radial":function(t){var r="",n=e.visit(t.at);return n&&(r+=n),r},"visit_extent-keyword":function(t){var r=t.value,n=e.visit(t.at);return n&&(r+=" at "+n),r},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return e.visit(t.value.x)+" "+e.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_literal:function(t){return e.visit_color(t.value,t)},visit_hex:function(t){return e.visit_color("#"+t.value,t)},visit_rgb:function(t){return e.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return e.visit_color("rgba("+t.value.join(", ")+")",t)},visit_color:function(t,r){var n=t,s=e.visit(r.length);return s&&(n+=" "+s),n},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var r="",n=t.length;return t.forEach(function(s,a){r+=e.visit(s),a<n-1&&(r+=", ")}),r},visit:function(t){if(!t)return"";var r="";if(t instanceof Array)return e.visit_array(t,r);if(t.type){var n=e["visit_"+t.type];if(n)return n(t);throw Error("Missing visitor visit_"+t.type)}else throw Error("Invalid node.")}};return function(t){return e.visit(t)}}();var Pn=Pn||{};Pn.parse=function(){var e={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function r(G){var rt=new Error(t+": "+G);throw rt.source=t,rt}function n(){var G=s();return t.length>0&&r("Invalid input not EOF"),G}function s(){return A(a)}function a(){return u("linear-gradient",e.linearGradient,c)||u("repeating-linear-gradient",e.repeatingLinearGradient,c)||u("radial-gradient",e.radialGradient,m)||u("repeating-radial-gradient",e.repeatingRadialGradient,m)}function u(G,rt,gt){return l(rt,function(H){var K=gt();return K&&(xt(e.comma)||r("Missing comma before color stops")),{type:G,orientation:K,colorStops:A(R)}})}function l(G,rt){var gt=xt(G);if(gt){xt(e.startCall)||r("Missing (");var H=rt(gt);return xt(e.endCall)||r("Missing )"),H}}function c(){return f()||p()}function f(){return j("directional",e.sideOrCorner,1)}function p(){return j("angular",e.angleValue,1)}function m(){var G,rt=g(),gt;return rt&&(G=[],G.push(rt),gt=t,xt(e.comma)&&(rt=g(),rt?G.push(rt):t=gt)),G}function g(){var G=x()||y();if(G)G.at=T();else{var rt=S();if(rt){G=rt;var gt=T();gt&&(G.at=gt)}else{var H=w();H&&(G={type:"default-radial",at:H})}}return G}function x(){var G=j("shape",/^(circle)/i,0);return G&&(G.style=V()||S()),G}function y(){var G=j("shape",/^(ellipse)/i,0);return G&&(G.style=tt()||S()),G}function S(){return j("extent-keyword",e.extentKeywords,1)}function T(){if(j("position",/^at/,0)){var G=w();return G||r("Missing positioning value"),G}}function w(){var G=I();if(G.x||G.y)return{type:"position",value:G}}function I(){return{x:tt(),y:tt()}}function A(G){var rt=G(),gt=[];if(rt)for(gt.push(rt);xt(e.comma);)rt=G(),rt?gt.push(rt):r("One extra comma");return gt}function R(){var G=N();return G||r("Expected color definition"),G.length=tt(),G}function N(){return L()||z()||O()||B()}function B(){return j("literal",e.literalColor,0)}function L(){return j("hex",e.hexColor,1)}function O(){return l(e.rgbColor,function(){return{type:"rgb",value:A(X)}})}function z(){return l(e.rgbaColor,function(){return{type:"rgba",value:A(X)}})}function X(){return xt(e.number)[1]}function tt(){return j("%",e.percentageValue,1)||it()||V()}function it(){return j("position-keyword",e.positionKeywords,1)}function V(){return j("px",e.pixelValue,1)||j("em",e.emValue,1)}function j(G,rt,gt){var H=xt(rt);if(H)return{type:G,value:H[gt]}}function xt(G){var rt,gt;return gt=/^[\n\r\t\s]+/.exec(t),gt&&kt(gt[0].length),rt=G.exec(t),rt&&kt(rt[0].length),rt}function kt(G){t=t.substr(G)}return function(G){return t=G.toString(),n()}}();var Iw=Pn.parse;Pn.stringify;var Xd={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Wd={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Rw(e){var t,r=[],n=1,s;if(typeof e=="string")if(Xd[e])r=Xd[e].slice(),s="rgb";else if(e==="transparent")n=0,s="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var a=e.slice(1),u=a.length,l=u<=4;n=1,l?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],u===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],u===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),s="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var c=t[1],f=c==="rgb",a=c.replace(/a$/,"");s=a;var u=a==="cmyk"?4:a==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(g,x){if(/%$/.test(g))return x===u?parseFloat(g)/100:a==="rgb"?parseFloat(g)*255/100:parseFloat(g);if(a[x]==="h"){if(/deg$/.test(g))return parseFloat(g);if(Wd[g]!==void 0)return Wd[g]}return parseFloat(g)}),c===a&&r.push(1),n=f||r[u]===void 0?1:r[u],r=r.slice(0,u)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(p){return parseFloat(p)}),s=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],s="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(s="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(s="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(s="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:s,values:r,alpha:n}}var pl={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},gl={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,s,a,u,l,c;if(r===0)return c=n*255,[c,c,c];n<.5?a=n*(1+r):a=n+r-n*r,s=2*n-a,l=[0,0,0];for(var f=0;f<3;f++)u=t+1/3*-(f-1),u<0?u++:u>1&&u--,6*u<1?c=s+(a-s)*6*u:2*u<1?c=a:3*u<2?c=s+(a-s)*(2/3-u)*6:c=s,l[f]=c*255;return l}};pl.hsl=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(t,r,n),a=Math.max(t,r,n),u=a-s,l,c,f;return a===s?l=0:t===a?l=(r-n)/u:r===a?l=2+(n-t)/u:n===a&&(l=4+(t-r)/u),l=Math.min(l*60,360),l<0&&(l+=360),f=(s+a)/2,a===s?c=0:f<=.5?c=u/(a+s):c=u/(2-a-s),[l,c*100,f*100]};function Pw(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments));var t,r=Rw(e);if(!r.space)return[];const n=r.space[0]==="h"?gl.min:pl.min,s=r.space[0]==="h"?gl.max:pl.max;return t=Array(3),t[0]=Math.min(Math.max(r.values[0],n[0]),s[0]),t[1]=Math.min(Math.max(r.values[1],n[1]),s[1]),t[2]=Math.min(Math.max(r.values[2],n[2]),s[2]),r.space[0]==="h"&&(t=gl.rgb(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t}function qd(e){switch(typeof e){case"string":return Mw(e);case"number":return na(e);default:return e}}function Mw(e){const t=Pw(e);if(!t)throw new Error(`Unable to parse color "${e}" as RGBA.`);return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function Ow(e){const t=Iw(Gw(e));if(t.length===0)throw new Error("Invalid CSS gradient.");if(t.length!==1)throw new Error("Unsupported CSS gradient (multiple gradients is not supported).");const r=t[0],n=Fw(r.type),s=Nw(r.colorStops),a=Uw(r.orientation);return{type:n,stops:s,angle:a}}function Fw(e){const t={"linear-gradient":0,"radial-gradient":1};if(!(e in t))throw new Error(`Unsupported gradient type "${e}"`);return t[e]}function Nw(e){const t=Bw(e),r=[];for(let n=0;n<e.length;n++){const s=Lw(e[n]);r.push({offset:t[n],color:s.slice(0,3),alpha:s[3]})}return r}function Lw(e){return qd(kw(e))}function kw(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;default:return`${e.type}(${e.value.join(",")})`}}function Bw(e){const t=[];for(let s=0;s<e.length;s++){const a=e[s];let u=-1;a.type==="literal"&&a.length&&"type"in a.length&&a.length.type==="%"&&"value"in a.length&&(u=parseFloat(a.length.value)/100),t.push(u)}const r=s=>{for(let a=s;a<t.length;a++)if(t[a]!==-1)return{indexDelta:a-s,offset:t[a]};return{indexDelta:t.length-1-s,offset:1}};let n=0;for(let s=0;s<t.length;s++){const a=t[s];if(a!==-1)n=a;else if(s===0)t[s]=0;else if(s+1===t.length)t[s]=1;else{const u=r(s),l=(u.offset-n)/(1+u.indexDelta);for(let c=0;c<=u.indexDelta;c++)t[s+c]=n+(c+1)*l;s+=u.indexDelta,n=t[s]}}return t.map(Dw)}function Dw(e){return e.toString().length>6?parseFloat(e.toString().substring(0,6)):e}function Uw(e){if(typeof e>"u")return 0;if("type"in e&&"value"in e)switch(e.type){case"angular":return parseFloat(e.value);case"directional":return $w(e.value)}return 0}function $w(e){const t={left:270,top:0,bottom:180,right:90,"left top":315,"top left":315,"left bottom":225,"bottom left":225,"right top":45,"top right":45,"right bottom":135,"bottom right":135};if(!(e in t))throw new Error(`Unsupported directional value "${e}"`);return t[e]}function Gw(e){let t=e.replace(/\s{2,}/gu," ");return t=t.replace(/;/g,""),t=t.replace(/ ,/g,","),t=t.replace(/\( /g,"("),t=t.replace(/ \)/g,")"),t.trim()}var zw=Object.defineProperty,Hw=Object.defineProperties,Vw=Object.getOwnPropertyDescriptors,Yd=Object.getOwnPropertySymbols,jw=Object.prototype.hasOwnProperty,Xw=Object.prototype.propertyIsEnumerable,Kd=(e,t,r)=>t in e?zw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ml=(e,t)=>{for(var r in t||(t={}))jw.call(t,r)&&Kd(e,r,t[r]);if(Yd)for(var r of Yd(t))Xw.call(t,r)&&Kd(e,r,t[r]);return e},Ww=(e,t)=>Hw(e,Vw(t));const Zd=90;function qw(e){return[...e].sort((t,r)=>t.offset-r.offset)}const vl=class extends Dt{constructor(t){t&&"css"in t&&(t=Ww(ml({},Ow(t.css||"")),{alpha:t.alpha,maxColors:t.maxColors}));const r=ml(ml({},vl.defaults),t);if(!r.stops||r.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(Ew,Cw),this._stops=[],this.autoFit=!1,Object.assign(this,r)}get stops(){return this._stops}set stops(t){const r=qw(t),n=new Float32Array(r.length*3),s=0,a=1,u=2;for(let l=0;l<r.length;l++){const c=qd(r[l].color),f=l*3;n[f+s]=c[s],n[f+a]=c[a],n[f+u]=c[u]}this.uniforms.uColors=n,this.uniforms.uOffsets=r.map(l=>l.offset),this.uniforms.uAlphas=r.map(l=>l.alpha),this.uniforms.uNumStops=r.length,this._stops=r}set type(t){this.uniforms.uType=t}get type(){return this.uniforms.uType}set angle(t){this.uniforms.uAngle=t-Zd}get angle(){return this.uniforms.uAngle+Zd}set alpha(t){this.uniforms.uAlpha=t}get alpha(){return this.uniforms.uAlpha}set maxColors(t){this.uniforms.uMaxColors=t}get maxColors(){return this.uniforms.uMaxColors}};let Ea=vl;Ea.LINEAR=0,Ea.RADIAL=1,Ea.CONIC=2,Ea.defaults={type:vl.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var Yw=`attribute vec2 aVertexPosition;
837
+ `,Pn=Pn||{};Pn.stringify=function(){var e={"visit_linear-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return e.visit_gradient(t)},"visit_radial-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return e.visit_gradient(t)},visit_gradient:function(t){var r=e.visit(t.orientation);return r&&(r+=", "),t.type+"("+r+e.visit(t.colorStops)+")"},visit_shape:function(t){var r=t.value,n=e.visit(t.at),s=e.visit(t.style);return s&&(r+=" "+s),n&&(r+=" at "+n),r},"visit_default-radial":function(t){var r="",n=e.visit(t.at);return n&&(r+=n),r},"visit_extent-keyword":function(t){var r=t.value,n=e.visit(t.at);return n&&(r+=" at "+n),r},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return e.visit(t.value.x)+" "+e.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_literal:function(t){return e.visit_color(t.value,t)},visit_hex:function(t){return e.visit_color("#"+t.value,t)},visit_rgb:function(t){return e.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return e.visit_color("rgba("+t.value.join(", ")+")",t)},visit_color:function(t,r){var n=t,s=e.visit(r.length);return s&&(n+=" "+s),n},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var r="",n=t.length;return t.forEach(function(s,a){r+=e.visit(s),a<n-1&&(r+=", ")}),r},visit:function(t){if(!t)return"";var r="";if(t instanceof Array)return e.visit_array(t,r);if(t.type){var n=e["visit_"+t.type];if(n)return n(t);throw Error("Missing visitor visit_"+t.type)}else throw Error("Invalid node.")}};return function(t){return e.visit(t)}}();var Pn=Pn||{};Pn.parse=function(){var e={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function r(G){var rt=new Error(t+": "+G);throw rt.source=t,rt}function n(){var G=s();return t.length>0&&r("Invalid input not EOF"),G}function s(){return A(a)}function a(){return u("linear-gradient",e.linearGradient,c)||u("repeating-linear-gradient",e.repeatingLinearGradient,c)||u("radial-gradient",e.radialGradient,m)||u("repeating-radial-gradient",e.repeatingRadialGradient,m)}function u(G,rt,gt){return l(rt,function(H){var K=gt();return K&&(bt(e.comma)||r("Missing comma before color stops")),{type:G,orientation:K,colorStops:A(R)}})}function l(G,rt){var gt=bt(G);if(gt){bt(e.startCall)||r("Missing (");var H=rt(gt);return bt(e.endCall)||r("Missing )"),H}}function c(){return f()||p()}function f(){return j("directional",e.sideOrCorner,1)}function p(){return j("angular",e.angleValue,1)}function m(){var G,rt=g(),gt;return rt&&(G=[],G.push(rt),gt=t,bt(e.comma)&&(rt=g(),rt?G.push(rt):t=gt)),G}function g(){var G=x()||y();if(G)G.at=T();else{var rt=S();if(rt){G=rt;var gt=T();gt&&(G.at=gt)}else{var H=w();H&&(G={type:"default-radial",at:H})}}return G}function x(){var G=j("shape",/^(circle)/i,0);return G&&(G.style=V()||S()),G}function y(){var G=j("shape",/^(ellipse)/i,0);return G&&(G.style=tt()||S()),G}function S(){return j("extent-keyword",e.extentKeywords,1)}function T(){if(j("position",/^at/,0)){var G=w();return G||r("Missing positioning value"),G}}function w(){var G=I();if(G.x||G.y)return{type:"position",value:G}}function I(){return{x:tt(),y:tt()}}function A(G){var rt=G(),gt=[];if(rt)for(gt.push(rt);bt(e.comma);)rt=G(),rt?gt.push(rt):r("One extra comma");return gt}function R(){var G=N();return G||r("Expected color definition"),G.length=tt(),G}function N(){return L()||z()||O()||B()}function B(){return j("literal",e.literalColor,0)}function L(){return j("hex",e.hexColor,1)}function O(){return l(e.rgbColor,function(){return{type:"rgb",value:A(X)}})}function z(){return l(e.rgbaColor,function(){return{type:"rgba",value:A(X)}})}function X(){return bt(e.number)[1]}function tt(){return j("%",e.percentageValue,1)||st()||V()}function st(){return j("position-keyword",e.positionKeywords,1)}function V(){return j("px",e.pixelValue,1)||j("em",e.emValue,1)}function j(G,rt,gt){var H=bt(rt);if(H)return{type:G,value:H[gt]}}function bt(G){var rt,gt;return gt=/^[\n\r\t\s]+/.exec(t),gt&&kt(gt[0].length),rt=G.exec(t),rt&&kt(rt[0].length),rt}function kt(G){t=t.substr(G)}return function(G){return t=G.toString(),n()}}();var Iw=Pn.parse;Pn.stringify;var Xd={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Wd={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Rw(e){var t,r=[],n=1,s;if(typeof e=="string")if(Xd[e])r=Xd[e].slice(),s="rgb";else if(e==="transparent")n=0,s="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var a=e.slice(1),u=a.length,l=u<=4;n=1,l?(r=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],u===4&&(n=parseInt(a[3]+a[3],16)/255)):(r=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],u===8&&(n=parseInt(a[6]+a[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),s="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var c=t[1],f=c==="rgb",a=c.replace(/a$/,"");s=a;var u=a==="cmyk"?4:a==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(g,x){if(/%$/.test(g))return x===u?parseFloat(g)/100:a==="rgb"?parseFloat(g)*255/100:parseFloat(g);if(a[x]==="h"){if(/deg$/.test(g))return parseFloat(g);if(Wd[g]!==void 0)return Wd[g]}return parseFloat(g)}),c===a&&r.push(1),n=f||r[u]===void 0?1:r[u],r=r.slice(0,u)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(p){return parseFloat(p)}),s=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],s="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(s="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(s="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(s="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:s,values:r,alpha:n}}var pl={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},gl={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,s,a,u,l,c;if(r===0)return c=n*255,[c,c,c];n<.5?a=n*(1+r):a=n+r-n*r,s=2*n-a,l=[0,0,0];for(var f=0;f<3;f++)u=t+1/3*-(f-1),u<0?u++:u>1&&u--,6*u<1?c=s+(a-s)*6*u:2*u<1?c=a:3*u<2?c=s+(a-s)*(2/3-u)*6:c=s,l[f]=c*255;return l}};pl.hsl=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,s=Math.min(t,r,n),a=Math.max(t,r,n),u=a-s,l,c,f;return a===s?l=0:t===a?l=(r-n)/u:r===a?l=2+(n-t)/u:n===a&&(l=4+(t-r)/u),l=Math.min(l*60,360),l<0&&(l+=360),f=(s+a)/2,a===s?c=0:f<=.5?c=u/(a+s):c=u/(2-a-s),[l,c*100,f*100]};function Pw(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments));var t,r=Rw(e);if(!r.space)return[];const n=r.space[0]==="h"?gl.min:pl.min,s=r.space[0]==="h"?gl.max:pl.max;return t=Array(3),t[0]=Math.min(Math.max(r.values[0],n[0]),s[0]),t[1]=Math.min(Math.max(r.values[1],n[1]),s[1]),t[2]=Math.min(Math.max(r.values[2],n[2]),s[2]),r.space[0]==="h"&&(t=gl.rgb(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t}function qd(e){switch(typeof e){case"string":return Mw(e);case"number":return na(e);default:return e}}function Mw(e){const t=Pw(e);if(!t)throw new Error(`Unable to parse color "${e}" as RGBA.`);return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function Ow(e){const t=Iw(Gw(e));if(t.length===0)throw new Error("Invalid CSS gradient.");if(t.length!==1)throw new Error("Unsupported CSS gradient (multiple gradients is not supported).");const r=t[0],n=Fw(r.type),s=Nw(r.colorStops),a=Uw(r.orientation);return{type:n,stops:s,angle:a}}function Fw(e){const t={"linear-gradient":0,"radial-gradient":1};if(!(e in t))throw new Error(`Unsupported gradient type "${e}"`);return t[e]}function Nw(e){const t=Bw(e),r=[];for(let n=0;n<e.length;n++){const s=Lw(e[n]);r.push({offset:t[n],color:s.slice(0,3),alpha:s[3]})}return r}function Lw(e){return qd(kw(e))}function kw(e){switch(e.type){case"hex":return`#${e.value}`;case"literal":return e.value;default:return`${e.type}(${e.value.join(",")})`}}function Bw(e){const t=[];for(let s=0;s<e.length;s++){const a=e[s];let u=-1;a.type==="literal"&&a.length&&"type"in a.length&&a.length.type==="%"&&"value"in a.length&&(u=parseFloat(a.length.value)/100),t.push(u)}const r=s=>{for(let a=s;a<t.length;a++)if(t[a]!==-1)return{indexDelta:a-s,offset:t[a]};return{indexDelta:t.length-1-s,offset:1}};let n=0;for(let s=0;s<t.length;s++){const a=t[s];if(a!==-1)n=a;else if(s===0)t[s]=0;else if(s+1===t.length)t[s]=1;else{const u=r(s),l=(u.offset-n)/(1+u.indexDelta);for(let c=0;c<=u.indexDelta;c++)t[s+c]=n+(c+1)*l;s+=u.indexDelta,n=t[s]}}return t.map(Dw)}function Dw(e){return e.toString().length>6?parseFloat(e.toString().substring(0,6)):e}function Uw(e){if(typeof e>"u")return 0;if("type"in e&&"value"in e)switch(e.type){case"angular":return parseFloat(e.value);case"directional":return $w(e.value)}return 0}function $w(e){const t={left:270,top:0,bottom:180,right:90,"left top":315,"top left":315,"left bottom":225,"bottom left":225,"right top":45,"top right":45,"right bottom":135,"bottom right":135};if(!(e in t))throw new Error(`Unsupported directional value "${e}"`);return t[e]}function Gw(e){let t=e.replace(/\s{2,}/gu," ");return t=t.replace(/;/g,""),t=t.replace(/ ,/g,","),t=t.replace(/\( /g,"("),t=t.replace(/ \)/g,")"),t.trim()}var zw=Object.defineProperty,Hw=Object.defineProperties,Vw=Object.getOwnPropertyDescriptors,Yd=Object.getOwnPropertySymbols,jw=Object.prototype.hasOwnProperty,Xw=Object.prototype.propertyIsEnumerable,Kd=(e,t,r)=>t in e?zw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ml=(e,t)=>{for(var r in t||(t={}))jw.call(t,r)&&Kd(e,r,t[r]);if(Yd)for(var r of Yd(t))Xw.call(t,r)&&Kd(e,r,t[r]);return e},Ww=(e,t)=>Hw(e,Vw(t));const Zd=90;function qw(e){return[...e].sort((t,r)=>t.offset-r.offset)}const vl=class extends Dt{constructor(t){t&&"css"in t&&(t=Ww(ml({},Ow(t.css||"")),{alpha:t.alpha,maxColors:t.maxColors}));const r=ml(ml({},vl.defaults),t);if(!r.stops||r.stops.length<2)throw new Error("ColorGradientFilter requires at least 2 color stops.");super(Ew,Cw),this._stops=[],this.autoFit=!1,Object.assign(this,r)}get stops(){return this._stops}set stops(t){const r=qw(t),n=new Float32Array(r.length*3),s=0,a=1,u=2;for(let l=0;l<r.length;l++){const c=qd(r[l].color),f=l*3;n[f+s]=c[s],n[f+a]=c[a],n[f+u]=c[u]}this.uniforms.uColors=n,this.uniforms.uOffsets=r.map(l=>l.offset),this.uniforms.uAlphas=r.map(l=>l.alpha),this.uniforms.uNumStops=r.length,this._stops=r}set type(t){this.uniforms.uType=t}get type(){return this.uniforms.uType}set angle(t){this.uniforms.uAngle=t-Zd}get angle(){return this.uniforms.uAngle+Zd}set alpha(t){this.uniforms.uAlpha=t}get alpha(){return this.uniforms.uAlpha}set maxColors(t){this.uniforms.uMaxColors=t}get maxColors(){return this.uniforms.uMaxColors}};let Ea=vl;Ea.LINEAR=0,Ea.RADIAL=1,Ea.CONIC=2,Ea.defaults={type:vl.LINEAR,stops:[{offset:0,color:16711680,alpha:1},{offset:1,color:255,alpha:1}],alpha:1,angle:90,maxColors:0};var Yw=`attribute vec2 aVertexPosition;
838
838
  attribute vec2 aTextureCoord;
839
839
 
840
840
  uniform mat3 projectionMatrix;
@@ -980,7 +980,7 @@ void main(void){
980
980
  sample *= alpha;
981
981
 
982
982
  gl_FragColor = sample;
983
- }`,nS=Object.defineProperty,Qd=Object.getOwnPropertySymbols,iS=Object.prototype.hasOwnProperty,sS=Object.prototype.propertyIsEnumerable,tp=(e,t,r)=>t in e?nS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ep=(e,t)=>{for(var r in t||(t={}))iS.call(t,r)&&tp(e,r,t[r]);if(Qd)for(var r of Qd(t))sS.call(t,r)&&tp(e,r,t[r]);return e};const yl=class extends Dt{constructor(t){super(),this.angle=45,this._distance=5,this._resolution=_t.FILTER_RESOLUTION;const r=t?ep(ep({},yl.defaults),t):yl.defaults,{kernels:n,blur:s,quality:a,pixelSize:u,resolution:l}=r;this._offset=new In(this._updatePadding,this),this._tintFilter=new Dt(eS,rS),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=this._offset,this._tintFilter.resolution=l,this._blurFilter=n?new hs(n):new hs(s,a),this.pixelSize=u,this.resolution=l;const{shadowOnly:c,rotation:f,distance:p,offset:m,alpha:g,color:x}=r;this.shadowOnly=c,f!==void 0&&p!==void 0?(this.rotation=f,this.distance=p):this.offset=m,this.alpha=g,this.color=x}apply(t,r,n,s){const a=t.getFilterTexture();this._tintFilter.apply(t,r,a,1),this._blurFilter.apply(t,a,n,s),this.shadowOnly!==!0&&t.applyFilter(this,r,n,0),t.returnFilterTexture(a)}_updatePadding(){const t=Math.max(Math.abs(this._offset.x),Math.abs(this._offset.y));this.padding=t+this.blur*2}_updateShift(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))}set offset(t){this._offset.copyFrom(t),this._updatePadding()}get offset(){return this._offset}get resolution(){return this._resolution}set resolution(t){this._resolution=t,this._tintFilter&&(this._tintFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)}get distance(){return this._distance}set distance(t){Rt("5.3.0","DropShadowFilter distance is deprecated, use offset"),this._distance=t,this._updatePadding(),this._updateShift()}get rotation(){return this.angle/ns}set rotation(t){Rt("5.3.0","DropShadowFilter rotation is deprecated, use offset"),this.angle=t*ns,this._updateShift()}get alpha(){return this._tintFilter.uniforms.alpha}set alpha(t){this._tintFilter.uniforms.alpha=t}get color(){return Gu(this._tintFilter.uniforms.color)}set color(t){na(t,this._tintFilter.uniforms.color)}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get blur(){return this._blurFilter.blur}set blur(t){this._blurFilter.blur=t,this._updatePadding()}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){this._blurFilter.pixelSize=t}};let aS=yl;aS.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:_t.FILTER_RESOLUTION};var oS=`attribute vec2 aVertexPosition;
983
+ }`,nS=Object.defineProperty,Qd=Object.getOwnPropertySymbols,iS=Object.prototype.hasOwnProperty,sS=Object.prototype.propertyIsEnumerable,tp=(e,t,r)=>t in e?nS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ep=(e,t)=>{for(var r in t||(t={}))iS.call(t,r)&&tp(e,r,t[r]);if(Qd)for(var r of Qd(t))sS.call(t,r)&&tp(e,r,t[r]);return e};const yl=class extends Dt{constructor(t){super(),this.angle=45,this._distance=5,this._resolution=xt.FILTER_RESOLUTION;const r=t?ep(ep({},yl.defaults),t):yl.defaults,{kernels:n,blur:s,quality:a,pixelSize:u,resolution:l}=r;this._offset=new In(this._updatePadding,this),this._tintFilter=new Dt(eS,rS),this._tintFilter.uniforms.color=new Float32Array(4),this._tintFilter.uniforms.shift=this._offset,this._tintFilter.resolution=l,this._blurFilter=n?new hs(n):new hs(s,a),this.pixelSize=u,this.resolution=l;const{shadowOnly:c,rotation:f,distance:p,offset:m,alpha:g,color:x}=r;this.shadowOnly=c,f!==void 0&&p!==void 0?(this.rotation=f,this.distance=p):this.offset=m,this.alpha=g,this.color=x}apply(t,r,n,s){const a=t.getFilterTexture();this._tintFilter.apply(t,r,a,1),this._blurFilter.apply(t,a,n,s),this.shadowOnly!==!0&&t.applyFilter(this,r,n,0),t.returnFilterTexture(a)}_updatePadding(){const t=Math.max(Math.abs(this._offset.x),Math.abs(this._offset.y));this.padding=t+this.blur*2}_updateShift(){this._tintFilter.uniforms.shift.set(this.distance*Math.cos(this.angle),this.distance*Math.sin(this.angle))}set offset(t){this._offset.copyFrom(t),this._updatePadding()}get offset(){return this._offset}get resolution(){return this._resolution}set resolution(t){this._resolution=t,this._tintFilter&&(this._tintFilter.resolution=t),this._blurFilter&&(this._blurFilter.resolution=t)}get distance(){return this._distance}set distance(t){Rt("5.3.0","DropShadowFilter distance is deprecated, use offset"),this._distance=t,this._updatePadding(),this._updateShift()}get rotation(){return this.angle/ns}set rotation(t){Rt("5.3.0","DropShadowFilter rotation is deprecated, use offset"),this.angle=t*ns,this._updateShift()}get alpha(){return this._tintFilter.uniforms.alpha}set alpha(t){this._tintFilter.uniforms.alpha=t}get color(){return Gu(this._tintFilter.uniforms.color)}set color(t){na(t,this._tintFilter.uniforms.color)}get kernels(){return this._blurFilter.kernels}set kernels(t){this._blurFilter.kernels=t}get blur(){return this._blurFilter.blur}set blur(t){this._blurFilter.blur=t,this._updatePadding()}get quality(){return this._blurFilter.quality}set quality(t){this._blurFilter.quality=t}get pixelSize(){return this._blurFilter.pixelSize}set pixelSize(t){this._blurFilter.pixelSize=t}};let aS=yl;aS.defaults={offset:{x:4,y:4},color:0,alpha:.5,shadowOnly:!1,kernels:null,blur:2,quality:3,pixelSize:1,resolution:xt.FILTER_RESOLUTION};var oS=`attribute vec2 aVertexPosition;
984
984
  attribute vec2 aTextureCoord;
985
985
 
986
986
  uniform mat3 projectionMatrix;
@@ -1087,7 +1087,7 @@ void main(void)
1087
1087
  gl_FragColor.b = texture2D(uSampler, coord + blue * (1.0 - seed * 0.2) / filterArea.xy).b;
1088
1088
  gl_FragColor.a = texture2D(uSampler, coord).a;
1089
1089
  }
1090
- `;const _l=class extends Dt{constructor(t){super(oS,uS),this.offset=100,this.fillMode=_l.TRANSPARENT,this.average=!1,this.seed=0,this.minSize=8,this.sampleSize=512,this._slices=0,this._offsets=new Float32Array(1),this._sizes=new Float32Array(1),this._direction=-1,this.uniforms.dimensions=new Float32Array(2),this._canvas=document.createElement("canvas"),this._canvas.width=4,this._canvas.height=this.sampleSize,this.texture=Ot.from(this._canvas,{scaleMode:Sr.NEAREST}),Object.assign(this,_l.defaults,t)}apply(t,r,n,s){const{width:a,height:u}=r.filterFrame;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,this.uniforms.aspect=u/a,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,t.applyFilter(this,r,n,s)}_randomizeSizes(){const t=this._sizes,r=this._slices-1,n=this.sampleSize,s=Math.min(this.minSize/n,.9/this._slices);if(this.average){const a=this._slices;let u=1;for(let l=0;l<r;l++){const c=u/(a-l),f=Math.max(c*(1-Math.random()*.6),s);t[l]=f,u-=f}t[r]=u}else{let a=1;const u=Math.sqrt(1/this._slices);for(let l=0;l<r;l++){const c=Math.max(u*a*Math.random(),s);t[l]=c,a-=c}t[r]=a}this.shuffle()}shuffle(){const t=this._sizes,r=this._slices-1;for(let n=r;n>0;n--){const s=Math.random()*n>>0,a=t[n];t[n]=t[s],t[s]=a}}_randomizeOffsets(){for(let t=0;t<this._slices;t++)this._offsets[t]=Math.random()*(Math.random()<.5?-1:1)}refresh(){this._randomizeSizes(),this._randomizeOffsets(),this.redraw()}redraw(){const t=this.sampleSize,r=this.texture,n=this._canvas.getContext("2d");n.clearRect(0,0,8,t);let s,a=0;for(let u=0;u<this._slices;u++){s=Math.floor(this._offsets[u]*256);const l=this._sizes[u]*t,c=s>0?s:0,f=s<0?-s:0;n.fillStyle=`rgba(${c}, ${f}, 0, 1)`,n.fillRect(0,a>>0,t,l+1>>0),a+=l}r.baseTexture.update(),this.uniforms.displacementMap=r}set sizes(t){const r=Math.min(this._slices,t.length);for(let n=0;n<r;n++)this._sizes[n]=t[n]}get sizes(){return this._sizes}set offsets(t){const r=Math.min(this._slices,t.length);for(let n=0;n<r;n++)this._offsets[n]=t[n]}get offsets(){return this._offsets}get slices(){return this._slices}set slices(t){this._slices!==t&&(this._slices=t,this.uniforms.slices=t,this._sizes=this.uniforms.slicesWidth=new Float32Array(t),this._offsets=this.uniforms.slicesOffset=new Float32Array(t),this.refresh())}get direction(){return this._direction}set direction(t){if(this._direction===t)return;this._direction=t;const r=t*ns;this.uniforms.sinDir=Math.sin(r),this.uniforms.cosDir=Math.cos(r)}get red(){return this.uniforms.red}set red(t){this.uniforms.red=t}get green(){return this.uniforms.green}set green(t){this.uniforms.green=t}get blue(){return this.uniforms.blue}set blue(t){this.uniforms.blue=t}destroy(){var t;(t=this.texture)==null||t.destroy(!0),this.texture=this._canvas=this.red=this.green=this.blue=this._sizes=this._offsets=null}};let pi=_l;pi.defaults={slices:5,offset:100,direction:0,fillMode:0,average:!1,seed:0,red:[0,0],green:[0,0],blue:[0,0],minSize:8,sampleSize:512},pi.TRANSPARENT=0,pi.ORIGINAL=1,pi.LOOP=2,pi.CLAMP=3,pi.MIRROR=4;var lS=`attribute vec2 aVertexPosition;
1090
+ `;const _l=class extends Dt{constructor(t){super(oS,uS),this.offset=100,this.fillMode=_l.TRANSPARENT,this.average=!1,this.seed=0,this.minSize=8,this.sampleSize=512,this._slices=0,this._offsets=new Float32Array(1),this._sizes=new Float32Array(1),this._direction=-1,this.uniforms.dimensions=new Float32Array(2),this._canvas=document.createElement("canvas"),this._canvas.width=4,this._canvas.height=this.sampleSize,this.texture=Mt.from(this._canvas,{scaleMode:Sr.NEAREST}),Object.assign(this,_l.defaults,t)}apply(t,r,n,s){const{width:a,height:u}=r.filterFrame;this.uniforms.dimensions[0]=a,this.uniforms.dimensions[1]=u,this.uniforms.aspect=u/a,this.uniforms.seed=this.seed,this.uniforms.offset=this.offset,this.uniforms.fillMode=this.fillMode,t.applyFilter(this,r,n,s)}_randomizeSizes(){const t=this._sizes,r=this._slices-1,n=this.sampleSize,s=Math.min(this.minSize/n,.9/this._slices);if(this.average){const a=this._slices;let u=1;for(let l=0;l<r;l++){const c=u/(a-l),f=Math.max(c*(1-Math.random()*.6),s);t[l]=f,u-=f}t[r]=u}else{let a=1;const u=Math.sqrt(1/this._slices);for(let l=0;l<r;l++){const c=Math.max(u*a*Math.random(),s);t[l]=c,a-=c}t[r]=a}this.shuffle()}shuffle(){const t=this._sizes,r=this._slices-1;for(let n=r;n>0;n--){const s=Math.random()*n>>0,a=t[n];t[n]=t[s],t[s]=a}}_randomizeOffsets(){for(let t=0;t<this._slices;t++)this._offsets[t]=Math.random()*(Math.random()<.5?-1:1)}refresh(){this._randomizeSizes(),this._randomizeOffsets(),this.redraw()}redraw(){const t=this.sampleSize,r=this.texture,n=this._canvas.getContext("2d");n.clearRect(0,0,8,t);let s,a=0;for(let u=0;u<this._slices;u++){s=Math.floor(this._offsets[u]*256);const l=this._sizes[u]*t,c=s>0?s:0,f=s<0?-s:0;n.fillStyle=`rgba(${c}, ${f}, 0, 1)`,n.fillRect(0,a>>0,t,l+1>>0),a+=l}r.baseTexture.update(),this.uniforms.displacementMap=r}set sizes(t){const r=Math.min(this._slices,t.length);for(let n=0;n<r;n++)this._sizes[n]=t[n]}get sizes(){return this._sizes}set offsets(t){const r=Math.min(this._slices,t.length);for(let n=0;n<r;n++)this._offsets[n]=t[n]}get offsets(){return this._offsets}get slices(){return this._slices}set slices(t){this._slices!==t&&(this._slices=t,this.uniforms.slices=t,this._sizes=this.uniforms.slicesWidth=new Float32Array(t),this._offsets=this.uniforms.slicesOffset=new Float32Array(t),this.refresh())}get direction(){return this._direction}set direction(t){if(this._direction===t)return;this._direction=t;const r=t*ns;this.uniforms.sinDir=Math.sin(r),this.uniforms.cosDir=Math.cos(r)}get red(){return this.uniforms.red}set red(t){this.uniforms.red=t}get green(){return this.uniforms.green}set green(t){this.uniforms.green=t}get blue(){return this.uniforms.blue}set blue(t){this.uniforms.blue=t}destroy(){var t;(t=this.texture)==null||t.destroy(!0),this.texture=this._canvas=this.red=this.green=this.blue=this._sizes=this._offsets=null}};let pi=_l;pi.defaults={slices:5,offset:100,direction:0,fillMode:0,average:!1,seed:0,red:[0,0],green:[0,0],blue:[0,0],minSize:8,sampleSize:512},pi.TRANSPARENT=0,pi.ORIGINAL=1,pi.LOOP=2,pi.CLAMP=3,pi.MIRROR=4;var lS=`attribute vec2 aVertexPosition;
1091
1091
  attribute vec2 aTextureCoord;
1092
1092
 
1093
1093
  uniform mat3 projectionMatrix;
@@ -1920,7 +1920,7 @@ void main() {
1920
1920
  vec3 color = texColor.rgb;
1921
1921
  gl_FragColor = vec4(uNightVisionMatrix * vec3(color), texColor.a);
1922
1922
  }
1923
- `),t=[.393,.769,.189,.349,.686,.168,.272,.534,.131];return e.uniforms.uNightVisionMatrix=t,{nightVisionFilter:e}},pp=st.forwardRef((e,t)=>{const r=W.useRef(null),n=W.useRef(null),{src:s,visible:a,transformation:{x:u,y:l,width:c,height:f,anchor:p,colorCorrection:m={},effect:g},pointerdown:x}=e,{blurRadius:y=0}=m,{temperatureFilter:S,sharpnessFilter:T,hueFilter:w,blurFilter:I,adjustmentFilter:A}=cs(m),{nightVisionFilter:R}=VS();return st.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),Mt.jsx(Wn,{...e,ref:t,children:Mt.jsx(Yt.Container,{ref:n,children:Mt.jsx(Yt.Sprite,{image:s,width:c,height:f,anchor:p,ref:r,alpha:a?1:0,x:u,y:l,...a&&{interactive:!0,pointerdown:x},filters:[S,T,w,A,...y>0?[I]:[],...g===pn.NightVision?[R]:[]]})})})});pp.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const Ra={build(e){const t=e.points;let r,n,s,a,u,l;if(e.type===xe.CIRC){const y=e.shape;r=y.x,n=y.y,u=l=y.radius,s=a=0}else if(e.type===xe.ELIP){const y=e.shape;r=y.x,n=y.y,u=y.width,l=y.height,s=a=0}else{const y=e.shape,S=y.width/2,T=y.height/2;r=y.x+S,n=y.y+T,u=l=Math.max(0,Math.min(y.radius,Math.min(S,T))),s=S-u,a=T-l}if(!(u>=0&&l>=0&&s>=0&&a>=0)){t.length=0;return}const c=Math.ceil(2.3*Math.sqrt(u+l)),f=c*8+(s?4:0)+(a?4:0);if(t.length=f,f===0)return;if(c===0){t.length=8,t[0]=t[6]=r+s,t[1]=t[3]=n+a,t[2]=t[4]=r-s,t[5]=t[7]=n-a;return}let p=0,m=c*4+(s?2:0)+2,g=m,x=f;{const y=s+u,S=a,T=r+y,w=r-y,I=n+S;if(t[p++]=T,t[p++]=I,t[--m]=I,t[--m]=w,a){const A=n-S;t[g++]=w,t[g++]=A,t[--x]=A,t[--x]=T}}for(let y=1;y<c;y++){const S=Math.PI/2*(y/c),T=s+Math.cos(S)*u,w=a+Math.sin(S)*l,I=r+T,A=r-T,R=n+w,N=n-w;t[p++]=I,t[p++]=R,t[--m]=R,t[--m]=A,t[g++]=A,t[g++]=N,t[--x]=N,t[--x]=I}{const y=s,S=a+l,T=r+y,w=r-y,I=n+S,A=n-S;t[p++]=T,t[p++]=I,t[--x]=A,t[--x]=T,s&&(t[p++]=w,t[p++]=I,t[--x]=A,t[--x]=w)}},triangulate(e,t){const r=e.points,n=t.points,s=t.indices;if(r.length===0)return;let a=n.length/2;const u=a;let l,c;if(e.type!==xe.RREC){const p=e.shape;l=p.x,c=p.y}else{const p=e.shape;l=p.x+p.width/2,c=p.y+p.height/2}const f=e.matrix;n.push(e.matrix?f.a*l+f.c*c+f.tx:l,e.matrix?f.b*l+f.d*c+f.ty:c),a++,n.push(r[0],r[1]);for(let p=2;p<r.length;p+=2)n.push(r[p],r[p+1]),s.push(a++,u,a);s.push(u+1,u,a)}};function gp(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let s=0,a=e[r-2],u=e[r-1];s<r;s+=2){const l=e[s],c=e[s+1];n+=(l-a)*(c+u),a=l,u=c}if(!t&&n>0||t&&n<=0){const s=r/2;for(let a=s+s%2;a<r;a+=2){const u=r-a-2,l=r-a-1,c=a,f=a+1;[e[u],e[c]]=[e[c],e[u]],[e[l],e[f]]=[e[f],e[l]]}}}const mp={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let r=e.points;const n=e.holes,s=t.points,a=t.indices;if(r.length>=6){gp(r,!1);const u=[];for(let f=0;f<n.length;f++){const p=n[f];gp(p.points,!0),u.push(r.length/2),r=r.concat(p.points)}const l=Px(r,u,2);if(!l)return;const c=s.length/2;for(let f=0;f<l.length;f+=3)a.push(l[f]+c),a.push(l[f+1]+c),a.push(l[f+2]+c);for(let f=0;f<r.length;f++)s.push(r[f])}}},jS={build(e){const t=e.shape,r=t.x,n=t.y,s=t.width,a=t.height,u=e.points;u.length=0,s>=0&&a>=0&&u.push(r,n,r+s,n,r+s,n+a,r,n+a)},triangulate(e,t){const r=e.points,n=t.points;if(r.length===0)return;const s=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),t.indices.push(s,s+1,s+2,s+1,s+2,s+3)}},XS={build(e){Ra.build(e)},triangulate(e,t){Ra.triangulate(e,t)}};var cr=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(cr||{}),Mn=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(Mn||{});const gi={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(e,t=20){if(!this.adaptive||!e||isNaN(e))return t;let r=Math.ceil(e/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}};class vp{static curveTo(t,r,n,s,a,u){const l=u[u.length-2],f=u[u.length-1]-r,p=l-t,m=s-r,g=n-t,x=Math.abs(f*g-p*m);if(x<1e-8||a===0)return(u[u.length-2]!==t||u[u.length-1]!==r)&&u.push(t,r),null;const y=f*f+p*p,S=m*m+g*g,T=f*m+p*g,w=a*Math.sqrt(y)/x,I=a*Math.sqrt(S)/x,A=w*T/y,R=I*T/S,N=w*g+I*p,B=w*m+I*f,L=p*(I+A),O=f*(I+A),z=g*(w+R),X=m*(w+R),tt=Math.atan2(O-B,L-N),it=Math.atan2(X-B,z-N);return{cx:N+t,cy:B+r,radius:a,startAngle:tt,endAngle:it,anticlockwise:p*m>g*f}}static arc(t,r,n,s,a,u,l,c,f){const p=l-u,m=gi._segmentsCount(Math.abs(p)*a,Math.ceil(Math.abs(p)/la)*40),g=p/(m*2),x=g*2,y=Math.cos(g),S=Math.sin(g),T=m-1,w=T%1/T;for(let I=0;I<=T;++I){const A=I+w*I,R=g+u+x*A,N=Math.cos(R),B=-Math.sin(R);f.push((y*N+S*B)*a+n,(y*-B+S*N)*a+s)}}}class WS{constructor(){this.reset()}begin(t,r,n){this.reset(),this.style=t,this.start=r,this.attribStart=n}end(t,r){this.attribSize=r-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class xl{static curveLength(t,r,n,s,a,u,l,c){let p=0,m=0,g=0,x=0,y=0,S=0,T=0,w=0,I=0,A=0,R=0,N=t,B=r;for(let L=1;L<=10;++L)m=L/10,g=m*m,x=g*m,y=1-m,S=y*y,T=S*y,w=T*t+3*S*m*n+3*y*g*a+x*l,I=T*r+3*S*m*s+3*y*g*u+x*c,A=N-w,R=B-I,N=w,B=I,p+=Math.sqrt(A*A+R*R);return p}static curveTo(t,r,n,s,a,u,l){const c=l[l.length-2],f=l[l.length-1];l.length-=2;const p=gi._segmentsCount(xl.curveLength(c,f,t,r,n,s,a,u));let m=0,g=0,x=0,y=0,S=0;l.push(c,f);for(let T=1,w=0;T<=p;++T)w=T/p,m=1-w,g=m*m,x=g*m,y=w*w,S=y*w,l.push(x*c+3*g*w*t+3*m*y*n+S*a,x*f+3*g*w*r+3*m*y*s+S*u)}}function yp(e,t,r,n,s,a,u,l){const c=e-r*s,f=t-n*s,p=e+r*a,m=t+n*a;let g,x;u?(g=n,x=-r):(g=-n,x=r);const y=c+g,S=f+x,T=p+g,w=m+x;return l.push(y,S,T,w),2}function On(e,t,r,n,s,a,u,l){const c=r-e,f=n-t;let p=Math.atan2(c,f),m=Math.atan2(s-e,a-t);l&&p<m?p+=Math.PI*2:!l&&p>m&&(m+=Math.PI*2);let g=p;const x=m-p,y=Math.abs(x),S=Math.sqrt(c*c+f*f),T=(15*y*Math.sqrt(S)/Math.PI>>0)+1,w=x/T;if(g+=w,l){u.push(e,t,r,n);for(let I=1,A=g;I<T;I++,A+=w)u.push(e,t,e+Math.sin(A)*S,t+Math.cos(A)*S);u.push(e,t,s,a)}else{u.push(r,n,e,t);for(let I=1,A=g;I<T;I++,A+=w)u.push(e+Math.sin(A)*S,t+Math.cos(A)*S,e,t);u.push(s,a,e,t)}return T*2}function qS(e,t){const r=e.shape;let n=e.points||r.points.slice();const s=t.closePointEps;if(n.length===0)return;const a=e.lineStyle,u=new Wt(n[0],n[1]),l=new Wt(n[n.length-2],n[n.length-1]),c=r.type!==xe.POLY||r.closeStroke,f=Math.abs(u.x-l.x)<s&&Math.abs(u.y-l.y)<s;if(c){n=n.slice(),f&&(n.pop(),n.pop(),l.set(n[n.length-2],n[n.length-1]));const G=(u.x+l.x)*.5,rt=(l.y+u.y)*.5;n.unshift(G,rt),n.push(G,rt)}const p=t.points,m=n.length/2;let g=n.length;const x=p.length/2,y=a.width/2,S=y*y,T=a.miterLimit*a.miterLimit;let w=n[0],I=n[1],A=n[2],R=n[3],N=0,B=0,L=-(I-R),O=w-A,z=0,X=0,tt=Math.sqrt(L*L+O*O);L/=tt,O/=tt,L*=y,O*=y;const it=a.alignment,V=(1-it)*2,j=it*2;c||(a.cap===Mn.ROUND?g+=On(w-L*(V-j)*.5,I-O*(V-j)*.5,w-L*V,I-O*V,w+L*j,I+O*j,p,!0)+2:a.cap===Mn.SQUARE&&(g+=yp(w,I,L,O,V,j,!0,p))),p.push(w-L*V,I-O*V,w+L*j,I+O*j);for(let G=1;G<m-1;++G){w=n[(G-1)*2],I=n[(G-1)*2+1],A=n[G*2],R=n[G*2+1],N=n[(G+1)*2],B=n[(G+1)*2+1],L=-(I-R),O=w-A,tt=Math.sqrt(L*L+O*O),L/=tt,O/=tt,L*=y,O*=y,z=-(R-B),X=A-N,tt=Math.sqrt(z*z+X*X),z/=tt,X/=tt,z*=y,X*=y;const rt=A-w,gt=I-R,H=A-N,K=B-R,ct=rt*H+gt*K,yt=gt*H-K*rt,wt=yt<0;if(Math.abs(yt)<.001*Math.abs(ct)){p.push(A-L*V,R-O*V,A+L*j,R+O*j),ct>=0&&(a.join===cr.ROUND?g+=On(A,R,A-L*V,R-O*V,A-z*V,R-X*V,p,!1)+4:g+=2,p.push(A-z*j,R-X*j,A+z*V,R+X*V));continue}const Pt=(-L+w)*(-O+R)-(-L+A)*(-O+I),Ft=(-z+N)*(-X+R)-(-z+A)*(-X+B),Vt=(rt*Ft-H*Pt)/yt,Ut=(K*Pt-gt*Ft)/yt,Zt=(Vt-A)*(Vt-A)+(Ut-R)*(Ut-R),J=A+(Vt-A)*V,q=R+(Ut-R)*V,at=A-(Vt-A)*j,St=R-(Ut-R)*j,Et=Math.min(rt*rt+gt*gt,H*H+K*K),Jt=wt?V:j,gr=Et+Jt*Jt*S,Me=Zt<=gr;let $r=a.join;if($r===cr.MITER&&Zt/S>T&&($r=cr.BEVEL),Me)switch($r){case cr.MITER:{p.push(J,q,at,St);break}case cr.BEVEL:{wt?p.push(J,q,A+L*j,R+O*j,J,q,A+z*j,R+X*j):p.push(A-L*V,R-O*V,at,St,A-z*V,R-X*V,at,St),g+=2;break}case cr.ROUND:{wt?(p.push(J,q,A+L*j,R+O*j),g+=On(A,R,A+L*j,R+O*j,A+z*j,R+X*j,p,!0)+4,p.push(J,q,A+z*j,R+X*j)):(p.push(A-L*V,R-O*V,at,St),g+=On(A,R,A-L*V,R-O*V,A-z*V,R-X*V,p,!1)+4,p.push(A-z*V,R-X*V,at,St));break}}else{switch(p.push(A-L*V,R-O*V,A+L*j,R+O*j),$r){case cr.MITER:{wt?p.push(at,St,at,St):p.push(J,q,J,q),g+=2;break}case cr.ROUND:{wt?g+=On(A,R,A+L*j,R+O*j,A+z*j,R+X*j,p,!0)+2:g+=On(A,R,A-L*V,R-O*V,A-z*V,R-X*V,p,!1)+2;break}}p.push(A-z*V,R-X*V,A+z*j,R+X*j),g+=2}}w=n[(m-2)*2],I=n[(m-2)*2+1],A=n[(m-1)*2],R=n[(m-1)*2+1],L=-(I-R),O=w-A,tt=Math.sqrt(L*L+O*O),L/=tt,O/=tt,L*=y,O*=y,p.push(A-L*V,R-O*V,A+L*j,R+O*j),c||(a.cap===Mn.ROUND?g+=On(A-L*(V-j)*.5,R-O*(V-j)*.5,A-L*V,R-O*V,A+L*j,R+O*j,p,!1)+2:a.cap===Mn.SQUARE&&(g+=yp(A,R,L,O,V,j,!1,p)));const xt=t.indices,kt=gi.epsilon*gi.epsilon;for(let G=x;G<g+x-2;++G)w=p[G*2],I=p[G*2+1],A=p[(G+1)*2],R=p[(G+1)*2+1],N=p[(G+2)*2],B=p[(G+2)*2+1],!(Math.abs(w*(R-B)+A*(B-I)+N*(I-R))<kt)&&xt.push(G,G+1,G+2)}function YS(e,t){let r=0;const n=e.shape,s=e.points||n.points,a=n.type!==xe.POLY||n.closeStroke;if(s.length===0)return;const u=t.points,l=t.indices,c=s.length/2,f=u.length/2;let p=f;for(u.push(s[0],s[1]),r=1;r<c;r++)u.push(s[r*2],s[r*2+1]),l.push(p,p+1),p++;a&&l.push(p,f)}function _p(e,t){e.lineStyle.native?YS(e,t):qS(e,t)}class bl{static curveLength(t,r,n,s,a,u){const l=t-2*n+a,c=r-2*s+u,f=2*n-2*t,p=2*s-2*r,m=4*(l*l+c*c),g=4*(l*f+c*p),x=f*f+p*p,y=2*Math.sqrt(m+g+x),S=Math.sqrt(m),T=2*m*S,w=2*Math.sqrt(x),I=g/S;return(T*y+S*g*(y-w)+(4*x*m-g*g)*Math.log((2*S+I+y)/(I+w)))/(4*T)}static curveTo(t,r,n,s,a){const u=a[a.length-2],l=a[a.length-1],c=gi._segmentsCount(bl.curveLength(u,l,t,r,n,s));let f=0,p=0;for(let m=1;m<=c;++m){const g=m/c;f=u+(t-u)*g,p=l+(r-l)*g,a.push(f+(t+(n-t)*g-f)*g,p+(r+(s-r)*g-p)*g)}}}const Tl={[xe.POLY]:mp,[xe.CIRC]:Ra,[xe.ELIP]:Ra,[xe.RECT]:jS,[xe.RREC]:XS},xp=[],Pa=[];class wl{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(t){return this.minX>this.maxX||this.minY>this.maxY?jt.EMPTY:(t=t||new jt(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,r){const{a:n,b:s,c:a,d:u,tx:l,ty:c}=t,f=n*r.x+a*r.y+l,p=s*r.x+u*r.y+c;this.minX=Math.min(this.minX,f),this.maxX=Math.max(this.maxX,f),this.minY=Math.min(this.minY,p),this.maxY=Math.max(this.maxY,p)}addQuad(t){let r=this.minX,n=this.minY,s=this.maxX,a=this.maxY,u=t[0],l=t[1];r=u<r?u:r,n=l<n?l:n,s=u>s?u:s,a=l>a?l:a,u=t[2],l=t[3],r=u<r?u:r,n=l<n?l:n,s=u>s?u:s,a=l>a?l:a,u=t[4],l=t[5],r=u<r?u:r,n=l<n?l:n,s=u>s?u:s,a=l>a?l:a,u=t[6],l=t[7],r=u<r?u:r,n=l<n?l:n,s=u>s?u:s,a=l>a?l:a,this.minX=r,this.minY=n,this.maxX=s,this.maxY=a}addFrame(t,r,n,s,a){this.addFrameMatrix(t.worldTransform,r,n,s,a)}addFrameMatrix(t,r,n,s,a){const u=t.a,l=t.b,c=t.c,f=t.d,p=t.tx,m=t.ty;let g=this.minX,x=this.minY,y=this.maxX,S=this.maxY,T=u*r+c*n+p,w=l*r+f*n+m;g=T<g?T:g,x=w<x?w:x,y=T>y?T:y,S=w>S?w:S,T=u*s+c*n+p,w=l*s+f*n+m,g=T<g?T:g,x=w<x?w:x,y=T>y?T:y,S=w>S?w:S,T=u*r+c*a+p,w=l*r+f*a+m,g=T<g?T:g,x=w<x?w:x,y=T>y?T:y,S=w>S?w:S,T=u*s+c*a+p,w=l*s+f*a+m,g=T<g?T:g,x=w<x?w:x,y=T>y?T:y,S=w>S?w:S,this.minX=g,this.minY=x,this.maxX=y,this.maxY=S}addVertexData(t,r,n){let s=this.minX,a=this.minY,u=this.maxX,l=this.maxY;for(let c=r;c<n;c+=2){const f=t[c],p=t[c+1];s=f<s?f:s,a=p<a?p:a,u=f>u?f:u,l=p>l?p:l}this.minX=s,this.minY=a,this.maxX=u,this.maxY=l}addVertices(t,r,n,s){this.addVerticesMatrix(t.worldTransform,r,n,s)}addVerticesMatrix(t,r,n,s,a=0,u=a){const l=t.a,c=t.b,f=t.c,p=t.d,m=t.tx,g=t.ty;let x=this.minX,y=this.minY,S=this.maxX,T=this.maxY;for(let w=n;w<s;w+=2){const I=r[w],A=r[w+1],R=l*I+f*A+m,N=p*A+c*I+g;x=Math.min(x,R-a),S=Math.max(S,R+a),y=Math.min(y,N-u),T=Math.max(T,N+u)}this.minX=x,this.minY=y,this.maxX=S,this.maxY=T}addBounds(t){const r=this.minX,n=this.minY,s=this.maxX,a=this.maxY;this.minX=t.minX<r?t.minX:r,this.minY=t.minY<n?t.minY:n,this.maxX=t.maxX>s?t.maxX:s,this.maxY=t.maxY>a?t.maxY:a}addBoundsMask(t,r){const n=t.minX>r.minX?t.minX:r.minX,s=t.minY>r.minY?t.minY:r.minY,a=t.maxX<r.maxX?t.maxX:r.maxX,u=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=a&&s<=u){const l=this.minX,c=this.minY,f=this.maxX,p=this.maxY;this.minX=n<l?n:l,this.minY=s<c?s:c,this.maxX=a>f?a:f,this.maxY=u>p?u:p}}addBoundsMatrix(t,r){this.addFrameMatrix(r,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,r){const n=t.minX>r.x?t.minX:r.x,s=t.minY>r.y?t.minY:r.y,a=t.maxX<r.x+r.width?t.maxX:r.x+r.width,u=t.maxY<r.y+r.height?t.maxY:r.y+r.height;if(n<=a&&s<=u){const l=this.minX,c=this.minY,f=this.maxX,p=this.maxY;this.minX=n<l?n:l,this.minY=s<c?s:c,this.maxX=a>f?a:f,this.maxY=u>p?u:p}}pad(t=0,r=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)}addFramePad(t,r,n,s,a,u){t-=a,r-=u,n+=a,s+=u,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>s?this.maxY:s}}class mi extends Gs{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new el,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new wl,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(t){const r=Object.keys(t);for(let n=0;n<r.length;++n){const s=r[n];Object.defineProperty(mi.prototype,s,Object.getOwnPropertyDescriptor(t,s))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(t,r){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),r||(this._boundsRect||(this._boundsRect=new jt),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new jt),t=this._localBoundsRect),this._localBounds||(this._localBounds=new wl);const r=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const s=this._bounds,a=this._boundsID;this._bounds=this._localBounds;const u=this.getBounds(!1,t);return this.parent=n,this.transform=r,this._bounds=s,this._bounds.updateID+=this._boundsID-a,u}toGlobal(t,r,n=!1){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,r)}toLocal(t,r,n,s){return r&&(t=r.toGlobal(t,n,s)),s||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,n)}setParent(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t}removeFromParent(){var t;(t=this.parent)==null||t.removeChild(this)}setTransform(t=0,r=0,n=1,s=1,a=0,u=0,l=0,c=0,f=0){return this.position.x=t,this.position.y=r,this.scale.x=n||1,this.scale.y=s||1,this.rotation=a,this.skew.x=u,this.skew.y=l,this.pivot.x=c,this.pivot.y=f,this}destroy(t){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new KS),this.tempDisplayObjectParent}enableTempParent(){const t=this.parent;return this.parent=this._tempDisplayObjectParent,t}disableTempParent(t){this.parent=t}get x(){return this.position.x}set x(t){this.transform.position.x=t}get y(){return this.position.y}set y(t){this.transform.position.y=t}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(t){this.transform.position.copyFrom(t)}get scale(){return this.transform.scale}set scale(t){this.transform.scale.copyFrom(t)}get pivot(){return this.transform.pivot}set pivot(t){this.transform.pivot.copyFrom(t)}get skew(){return this.transform.skew}set skew(t){this.transform.skew.copyFrom(t)}get rotation(){return this.transform.rotation}set rotation(t){this.transform.rotation=t}get angle(){return this.transform.rotation*hT}set angle(t){this.transform.rotation=t*ns}get zIndex(){return this._zIndex}set zIndex(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}get mask(){return this._mask}set mask(t){if(this._mask!==t){if(this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount--,r._maskRefCount===0&&(r.renderable=!0,r.isMask=!1))}if(this._mask=t,this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount===0&&(r.renderable=!1,r.isMask=!0),r._maskRefCount++)}}}}class KS extends mi{constructor(){super(...arguments),this.sortDirty=null}}mi.prototype.displayObjectUpdateTransform=mi.prototype.updateTransform;const ZS=new Pe;function JS(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const Sl=class extends mi{constructor(){super(),this.children=[],this.sortableChildren=Sl.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(e){}addChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.addChild(e[t]);else{const t=e[0];t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",t,this,this.children.length-1),t.emit("added",this)}return e[0]}addChildAt(e,t){if(t<0||t>this.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const r=this.getChildIndex(e),n=this.getChildIndex(t);this.children[r]=t,this.children[n]=e,this.onChildrenChange(r<n?r:n)}getChildIndex(e){const t=this.children.indexOf(e);if(t===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return t}setChildIndex(e,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const r=this.getChildIndex(e);sa(this.children,r,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.removeChild(e[t]);else{const t=e[0],r=this.children.indexOf(t);if(r===-1)return null;t.parent=null,t.transform._parentID=-1,sa(this.children,r,1),this._boundsID++,this.onChildrenChange(r),t.emit("removed",this),this.emit("childRemoved",t,this,r)}return e[0]}removeChildAt(e){const t=this.getChildAt(e);return t.parent=null,t.transform._parentID=-1,sa(this.children,e,1),this._boundsID++,this.onChildrenChange(e),t.emit("removed",this),this.emit("childRemoved",t,this,e),t}removeChildren(e=0,t=this.children.length){const r=e,n=t,s=n-r;let a;if(s>0&&s<=n){a=this.children.splice(r,s);for(let u=0;u<a.length;++u)a[u].parent=null,a[u].transform&&(a[u].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let u=0;u<a.length;++u)a[u].emit("removed",this),this.emit("childRemoved",a[u],this,u);return a}else if(s===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let e=!1;for(let t=0,r=this.children.length;t<r;++t){const n=this.children[t];n._lastSortedIndex=t,!e&&n.zIndex!==0&&(e=!0)}e&&this.children.length>1&&this.children.sort(JS),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e<t;++e){const r=this.children[e];r.visible&&r.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let e=0;e<this.children.length;e++){const t=this.children[e];if(!(!t.visible||!t.renderable))if(t.calculateBounds(),t._mask){const r=t._mask.isMaskData?t._mask.maskObject:t._mask;r?(r.calculateBounds(),this._bounds.addBoundsMask(t._bounds,r._bounds)):this._bounds.addBounds(t._bounds)}else t.filterArea?this._bounds.addBoundsArea(t._bounds,t.filterArea):this._bounds.addBounds(t._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(e,t=!1){const r=super.getLocalBounds(e);if(!t)for(let n=0,s=this.children.length;n<s;++n){const a=this.children[n];a.visible&&a.updateTransform()}return r}_calculateBounds(){}_renderWithCulling(e){const t=e.renderTexture.sourceFrame;if(!(t.width>0&&t.height>0))return;let r,n;this.cullArea?(r=this.cullArea,n=this.worldTransform):this._render!==Sl.prototype._render&&(r=this.getBounds(!0));const s=e.projection.transform;if(s&&(n?(n=ZS.copyFrom(n),n.prepend(s)):n=s),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let a=0,u=this.children.length;a<u;++a){const l=this.children[a],c=l.cullable;l.cullable=c||!this.cullArea,l.render(e),l.cullable=c}}render(e){var t;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(t=this.filters)!=null&&t.length)this.renderAdvanced(e);else if(this.cullable)this._renderWithCulling(e);else{this._render(e);for(let r=0,n=this.children.length;r<n;++r)this.children[r].render(e)}}renderAdvanced(e){var s,a,u;const t=this.filters,r=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let l=0;l<t.length;l++)t[l].enabled&&this._enabledFilters.push(t[l])}const n=t&&((s=this._enabledFilters)==null?void 0:s.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==de.NONE));if(n&&e.batch.flush(),t&&((a=this._enabledFilters)!=null&&a.length)&&e.filter.push(this,this._enabledFilters),r&&e.mask.push(this,this._mask),this.cullable)this._renderWithCulling(e);else{this._render(e);for(let l=0,c=this.children.length;l<c;++l)this.children[l].render(e)}n&&e.batch.flush(),r&&e.mask.pop(this),t&&((u=this._enabledFilters)!=null&&u.length)&&e.filter.pop()}_render(e){}destroy(e){super.destroy(),this.sortDirty=!1;const t=typeof e=="boolean"?e:e==null?void 0:e.children,r=this.removeChildren(0,this.children.length);if(t)for(let n=0;n<r.length;++n)r[n].destroy(e)}get width(){return this.scale.x*this.getLocalBounds().width}set width(e){const t=this.getLocalBounds().width;t!==0?this.scale.x=e/t:this.scale.x=1,this._width=e}get height(){return this.scale.y*this.getLocalBounds().height}set height(e){const t=this.getLocalBounds().height;t!==0?this.scale.y=e/t:this.scale.y=1,this._height=e}};let vi=Sl;vi.defaultSortableChildren=!1,vi.prototype.containerUpdateTransform=vi.prototype.updateTransform,Object.defineProperties(_t,{SORTABLE_CHILDREN:{get(){return vi.defaultSortableChildren},set(e){Rt("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),vi.defaultSortableChildren=e}}});class Ma{constructor(t,r=null,n=null,s=null){this.points=[],this.holes=[],this.shape=t,this.lineStyle=n,this.fillStyle=r,this.matrix=s,this.type=t.type}clone(){return new Ma(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}}const yi=new Wt,bp=class extends Qf{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new wl,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),Pa.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),xp.push(t)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,r=null,n=null){const s=new Ma(e,t,r,n);return this.graphicsData.push(s),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const r=new Ma(e,null,null,t),n=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=n.lineStyle,n.holes.push(r),this.dirty++,this}destroy(){super.destroy();for(let e=0;e<this.graphicsData.length;++e)this.graphicsData[e].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(e){const t=this.graphicsData;for(let r=0;r<t.length;++r){const n=t[r];if(n.fillStyle.visible&&n.shape&&(n.matrix?n.matrix.applyInverse(e,yi):yi.copyFrom(e),n.shape.contains(yi.x,yi.y))){let s=!1;if(n.holes){for(let a=0;a<n.holes.length;a++)if(n.holes[a].shape.contains(yi.x,yi.y)){s=!0;break}}if(!s)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const e=this.uvs,t=this.graphicsData;let r=null,n=null;this.batches.length>0&&(r=this.batches[this.batches.length-1],n=r.style);for(let l=this.shapeIndex;l<t.length;l++){this.shapeIndex++;const c=t[l],f=c.fillStyle,p=c.lineStyle;Tl[c.type].build(c),c.matrix&&this.transformPoints(c.points,c.matrix),(f.visible||p.visible)&&this.processHoles(c.holes);for(let g=0;g<2;g++){const x=g===0?f:p;if(!x.visible)continue;const y=x.texture.baseTexture,S=this.indices.length,T=this.points.length/2;y.wrapMode=ji.REPEAT,g===0?this.processFill(c):this.processLine(c);const w=this.points.length/2-T;w!==0&&(r&&!this._compareStyles(n,x)&&(r.end(S,T),r=null),r||(r=xp.pop()||new WS,r.begin(x,S,T),this.batches.push(r),n=x),this.addUvs(this.points,e,x.texture,T,w,x.matrix))}}const s=this.indices.length,a=this.points.length/2;if(r&&r.end(s,a),this.batches.length===0){this.batchable=!0;return}const u=a>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&u===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=u?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e<t;e++){const r=this.graphicsData[e],n=r.fillStyle,s=r.lineStyle;if(n&&!n.texture.baseTexture.valid||s&&!s.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const e=this.batches;for(let t=0,r=e.length;t<r;t++){const n=e[t];for(let s=0;s<n.size;s++){const a=n.start+s;this.indicesUint16[a]=this.indicesUint16[a]-n.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const e=this.batches;for(let t=0;t<e.length;t++)if(e[t].style.native)return!1;return this.points.length<bp.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++Lt._globalBatch;for(let p=0;p<this.drawCalls.length;p++)this.drawCalls[p].texArray.clear(),Pa.push(this.drawCalls[p]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=Pa.pop();n||(n=new Zu,n.texArray=new nl),n.texArray.count=0,n.start=0,n.size=0,n.type=Kr.TRIANGLES;let s=0,a=null,u=0,l=!1,c=Kr.TRIANGLES,f=0;this.drawCalls.push(n);for(let p=0;p<this.batches.length;p++){const m=this.batches[p],g=8,x=m.style,y=x.texture.baseTexture;l!==!!x.native&&(l=!!x.native,c=l?Kr.LINES:Kr.TRIANGLES,a=null,s=g,e++),a!==y&&(a=y,y._batchEnabled!==e&&(s===g&&(e++,s=0,n.size>0&&(n=Pa.pop(),n||(n=new Zu,n.texArray=new nl),this.drawCalls.push(n)),n.start=f,n.size=0,n.texArray.count=0,n.type=c),y.touched=1,y._batchEnabled=e,y._batchLocation=s,y.wrapMode=ji.REPEAT,n.texArray.elements[n.texArray.count++]=y,s++)),n.size+=m.size,f+=m.size,u=y._batchLocation,this.addColors(t,x.color,x.alpha,m.attribSize,m.attribStart),this.addTextureIds(r,u,m.attribSize,m.attribStart)}Lt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,r=this.colors,n=this.textureIds,s=new ArrayBuffer(e.length*3*4),a=new Float32Array(s),u=new Uint32Array(s);let l=0;for(let c=0;c<e.length/2;c++)a[l++]=e[c*2],a[l++]=e[c*2+1],a[l++]=t[c*2],a[l++]=t[c*2+1],u[l++]=r[c],a[l++]=n[c];this._buffer.update(s),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?mp.triangulate(e,this):Tl[e.type].triangulate(e,this)}processLine(e){_p(e,this);for(let t=0;t<e.holes.length;t++)_p(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];Tl[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}}calculateBounds(){const e=this._bounds;e.clear(),e.addVertexData(this.points,0,this.points.length),e.pad(this.boundsPadding,this.boundsPadding)}transformPoints(e,t){for(let r=0;r<e.length/2;r++){const n=e[r*2],s=e[r*2+1];e[r*2]=t.a*n+t.c*s+t.tx,e[r*2+1]=t.b*n+t.d*s+t.ty}}addColors(e,t,r,n,s=0){const a=Ce.shared.setValue(t).toLittleEndianNumber(),u=Ce.shared.setValue(a).toPremultiplied(r);e.length=Math.max(e.length,s+n);for(let l=0;l<n;l++)e[s+l]=u}addTextureIds(e,t,r,n=0){e.length=Math.max(e.length,n+r);for(let s=0;s<r;s++)e[n+s]=t}addUvs(e,t,r,n,s,a=null){let u=0;const l=t.length,c=r.frame;for(;u<s;){let p=e[(n+u)*2],m=e[(n+u)*2+1];if(a){const g=a.a*p+a.c*m+a.tx;m=a.b*p+a.d*m+a.ty,p=g}u++,t.push(p/c.width,m/c.height)}const f=r.baseTexture;(c.width<f.width||c.height<f.height)&&this.adjustUvs(t,r,l,s)}adjustUvs(e,t,r,n){const s=t.baseTexture,a=1e-6,u=r+n*2,l=t.frame,c=l.width/s.width,f=l.height/s.height;let p=l.x/l.width,m=l.y/l.height,g=Math.floor(e[r]+a),x=Math.floor(e[r+1]+a);for(let y=r+2;y<u;y+=2)g=Math.min(g,Math.floor(e[y]+a)),x=Math.min(x,Math.floor(e[y+1]+a));p-=g,m-=x;for(let y=r;y<u;y+=2)e[y]=(e[y]+p)*c,e[y+1]=(e[y+1]+m)*f}};let Tp=bp;Tp.BATCHABLE_SIZE=100;class Oa{constructor(){this.color=16777215,this.alpha=1,this.texture=Ot.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new Oa;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t}reset(){this.color=16777215,this.alpha=1,this.texture=Ot.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Al extends Oa{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Mn.BUTT,this.join=cr.MITER,this.miterLimit=10}clone(){const t=new Al;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}}const Cl={},Fa=class extends vi{constructor(e=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new Oa,this._lineStyle=new Al,this._matrix=null,this._holeMode=!1,this.state=oa.for2d(),this._geometry=e||new Tp,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Ce(16777215),this.blendMode=ht.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Fa(this._geometry)}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(e=null,t=0,r,n=.5,s=!1){return typeof e=="number"&&(e={width:e,color:t,alpha:r,alignment:n,native:s}),this.lineTextureStyle(e)}lineTextureStyle(e){const t={width:0,texture:Ot.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Mn.BUTT,join:cr.MITER,miterLimit:10};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.width>0&&e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:r},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new is,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new is,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const r=this.currentPath.points,n=r[r.length-2],s=r[r.length-1];return(n!==e||s!==t)&&r.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,r,n){this._initCurve();const s=this.currentPath.points;return s.length===0&&this.moveTo(0,0),bl.curveTo(e,t,r,n,s),this}bezierCurveTo(e,t,r,n,s,a){return this._initCurve(),xl.curveTo(e,t,r,n,s,a,this.currentPath.points),this}arcTo(e,t,r,n,s){this._initCurve(e,t);const a=this.currentPath.points,u=vp.curveTo(e,t,r,n,s,a);if(u){const{cx:l,cy:c,radius:f,startAngle:p,endAngle:m,anticlockwise:g}=u;this.arc(l,c,f,p,m,g)}return this}arc(e,t,r,n,s,a=!1){if(n===s)return this;if(!a&&s<=n?s+=la:a&&n<=s&&(n+=la),s-n===0)return this;const l=e+Math.cos(n)*r,c=t+Math.sin(n)*r,f=this._geometry.closePointEps;let p=this.currentPath?this.currentPath.points:null;if(p){const m=Math.abs(p[p.length-2]-l),g=Math.abs(p[p.length-1]-c);m<f&&g<f||p.push(l,c)}else this.moveTo(l,c),p=this.currentPath.points;return vp.arc(l,c,e,t,r,n,s,a,p),this}beginFill(e=0,t){return this.beginTextureFill({texture:Ot.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Ce.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:Ot.WHITE,color:16777215,matrix:null};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:r},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,r,n){return this.drawShape(new jt(e,t,r,n))}drawRoundedRect(e,t,r,n,s){return this.drawShape(new Qu(e,t,r,n,s))}drawCircle(e,t,r){return this.drawShape(new Ju(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new cT(e,t,r,n))}drawPolygon(...e){let t,r=!0;const n=e[0];n.points?(r=n.closeStroke,t=n.points):Array.isArray(e[0])?t=e[0]:t=e;const s=new is(t);return s.closeStroke=r,this.drawShape(s),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===xe.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,r=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=r,this.vertexData=new Float32Array(e.points);for(let n=0;n<r;n++){const s=e.batches[n],a=s.style.color,u=new Float32Array(this.vertexData.buffer,s.attribStart*4*2,s.attribSize*2),l=new Float32Array(e.uvsFloat32.buffer,s.attribStart*4*2,s.attribSize*2),c=new Uint16Array(e.indicesUint16.buffer,s.start*2,s.size),f={vertexData:u,blendMode:t,indices:c,uvs:l,_batchRGB:Ce.shared.setValue(a).toRgbArray(),_tintRGB:a,_texture:s.style.texture,alpha:s.style.alpha,worldAlpha:1};this.batches[n]=f}}_renderBatched(e){if(this.batches.length){e.batch.setObjectRenderer(e.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let t=0,r=this.batches.length;t<r;t++){const n=this.batches[t];n.worldAlpha=this.worldAlpha*n.alpha,e.plugins[this.pluginName].render(n)}}}_renderDirect(e){const t=this._resolveDirectShader(e),r=this._geometry,n=this.worldAlpha,s=t.uniforms,a=r.drawCalls;s.translationMatrix=this.transform.worldTransform,Ce.shared.setValue(this._tintColor).premultiply(n).toArray(s.tint),e.shader.bind(t),e.geometry.bind(r,t),e.state.set(this.state);for(let u=0,l=a.length;u<l;u++)this._renderDrawCallDirect(e,r.drawCalls[u])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:s,start:a}=t,u=r.count;for(let l=0;l<u;l++)e.texture.bind(r.elements[l],l);e.geometry.draw(n,s,a)}_resolveDirectShader(e){let t=this.shader;const r=this.pluginName;if(!t){if(!Cl[r]){const{maxTextures:n}=e.plugins[r],s=new Int32Array(n);for(let l=0;l<n;l++)s[l]=l;const a={tint:new Float32Array([1,1,1,1]),translationMatrix:new Pe,default:ar.from({uSamplers:s},!0)},u=e.plugins[r]._shader.program;Cl[r]=new as(u,a)}t=Cl[r]}return t}_calculateBounds(){this.finishPoly();const e=this._geometry;if(!e.graphicsData.length)return;const{minX:t,minY:r,maxX:n,maxY:s}=e.bounds;this._bounds.addFrame(this.transform,t,r,n,s)}containsPoint(e){return this.worldTransform.applyInverse(e,Fa._TEMP_POINT),this._geometry.containsPoint(Fa._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t._tintRGB=Ce.shared.setValue(this._tintColor).multiply(t._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const e=this.transform._worldID;if(this._transformID===e)return;this._transformID=e;const t=this.transform.worldTransform,r=t.a,n=t.b,s=t.c,a=t.d,u=t.tx,l=t.ty,c=this._geometry.points,f=this.vertexData;let p=0;for(let m=0;m<c.length;m+=2){const g=c[m],x=c[m+1];f[p++]=r*g+s*x+u,f[p++]=a*x+n*g+l}}closePath(){const e=this.currentPath;return e&&(e.closeStroke=!0,this.finishPoly()),this}setMatrix(e){return this._matrix=e,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(e){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(e)}};let El=Fa;El.curves=gi,El._TEMP_POINT=new Wt;var QS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Il={},tA={get exports(){return Il},set exports(e){Il=e}};/*!
1923
+ `),t=[.393,.769,.189,.349,.686,.168,.272,.534,.131];return e.uniforms.uNightVisionMatrix=t,{nightVisionFilter:e}},pp=it.forwardRef((e,t)=>{const r=q.useRef(null),n=q.useRef(null),{src:s,visible:a,transformation:{x:u,y:l,width:c,height:f,anchor:p,colorCorrection:m={},effect:g},pointerdown:x}=e,{blurRadius:y=0}=m,{temperatureFilter:S,sharpnessFilter:T,hueFilter:w,blurFilter:I,adjustmentFilter:A}=cs(m),{nightVisionFilter:R}=VS();return it.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),Ft.jsx(Wn,{...e,ref:t,children:Ft.jsx(Qt.Container,{ref:n,children:Ft.jsx(Qt.Sprite,{image:s,width:c,height:f,anchor:p,ref:r,alpha:a?1:0,x:u,y:l,...a&&{interactive:!0,pointerdown:x},filters:[S,T,w,A,...y>0?[I]:[],...g===pn.NightVision?[R]:[]]})})})});pp.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const Ra={build(e){const t=e.points;let r,n,s,a,u,l;if(e.type===xe.CIRC){const y=e.shape;r=y.x,n=y.y,u=l=y.radius,s=a=0}else if(e.type===xe.ELIP){const y=e.shape;r=y.x,n=y.y,u=y.width,l=y.height,s=a=0}else{const y=e.shape,S=y.width/2,T=y.height/2;r=y.x+S,n=y.y+T,u=l=Math.max(0,Math.min(y.radius,Math.min(S,T))),s=S-u,a=T-l}if(!(u>=0&&l>=0&&s>=0&&a>=0)){t.length=0;return}const c=Math.ceil(2.3*Math.sqrt(u+l)),f=c*8+(s?4:0)+(a?4:0);if(t.length=f,f===0)return;if(c===0){t.length=8,t[0]=t[6]=r+s,t[1]=t[3]=n+a,t[2]=t[4]=r-s,t[5]=t[7]=n-a;return}let p=0,m=c*4+(s?2:0)+2,g=m,x=f;{const y=s+u,S=a,T=r+y,w=r-y,I=n+S;if(t[p++]=T,t[p++]=I,t[--m]=I,t[--m]=w,a){const A=n-S;t[g++]=w,t[g++]=A,t[--x]=A,t[--x]=T}}for(let y=1;y<c;y++){const S=Math.PI/2*(y/c),T=s+Math.cos(S)*u,w=a+Math.sin(S)*l,I=r+T,A=r-T,R=n+w,N=n-w;t[p++]=I,t[p++]=R,t[--m]=R,t[--m]=A,t[g++]=A,t[g++]=N,t[--x]=N,t[--x]=I}{const y=s,S=a+l,T=r+y,w=r-y,I=n+S,A=n-S;t[p++]=T,t[p++]=I,t[--x]=A,t[--x]=T,s&&(t[p++]=w,t[p++]=I,t[--x]=A,t[--x]=w)}},triangulate(e,t){const r=e.points,n=t.points,s=t.indices;if(r.length===0)return;let a=n.length/2;const u=a;let l,c;if(e.type!==xe.RREC){const p=e.shape;l=p.x,c=p.y}else{const p=e.shape;l=p.x+p.width/2,c=p.y+p.height/2}const f=e.matrix;n.push(e.matrix?f.a*l+f.c*c+f.tx:l,e.matrix?f.b*l+f.d*c+f.ty:c),a++,n.push(r[0],r[1]);for(let p=2;p<r.length;p+=2)n.push(r[p],r[p+1]),s.push(a++,u,a);s.push(u+1,u,a)}};function gp(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let s=0,a=e[r-2],u=e[r-1];s<r;s+=2){const l=e[s],c=e[s+1];n+=(l-a)*(c+u),a=l,u=c}if(!t&&n>0||t&&n<=0){const s=r/2;for(let a=s+s%2;a<r;a+=2){const u=r-a-2,l=r-a-1,c=a,f=a+1;[e[u],e[c]]=[e[c],e[u]],[e[l],e[f]]=[e[f],e[l]]}}}const mp={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let r=e.points;const n=e.holes,s=t.points,a=t.indices;if(r.length>=6){gp(r,!1);const u=[];for(let f=0;f<n.length;f++){const p=n[f];gp(p.points,!0),u.push(r.length/2),r=r.concat(p.points)}const l=Px(r,u,2);if(!l)return;const c=s.length/2;for(let f=0;f<l.length;f+=3)a.push(l[f]+c),a.push(l[f+1]+c),a.push(l[f+2]+c);for(let f=0;f<r.length;f++)s.push(r[f])}}},jS={build(e){const t=e.shape,r=t.x,n=t.y,s=t.width,a=t.height,u=e.points;u.length=0,s>=0&&a>=0&&u.push(r,n,r+s,n,r+s,n+a,r,n+a)},triangulate(e,t){const r=e.points,n=t.points;if(r.length===0)return;const s=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),t.indices.push(s,s+1,s+2,s+1,s+2,s+3)}},XS={build(e){Ra.build(e)},triangulate(e,t){Ra.triangulate(e,t)}};var cr=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(cr||{}),Mn=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(Mn||{});const gi={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(e,t=20){if(!this.adaptive||!e||isNaN(e))return t;let r=Math.ceil(e/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}};class vp{static curveTo(t,r,n,s,a,u){const l=u[u.length-2],f=u[u.length-1]-r,p=l-t,m=s-r,g=n-t,x=Math.abs(f*g-p*m);if(x<1e-8||a===0)return(u[u.length-2]!==t||u[u.length-1]!==r)&&u.push(t,r),null;const y=f*f+p*p,S=m*m+g*g,T=f*m+p*g,w=a*Math.sqrt(y)/x,I=a*Math.sqrt(S)/x,A=w*T/y,R=I*T/S,N=w*g+I*p,B=w*m+I*f,L=p*(I+A),O=f*(I+A),z=g*(w+R),X=m*(w+R),tt=Math.atan2(O-B,L-N),st=Math.atan2(X-B,z-N);return{cx:N+t,cy:B+r,radius:a,startAngle:tt,endAngle:st,anticlockwise:p*m>g*f}}static arc(t,r,n,s,a,u,l,c,f){const p=l-u,m=gi._segmentsCount(Math.abs(p)*a,Math.ceil(Math.abs(p)/la)*40),g=p/(m*2),x=g*2,y=Math.cos(g),S=Math.sin(g),T=m-1,w=T%1/T;for(let I=0;I<=T;++I){const A=I+w*I,R=g+u+x*A,N=Math.cos(R),B=-Math.sin(R);f.push((y*N+S*B)*a+n,(y*-B+S*N)*a+s)}}}class WS{constructor(){this.reset()}begin(t,r,n){this.reset(),this.style=t,this.start=r,this.attribStart=n}end(t,r){this.attribSize=r-this.attribStart,this.size=t-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}}class xl{static curveLength(t,r,n,s,a,u,l,c){let p=0,m=0,g=0,x=0,y=0,S=0,T=0,w=0,I=0,A=0,R=0,N=t,B=r;for(let L=1;L<=10;++L)m=L/10,g=m*m,x=g*m,y=1-m,S=y*y,T=S*y,w=T*t+3*S*m*n+3*y*g*a+x*l,I=T*r+3*S*m*s+3*y*g*u+x*c,A=N-w,R=B-I,N=w,B=I,p+=Math.sqrt(A*A+R*R);return p}static curveTo(t,r,n,s,a,u,l){const c=l[l.length-2],f=l[l.length-1];l.length-=2;const p=gi._segmentsCount(xl.curveLength(c,f,t,r,n,s,a,u));let m=0,g=0,x=0,y=0,S=0;l.push(c,f);for(let T=1,w=0;T<=p;++T)w=T/p,m=1-w,g=m*m,x=g*m,y=w*w,S=y*w,l.push(x*c+3*g*w*t+3*m*y*n+S*a,x*f+3*g*w*r+3*m*y*s+S*u)}}function yp(e,t,r,n,s,a,u,l){const c=e-r*s,f=t-n*s,p=e+r*a,m=t+n*a;let g,x;u?(g=n,x=-r):(g=-n,x=r);const y=c+g,S=f+x,T=p+g,w=m+x;return l.push(y,S,T,w),2}function On(e,t,r,n,s,a,u,l){const c=r-e,f=n-t;let p=Math.atan2(c,f),m=Math.atan2(s-e,a-t);l&&p<m?p+=Math.PI*2:!l&&p>m&&(m+=Math.PI*2);let g=p;const x=m-p,y=Math.abs(x),S=Math.sqrt(c*c+f*f),T=(15*y*Math.sqrt(S)/Math.PI>>0)+1,w=x/T;if(g+=w,l){u.push(e,t,r,n);for(let I=1,A=g;I<T;I++,A+=w)u.push(e,t,e+Math.sin(A)*S,t+Math.cos(A)*S);u.push(e,t,s,a)}else{u.push(r,n,e,t);for(let I=1,A=g;I<T;I++,A+=w)u.push(e+Math.sin(A)*S,t+Math.cos(A)*S,e,t);u.push(s,a,e,t)}return T*2}function qS(e,t){const r=e.shape;let n=e.points||r.points.slice();const s=t.closePointEps;if(n.length===0)return;const a=e.lineStyle,u=new Wt(n[0],n[1]),l=new Wt(n[n.length-2],n[n.length-1]),c=r.type!==xe.POLY||r.closeStroke,f=Math.abs(u.x-l.x)<s&&Math.abs(u.y-l.y)<s;if(c){n=n.slice(),f&&(n.pop(),n.pop(),l.set(n[n.length-2],n[n.length-1]));const G=(u.x+l.x)*.5,rt=(l.y+u.y)*.5;n.unshift(G,rt),n.push(G,rt)}const p=t.points,m=n.length/2;let g=n.length;const x=p.length/2,y=a.width/2,S=y*y,T=a.miterLimit*a.miterLimit;let w=n[0],I=n[1],A=n[2],R=n[3],N=0,B=0,L=-(I-R),O=w-A,z=0,X=0,tt=Math.sqrt(L*L+O*O);L/=tt,O/=tt,L*=y,O*=y;const st=a.alignment,V=(1-st)*2,j=st*2;c||(a.cap===Mn.ROUND?g+=On(w-L*(V-j)*.5,I-O*(V-j)*.5,w-L*V,I-O*V,w+L*j,I+O*j,p,!0)+2:a.cap===Mn.SQUARE&&(g+=yp(w,I,L,O,V,j,!0,p))),p.push(w-L*V,I-O*V,w+L*j,I+O*j);for(let G=1;G<m-1;++G){w=n[(G-1)*2],I=n[(G-1)*2+1],A=n[G*2],R=n[G*2+1],N=n[(G+1)*2],B=n[(G+1)*2+1],L=-(I-R),O=w-A,tt=Math.sqrt(L*L+O*O),L/=tt,O/=tt,L*=y,O*=y,z=-(R-B),X=A-N,tt=Math.sqrt(z*z+X*X),z/=tt,X/=tt,z*=y,X*=y;const rt=A-w,gt=I-R,H=A-N,K=B-R,ct=rt*H+gt*K,yt=gt*H-K*rt,_t=yt<0;if(Math.abs(yt)<.001*Math.abs(ct)){p.push(A-L*V,R-O*V,A+L*j,R+O*j),ct>=0&&(a.join===cr.ROUND?g+=On(A,R,A-L*V,R-O*V,A-z*V,R-X*V,p,!1)+4:g+=2,p.push(A-z*j,R-X*j,A+z*V,R+X*V));continue}const Pt=(-L+w)*(-O+R)-(-L+A)*(-O+I),Ot=(-z+N)*(-X+R)-(-z+A)*(-X+B),Ht=(rt*Ot-H*Pt)/yt,Vt=(K*Pt-gt*Ot)/yt,Kt=(Ht-A)*(Ht-A)+(Vt-R)*(Vt-R),J=A+(Ht-A)*V,W=R+(Vt-R)*V,at=A-(Ht-A)*j,Ct=R-(Vt-R)*j,Et=Math.min(rt*rt+gt*gt,H*H+K*K),Zt=_t?V:j,gr=Et+Zt*Zt*S,Me=Kt<=gr;let $r=a.join;if($r===cr.MITER&&Kt/S>T&&($r=cr.BEVEL),Me)switch($r){case cr.MITER:{p.push(J,W,at,Ct);break}case cr.BEVEL:{_t?p.push(J,W,A+L*j,R+O*j,J,W,A+z*j,R+X*j):p.push(A-L*V,R-O*V,at,Ct,A-z*V,R-X*V,at,Ct),g+=2;break}case cr.ROUND:{_t?(p.push(J,W,A+L*j,R+O*j),g+=On(A,R,A+L*j,R+O*j,A+z*j,R+X*j,p,!0)+4,p.push(J,W,A+z*j,R+X*j)):(p.push(A-L*V,R-O*V,at,Ct),g+=On(A,R,A-L*V,R-O*V,A-z*V,R-X*V,p,!1)+4,p.push(A-z*V,R-X*V,at,Ct));break}}else{switch(p.push(A-L*V,R-O*V,A+L*j,R+O*j),$r){case cr.MITER:{_t?p.push(at,Ct,at,Ct):p.push(J,W,J,W),g+=2;break}case cr.ROUND:{_t?g+=On(A,R,A+L*j,R+O*j,A+z*j,R+X*j,p,!0)+2:g+=On(A,R,A-L*V,R-O*V,A-z*V,R-X*V,p,!1)+2;break}}p.push(A-z*V,R-X*V,A+z*j,R+X*j),g+=2}}w=n[(m-2)*2],I=n[(m-2)*2+1],A=n[(m-1)*2],R=n[(m-1)*2+1],L=-(I-R),O=w-A,tt=Math.sqrt(L*L+O*O),L/=tt,O/=tt,L*=y,O*=y,p.push(A-L*V,R-O*V,A+L*j,R+O*j),c||(a.cap===Mn.ROUND?g+=On(A-L*(V-j)*.5,R-O*(V-j)*.5,A-L*V,R-O*V,A+L*j,R+O*j,p,!1)+2:a.cap===Mn.SQUARE&&(g+=yp(A,R,L,O,V,j,!1,p)));const bt=t.indices,kt=gi.epsilon*gi.epsilon;for(let G=x;G<g+x-2;++G)w=p[G*2],I=p[G*2+1],A=p[(G+1)*2],R=p[(G+1)*2+1],N=p[(G+2)*2],B=p[(G+2)*2+1],!(Math.abs(w*(R-B)+A*(B-I)+N*(I-R))<kt)&&bt.push(G,G+1,G+2)}function YS(e,t){let r=0;const n=e.shape,s=e.points||n.points,a=n.type!==xe.POLY||n.closeStroke;if(s.length===0)return;const u=t.points,l=t.indices,c=s.length/2,f=u.length/2;let p=f;for(u.push(s[0],s[1]),r=1;r<c;r++)u.push(s[r*2],s[r*2+1]),l.push(p,p+1),p++;a&&l.push(p,f)}function _p(e,t){e.lineStyle.native?YS(e,t):qS(e,t)}class bl{static curveLength(t,r,n,s,a,u){const l=t-2*n+a,c=r-2*s+u,f=2*n-2*t,p=2*s-2*r,m=4*(l*l+c*c),g=4*(l*f+c*p),x=f*f+p*p,y=2*Math.sqrt(m+g+x),S=Math.sqrt(m),T=2*m*S,w=2*Math.sqrt(x),I=g/S;return(T*y+S*g*(y-w)+(4*x*m-g*g)*Math.log((2*S+I+y)/(I+w)))/(4*T)}static curveTo(t,r,n,s,a){const u=a[a.length-2],l=a[a.length-1],c=gi._segmentsCount(bl.curveLength(u,l,t,r,n,s));let f=0,p=0;for(let m=1;m<=c;++m){const g=m/c;f=u+(t-u)*g,p=l+(r-l)*g,a.push(f+(t+(n-t)*g-f)*g,p+(r+(s-r)*g-p)*g)}}}const Tl={[xe.POLY]:mp,[xe.CIRC]:Ra,[xe.ELIP]:Ra,[xe.RECT]:jS,[xe.RREC]:XS},xp=[],Pa=[];class wl{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(t){return this.minX>this.maxX||this.minY>this.maxY?jt.EMPTY:(t=t||new jt(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)}addPoint(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)}addPointMatrix(t,r){const{a:n,b:s,c:a,d:u,tx:l,ty:c}=t,f=n*r.x+a*r.y+l,p=s*r.x+u*r.y+c;this.minX=Math.min(this.minX,f),this.maxX=Math.max(this.maxX,f),this.minY=Math.min(this.minY,p),this.maxY=Math.max(this.maxY,p)}addQuad(t){let r=this.minX,n=this.minY,s=this.maxX,a=this.maxY,u=t[0],l=t[1];r=u<r?u:r,n=l<n?l:n,s=u>s?u:s,a=l>a?l:a,u=t[2],l=t[3],r=u<r?u:r,n=l<n?l:n,s=u>s?u:s,a=l>a?l:a,u=t[4],l=t[5],r=u<r?u:r,n=l<n?l:n,s=u>s?u:s,a=l>a?l:a,u=t[6],l=t[7],r=u<r?u:r,n=l<n?l:n,s=u>s?u:s,a=l>a?l:a,this.minX=r,this.minY=n,this.maxX=s,this.maxY=a}addFrame(t,r,n,s,a){this.addFrameMatrix(t.worldTransform,r,n,s,a)}addFrameMatrix(t,r,n,s,a){const u=t.a,l=t.b,c=t.c,f=t.d,p=t.tx,m=t.ty;let g=this.minX,x=this.minY,y=this.maxX,S=this.maxY,T=u*r+c*n+p,w=l*r+f*n+m;g=T<g?T:g,x=w<x?w:x,y=T>y?T:y,S=w>S?w:S,T=u*s+c*n+p,w=l*s+f*n+m,g=T<g?T:g,x=w<x?w:x,y=T>y?T:y,S=w>S?w:S,T=u*r+c*a+p,w=l*r+f*a+m,g=T<g?T:g,x=w<x?w:x,y=T>y?T:y,S=w>S?w:S,T=u*s+c*a+p,w=l*s+f*a+m,g=T<g?T:g,x=w<x?w:x,y=T>y?T:y,S=w>S?w:S,this.minX=g,this.minY=x,this.maxX=y,this.maxY=S}addVertexData(t,r,n){let s=this.minX,a=this.minY,u=this.maxX,l=this.maxY;for(let c=r;c<n;c+=2){const f=t[c],p=t[c+1];s=f<s?f:s,a=p<a?p:a,u=f>u?f:u,l=p>l?p:l}this.minX=s,this.minY=a,this.maxX=u,this.maxY=l}addVertices(t,r,n,s){this.addVerticesMatrix(t.worldTransform,r,n,s)}addVerticesMatrix(t,r,n,s,a=0,u=a){const l=t.a,c=t.b,f=t.c,p=t.d,m=t.tx,g=t.ty;let x=this.minX,y=this.minY,S=this.maxX,T=this.maxY;for(let w=n;w<s;w+=2){const I=r[w],A=r[w+1],R=l*I+f*A+m,N=p*A+c*I+g;x=Math.min(x,R-a),S=Math.max(S,R+a),y=Math.min(y,N-u),T=Math.max(T,N+u)}this.minX=x,this.minY=y,this.maxX=S,this.maxY=T}addBounds(t){const r=this.minX,n=this.minY,s=this.maxX,a=this.maxY;this.minX=t.minX<r?t.minX:r,this.minY=t.minY<n?t.minY:n,this.maxX=t.maxX>s?t.maxX:s,this.maxY=t.maxY>a?t.maxY:a}addBoundsMask(t,r){const n=t.minX>r.minX?t.minX:r.minX,s=t.minY>r.minY?t.minY:r.minY,a=t.maxX<r.maxX?t.maxX:r.maxX,u=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=a&&s<=u){const l=this.minX,c=this.minY,f=this.maxX,p=this.maxY;this.minX=n<l?n:l,this.minY=s<c?s:c,this.maxX=a>f?a:f,this.maxY=u>p?u:p}}addBoundsMatrix(t,r){this.addFrameMatrix(r,t.minX,t.minY,t.maxX,t.maxY)}addBoundsArea(t,r){const n=t.minX>r.x?t.minX:r.x,s=t.minY>r.y?t.minY:r.y,a=t.maxX<r.x+r.width?t.maxX:r.x+r.width,u=t.maxY<r.y+r.height?t.maxY:r.y+r.height;if(n<=a&&s<=u){const l=this.minX,c=this.minY,f=this.maxX,p=this.maxY;this.minX=n<l?n:l,this.minY=s<c?s:c,this.maxX=a>f?a:f,this.maxY=u>p?u:p}}pad(t=0,r=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)}addFramePad(t,r,n,s,a,u){t-=a,r-=u,n+=a,s+=u,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<r?this.minY:r,this.maxY=this.maxY>s?this.maxY:s}}class mi extends Gs{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new el,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new wl,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(t){const r=Object.keys(t);for(let n=0;n<r.length;++n){const s=r[n];Object.defineProperty(mi.prototype,s,Object.getOwnPropertyDescriptor(t,s))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(t,r){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),r||(this._boundsRect||(this._boundsRect=new jt),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new jt),t=this._localBoundsRect),this._localBounds||(this._localBounds=new wl);const r=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const s=this._bounds,a=this._boundsID;this._bounds=this._localBounds;const u=this.getBounds(!1,t);return this.parent=n,this.transform=r,this._bounds=s,this._bounds.updateID+=this._boundsID-a,u}toGlobal(t,r,n=!1){return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,r)}toLocal(t,r,n,s){return r&&(t=r.toGlobal(t,n,s)),s||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,n)}setParent(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t}removeFromParent(){var t;(t=this.parent)==null||t.removeChild(this)}setTransform(t=0,r=0,n=1,s=1,a=0,u=0,l=0,c=0,f=0){return this.position.x=t,this.position.y=r,this.scale.x=n||1,this.scale.y=s||1,this.rotation=a,this.skew.x=u,this.skew.y=l,this.pivot.x=c,this.pivot.y=f,this}destroy(t){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new KS),this.tempDisplayObjectParent}enableTempParent(){const t=this.parent;return this.parent=this._tempDisplayObjectParent,t}disableTempParent(t){this.parent=t}get x(){return this.position.x}set x(t){this.transform.position.x=t}get y(){return this.position.y}set y(t){this.transform.position.y=t}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(t){this.transform.position.copyFrom(t)}get scale(){return this.transform.scale}set scale(t){this.transform.scale.copyFrom(t)}get pivot(){return this.transform.pivot}set pivot(t){this.transform.pivot.copyFrom(t)}get skew(){return this.transform.skew}set skew(t){this.transform.skew.copyFrom(t)}get rotation(){return this.transform.rotation}set rotation(t){this.transform.rotation=t}get angle(){return this.transform.rotation*hT}set angle(t){this.transform.rotation=t*ns}get zIndex(){return this._zIndex}set zIndex(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}get mask(){return this._mask}set mask(t){if(this._mask!==t){if(this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount--,r._maskRefCount===0&&(r.renderable=!0,r.isMask=!1))}if(this._mask=t,this._mask){const r=this._mask.isMaskData?this._mask.maskObject:this._mask;r&&(r._maskRefCount===0&&(r.renderable=!1,r.isMask=!0),r._maskRefCount++)}}}}class KS extends mi{constructor(){super(...arguments),this.sortDirty=null}}mi.prototype.displayObjectUpdateTransform=mi.prototype.updateTransform;const ZS=new Pe;function JS(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const Sl=class extends mi{constructor(){super(),this.children=[],this.sortableChildren=Sl.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(e){}addChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.addChild(e[t]);else{const t=e[0];t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",t,this,this.children.length-1),t.emit("added",this)}return e[0]}addChildAt(e,t){if(t<0||t>this.children.length)throw new Error(`${e}addChildAt: The index ${t} supplied is out of bounds ${this.children.length}`);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e}swapChildren(e,t){if(e===t)return;const r=this.getChildIndex(e),n=this.getChildIndex(t);this.children[r]=t,this.children[n]=e,this.onChildrenChange(r<n?r:n)}getChildIndex(e){const t=this.children.indexOf(e);if(t===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return t}setChildIndex(e,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);const r=this.getChildIndex(e);sa(this.children,r,1),this.children.splice(t,0,e),this.onChildrenChange(t)}getChildAt(e){if(e<0||e>=this.children.length)throw new Error(`getChildAt: Index (${e}) does not exist.`);return this.children[e]}removeChild(...e){if(e.length>1)for(let t=0;t<e.length;t++)this.removeChild(e[t]);else{const t=e[0],r=this.children.indexOf(t);if(r===-1)return null;t.parent=null,t.transform._parentID=-1,sa(this.children,r,1),this._boundsID++,this.onChildrenChange(r),t.emit("removed",this),this.emit("childRemoved",t,this,r)}return e[0]}removeChildAt(e){const t=this.getChildAt(e);return t.parent=null,t.transform._parentID=-1,sa(this.children,e,1),this._boundsID++,this.onChildrenChange(e),t.emit("removed",this),this.emit("childRemoved",t,this,e),t}removeChildren(e=0,t=this.children.length){const r=e,n=t,s=n-r;let a;if(s>0&&s<=n){a=this.children.splice(r,s);for(let u=0;u<a.length;++u)a[u].parent=null,a[u].transform&&(a[u].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let u=0;u<a.length;++u)a[u].emit("removed",this),this.emit("childRemoved",a[u],this,u);return a}else if(s===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let e=!1;for(let t=0,r=this.children.length;t<r;++t){const n=this.children[t];n._lastSortedIndex=t,!e&&n.zIndex!==0&&(e=!0)}e&&this.children.length>1&&this.children.sort(JS),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let e=0,t=this.children.length;e<t;++e){const r=this.children[e];r.visible&&r.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let e=0;e<this.children.length;e++){const t=this.children[e];if(!(!t.visible||!t.renderable))if(t.calculateBounds(),t._mask){const r=t._mask.isMaskData?t._mask.maskObject:t._mask;r?(r.calculateBounds(),this._bounds.addBoundsMask(t._bounds,r._bounds)):this._bounds.addBounds(t._bounds)}else t.filterArea?this._bounds.addBoundsArea(t._bounds,t.filterArea):this._bounds.addBounds(t._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(e,t=!1){const r=super.getLocalBounds(e);if(!t)for(let n=0,s=this.children.length;n<s;++n){const a=this.children[n];a.visible&&a.updateTransform()}return r}_calculateBounds(){}_renderWithCulling(e){const t=e.renderTexture.sourceFrame;if(!(t.width>0&&t.height>0))return;let r,n;this.cullArea?(r=this.cullArea,n=this.worldTransform):this._render!==Sl.prototype._render&&(r=this.getBounds(!0));const s=e.projection.transform;if(s&&(n?(n=ZS.copyFrom(n),n.prepend(s)):n=s),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let a=0,u=this.children.length;a<u;++a){const l=this.children[a],c=l.cullable;l.cullable=c||!this.cullArea,l.render(e),l.cullable=c}}render(e){var t;if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||(t=this.filters)!=null&&t.length)this.renderAdvanced(e);else if(this.cullable)this._renderWithCulling(e);else{this._render(e);for(let r=0,n=this.children.length;r<n;++r)this.children[r].render(e)}}renderAdvanced(e){var s,a,u;const t=this.filters,r=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let l=0;l<t.length;l++)t[l].enabled&&this._enabledFilters.push(t[l])}const n=t&&((s=this._enabledFilters)==null?void 0:s.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==de.NONE));if(n&&e.batch.flush(),t&&((a=this._enabledFilters)!=null&&a.length)&&e.filter.push(this,this._enabledFilters),r&&e.mask.push(this,this._mask),this.cullable)this._renderWithCulling(e);else{this._render(e);for(let l=0,c=this.children.length;l<c;++l)this.children[l].render(e)}n&&e.batch.flush(),r&&e.mask.pop(this),t&&((u=this._enabledFilters)!=null&&u.length)&&e.filter.pop()}_render(e){}destroy(e){super.destroy(),this.sortDirty=!1;const t=typeof e=="boolean"?e:e==null?void 0:e.children,r=this.removeChildren(0,this.children.length);if(t)for(let n=0;n<r.length;++n)r[n].destroy(e)}get width(){return this.scale.x*this.getLocalBounds().width}set width(e){const t=this.getLocalBounds().width;t!==0?this.scale.x=e/t:this.scale.x=1,this._width=e}get height(){return this.scale.y*this.getLocalBounds().height}set height(e){const t=this.getLocalBounds().height;t!==0?this.scale.y=e/t:this.scale.y=1,this._height=e}};let vi=Sl;vi.defaultSortableChildren=!1,vi.prototype.containerUpdateTransform=vi.prototype.updateTransform,Object.defineProperties(xt,{SORTABLE_CHILDREN:{get(){return vi.defaultSortableChildren},set(e){Rt("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),vi.defaultSortableChildren=e}}});class Ma{constructor(t,r=null,n=null,s=null){this.points=[],this.holes=[],this.shape=t,this.lineStyle=n,this.fillStyle=r,this.matrix=s,this.type=t.type}clone(){return new Ma(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}}const yi=new Wt,bp=class extends Qf{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new wl,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),Pa.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),xp.push(t)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(e,t=null,r=null,n=null){const s=new Ma(e,t,r,n);return this.graphicsData.push(s),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const r=new Ma(e,null,null,t),n=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=n.lineStyle,n.holes.push(r),this.dirty++,this}destroy(){super.destroy();for(let e=0;e<this.graphicsData.length;++e)this.graphicsData[e].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(e){const t=this.graphicsData;for(let r=0;r<t.length;++r){const n=t[r];if(n.fillStyle.visible&&n.shape&&(n.matrix?n.matrix.applyInverse(e,yi):yi.copyFrom(e),n.shape.contains(yi.x,yi.y))){let s=!1;if(n.holes){for(let a=0;a<n.holes.length;a++)if(n.holes[a].shape.contains(yi.x,yi.y)){s=!0;break}}if(!s)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;const e=this.uvs,t=this.graphicsData;let r=null,n=null;this.batches.length>0&&(r=this.batches[this.batches.length-1],n=r.style);for(let l=this.shapeIndex;l<t.length;l++){this.shapeIndex++;const c=t[l],f=c.fillStyle,p=c.lineStyle;Tl[c.type].build(c),c.matrix&&this.transformPoints(c.points,c.matrix),(f.visible||p.visible)&&this.processHoles(c.holes);for(let g=0;g<2;g++){const x=g===0?f:p;if(!x.visible)continue;const y=x.texture.baseTexture,S=this.indices.length,T=this.points.length/2;y.wrapMode=ji.REPEAT,g===0?this.processFill(c):this.processLine(c);const w=this.points.length/2-T;w!==0&&(r&&!this._compareStyles(n,x)&&(r.end(S,T),r=null),r||(r=xp.pop()||new WS,r.begin(x,S,T),this.batches.push(r),n=x),this.addUvs(this.points,e,x.texture,T,w,x.matrix))}}const s=this.indices.length,a=this.points.length/2;if(r&&r.end(s,a),this.batches.length===0){this.batchable=!0;return}const u=a>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&u===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=u?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(e,t){return!(!e||!t||e.texture.baseTexture!==t.texture.baseTexture||e.color+e.alpha!==t.color+t.alpha||!!e.native!=!!t.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let e=0,t=this.graphicsData.length;e<t;e++){const r=this.graphicsData[e],n=r.fillStyle,s=r.lineStyle;if(n&&!n.texture.baseTexture.valid||s&&!s.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);const e=this.batches;for(let t=0,r=e.length;t<r;t++){const n=e[t];for(let s=0;s<n.size;s++){const a=n.start+s;this.indicesUint16[a]=this.indicesUint16[a]-n.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;const e=this.batches;for(let t=0;t<e.length;t++)if(e[t].style.native)return!1;return this.points.length<bp.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++Lt._globalBatch;for(let p=0;p<this.drawCalls.length;p++)this.drawCalls[p].texArray.clear(),Pa.push(this.drawCalls[p]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=Pa.pop();n||(n=new Zu,n.texArray=new nl),n.texArray.count=0,n.start=0,n.size=0,n.type=Kr.TRIANGLES;let s=0,a=null,u=0,l=!1,c=Kr.TRIANGLES,f=0;this.drawCalls.push(n);for(let p=0;p<this.batches.length;p++){const m=this.batches[p],g=8,x=m.style,y=x.texture.baseTexture;l!==!!x.native&&(l=!!x.native,c=l?Kr.LINES:Kr.TRIANGLES,a=null,s=g,e++),a!==y&&(a=y,y._batchEnabled!==e&&(s===g&&(e++,s=0,n.size>0&&(n=Pa.pop(),n||(n=new Zu,n.texArray=new nl),this.drawCalls.push(n)),n.start=f,n.size=0,n.texArray.count=0,n.type=c),y.touched=1,y._batchEnabled=e,y._batchLocation=s,y.wrapMode=ji.REPEAT,n.texArray.elements[n.texArray.count++]=y,s++)),n.size+=m.size,f+=m.size,u=y._batchLocation,this.addColors(t,x.color,x.alpha,m.attribSize,m.attribStart),this.addTextureIds(r,u,m.attribSize,m.attribStart)}Lt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,r=this.colors,n=this.textureIds,s=new ArrayBuffer(e.length*3*4),a=new Float32Array(s),u=new Uint32Array(s);let l=0;for(let c=0;c<e.length/2;c++)a[l++]=e[c*2],a[l++]=e[c*2+1],a[l++]=t[c*2],a[l++]=t[c*2+1],u[l++]=r[c],a[l++]=n[c];this._buffer.update(s),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?mp.triangulate(e,this):Tl[e.type].triangulate(e,this)}processLine(e){_p(e,this);for(let t=0;t<e.holes.length;t++)_p(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];Tl[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}}calculateBounds(){const e=this._bounds;e.clear(),e.addVertexData(this.points,0,this.points.length),e.pad(this.boundsPadding,this.boundsPadding)}transformPoints(e,t){for(let r=0;r<e.length/2;r++){const n=e[r*2],s=e[r*2+1];e[r*2]=t.a*n+t.c*s+t.tx,e[r*2+1]=t.b*n+t.d*s+t.ty}}addColors(e,t,r,n,s=0){const a=Ce.shared.setValue(t).toLittleEndianNumber(),u=Ce.shared.setValue(a).toPremultiplied(r);e.length=Math.max(e.length,s+n);for(let l=0;l<n;l++)e[s+l]=u}addTextureIds(e,t,r,n=0){e.length=Math.max(e.length,n+r);for(let s=0;s<r;s++)e[n+s]=t}addUvs(e,t,r,n,s,a=null){let u=0;const l=t.length,c=r.frame;for(;u<s;){let p=e[(n+u)*2],m=e[(n+u)*2+1];if(a){const g=a.a*p+a.c*m+a.tx;m=a.b*p+a.d*m+a.ty,p=g}u++,t.push(p/c.width,m/c.height)}const f=r.baseTexture;(c.width<f.width||c.height<f.height)&&this.adjustUvs(t,r,l,s)}adjustUvs(e,t,r,n){const s=t.baseTexture,a=1e-6,u=r+n*2,l=t.frame,c=l.width/s.width,f=l.height/s.height;let p=l.x/l.width,m=l.y/l.height,g=Math.floor(e[r]+a),x=Math.floor(e[r+1]+a);for(let y=r+2;y<u;y+=2)g=Math.min(g,Math.floor(e[y]+a)),x=Math.min(x,Math.floor(e[y+1]+a));p-=g,m-=x;for(let y=r;y<u;y+=2)e[y]=(e[y]+p)*c,e[y+1]=(e[y+1]+m)*f}};let Tp=bp;Tp.BATCHABLE_SIZE=100;class Oa{constructor(){this.color=16777215,this.alpha=1,this.texture=Mt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new Oa;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t}reset(){this.color=16777215,this.alpha=1,this.texture=Mt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Al extends Oa{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Mn.BUTT,this.join=cr.MITER,this.miterLimit=10}clone(){const t=new Al;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}}const Cl={},Fa=class extends vi{constructor(e=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new Oa,this._lineStyle=new Al,this._matrix=null,this._holeMode=!1,this.state=oa.for2d(),this._geometry=e||new Tp,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Ce(16777215),this.blendMode=ht.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Fa(this._geometry)}set blendMode(e){this.state.blendMode=e}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(e=null,t=0,r,n=.5,s=!1){return typeof e=="number"&&(e={width:e,color:t,alpha:r,alignment:n,native:s}),this.lineTextureStyle(e)}lineTextureStyle(e){const t={width:0,texture:Mt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Mn.BUTT,join:cr.MITER,miterLimit:10};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.width>0&&e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:r},e)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){const e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new is,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new is,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this}lineTo(e,t){this.currentPath||this.moveTo(0,0);const r=this.currentPath.points,n=r[r.length-2],s=r[r.length-1];return(n!==e||s!==t)&&r.push(e,t),this}_initCurve(e=0,t=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[e,t]):this.moveTo(e,t)}quadraticCurveTo(e,t,r,n){this._initCurve();const s=this.currentPath.points;return s.length===0&&this.moveTo(0,0),bl.curveTo(e,t,r,n,s),this}bezierCurveTo(e,t,r,n,s,a){return this._initCurve(),xl.curveTo(e,t,r,n,s,a,this.currentPath.points),this}arcTo(e,t,r,n,s){this._initCurve(e,t);const a=this.currentPath.points,u=vp.curveTo(e,t,r,n,s,a);if(u){const{cx:l,cy:c,radius:f,startAngle:p,endAngle:m,anticlockwise:g}=u;this.arc(l,c,f,p,m,g)}return this}arc(e,t,r,n,s,a=!1){if(n===s)return this;if(!a&&s<=n?s+=la:a&&n<=s&&(n+=la),s-n===0)return this;const l=e+Math.cos(n)*r,c=t+Math.sin(n)*r,f=this._geometry.closePointEps;let p=this.currentPath?this.currentPath.points:null;if(p){const m=Math.abs(p[p.length-2]-l),g=Math.abs(p[p.length-1]-c);m<f&&g<f||p.push(l,c)}else this.moveTo(l,c),p=this.currentPath.points;return vp.arc(l,c,e,t,r,n,s,a,p),this}beginFill(e=0,t){return this.beginTextureFill({texture:Mt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Ce.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:Mt.WHITE,color:16777215,matrix:null};e=Object.assign(t,e),this.normalizeColor(e),this.currentPath&&this.startPoly();const r=e.alpha>0;return r?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:r},e)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(e,t,r,n){return this.drawShape(new jt(e,t,r,n))}drawRoundedRect(e,t,r,n,s){return this.drawShape(new Qu(e,t,r,n,s))}drawCircle(e,t,r){return this.drawShape(new Ju(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new cT(e,t,r,n))}drawPolygon(...e){let t,r=!0;const n=e[0];n.points?(r=n.closeStroke,t=n.points):Array.isArray(e[0])?t=e[0]:t=e;const s=new is(t);return s.closeStroke=r,this.drawShape(s),this}drawShape(e){return this._holeMode?this._geometry.drawHole(e,this._matrix):this._geometry.drawShape(e,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){const e=this._geometry.graphicsData;return e.length===1&&e[0].shape.type===xe.RECT&&!e[0].matrix&&!e[0].holes.length&&!(e[0].lineStyle.visible&&e[0].lineStyle.width)}_render(e){this.finishPoly();const t=this._geometry;t.updateBatches(),t.batchable?(this.batchDirty!==t.batchDirty&&this._populateBatches(),this._renderBatched(e)):(e.batch.flush(),this._renderDirect(e))}_populateBatches(){const e=this._geometry,t=this.blendMode,r=e.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=e.batchDirty,this.batches.length=r,this.vertexData=new Float32Array(e.points);for(let n=0;n<r;n++){const s=e.batches[n],a=s.style.color,u=new Float32Array(this.vertexData.buffer,s.attribStart*4*2,s.attribSize*2),l=new Float32Array(e.uvsFloat32.buffer,s.attribStart*4*2,s.attribSize*2),c=new Uint16Array(e.indicesUint16.buffer,s.start*2,s.size),f={vertexData:u,blendMode:t,indices:c,uvs:l,_batchRGB:Ce.shared.setValue(a).toRgbArray(),_tintRGB:a,_texture:s.style.texture,alpha:s.style.alpha,worldAlpha:1};this.batches[n]=f}}_renderBatched(e){if(this.batches.length){e.batch.setObjectRenderer(e.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let t=0,r=this.batches.length;t<r;t++){const n=this.batches[t];n.worldAlpha=this.worldAlpha*n.alpha,e.plugins[this.pluginName].render(n)}}}_renderDirect(e){const t=this._resolveDirectShader(e),r=this._geometry,n=this.worldAlpha,s=t.uniforms,a=r.drawCalls;s.translationMatrix=this.transform.worldTransform,Ce.shared.setValue(this._tintColor).premultiply(n).toArray(s.tint),e.shader.bind(t),e.geometry.bind(r,t),e.state.set(this.state);for(let u=0,l=a.length;u<l;u++)this._renderDrawCallDirect(e,r.drawCalls[u])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:s,start:a}=t,u=r.count;for(let l=0;l<u;l++)e.texture.bind(r.elements[l],l);e.geometry.draw(n,s,a)}_resolveDirectShader(e){let t=this.shader;const r=this.pluginName;if(!t){if(!Cl[r]){const{maxTextures:n}=e.plugins[r],s=new Int32Array(n);for(let l=0;l<n;l++)s[l]=l;const a={tint:new Float32Array([1,1,1,1]),translationMatrix:new Pe,default:ar.from({uSamplers:s},!0)},u=e.plugins[r]._shader.program;Cl[r]=new as(u,a)}t=Cl[r]}return t}_calculateBounds(){this.finishPoly();const e=this._geometry;if(!e.graphicsData.length)return;const{minX:t,minY:r,maxX:n,maxY:s}=e.bounds;this._bounds.addFrame(this.transform,t,r,n,s)}containsPoint(e){return this.worldTransform.applyInverse(e,Fa._TEMP_POINT),this._geometry.containsPoint(Fa._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t._tintRGB=Ce.shared.setValue(this._tintColor).multiply(t._batchRGB).toLittleEndianNumber()}}}calculateVertices(){const e=this.transform._worldID;if(this._transformID===e)return;this._transformID=e;const t=this.transform.worldTransform,r=t.a,n=t.b,s=t.c,a=t.d,u=t.tx,l=t.ty,c=this._geometry.points,f=this.vertexData;let p=0;for(let m=0;m<c.length;m+=2){const g=c[m],x=c[m+1];f[p++]=r*g+s*x+u,f[p++]=a*x+n*g+l}}closePath(){const e=this.currentPath;return e&&(e.closeStroke=!0,this.finishPoly()),this}setMatrix(e){return this._matrix=e,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(e){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(e)}};let El=Fa;El.curves=gi,El._TEMP_POINT=new Wt;var QS=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Il={},tA={get exports(){return Il},set exports(e){Il=e}};/*!
1924
1924
  * d-path-parser - v1.0.0
1925
1925
  * by Massimo Artizzu (MaxArt2501)
1926
1926
  *
@@ -1928,27 +1928,27 @@ void main() {
1928
1928
  *
1929
1929
  * Licensed under the MIT License
1930
1930
  * See LICENSE for details
1931
- */(function(e,t){(function(r,n){e.exports=n()})(QS,function(){return function(n){for(var s={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},a={number:function(S){return+x("number",S)},"coordinate pair":function(S){var T=x("number",S);if(T===null&&!S)return null;x("comma");var w=x("number",!0);return{x:+T,y:+w}},"arc definition":function(S){var T=a["coordinate pair"](S);if(!T&&!S)return null;x("comma");var w=+x("number",!0);x("comma",!0);var I=!!+x("flag",!0);x("comma");var A=!!+x("flag",!0);x("comma");var R=a["coordinate pair"](!0);return{radii:T,rotation:w,large:I,clockwise:A,end:R}}},u=0,l=[];u<n.length;){var c=x("command"),f=c.toUpperCase(),p=c!==f,m;switch(f){case"M":m=y("coordinate pair").map(function(S,T){return T===1&&(c=p?"l":"L"),g({end:S})});break;case"L":case"T":m=y("coordinate pair").map(function(S){return g({end:S})});break;case"C":if(m=y("coordinate pair"),m.length%3)throw Error("Expected coordinate pair triplet at position "+u);m=m.reduce(function(S,T,w){var I=w%3;if(!I)S.push(g({cp1:T}));else{var A=S[S.length-1];A[I===1?"cp2":"end"]=T}return S},[]);break;case"Q":case"S":if(m=y("coordinate pair"),m.length&1)throw Error("Expected coordinate pair couple at position "+u);m=m.reduce(function(S,T,w){var I=w&1;if(!I)S.push(g({cp:T}));else{var A=S[S.length-1];A.end=T}return S},[]);break;case"H":case"V":m=y("number").map(function(S){return g({value:S})});break;case"A":m=y("arc definition").map(g);break;case"Z":m=[{code:"Z"}];break}l.push.apply(l,m)}return l;function g(S){return S.code=c,S.relative=p,S}function x(S,T){s[S].lastIndex=u;var w=s[S].exec(n);if(!w||w.index!==u){if(!T)return null;throw Error("Expected "+S+" at position "+u)}return u=s[S].lastIndex,w[1]}function y(S){for(var T=[],w,I=!0;w=a[S](I);)T.push(w),I=!!x("comma");return T}}})})(tA);const eA=/^\s+/,rA=/\s+$/;function nt(e,t){if(e=e||"",t=t||{},e instanceof nt)return e;if(!(this instanceof nt))return new nt(e,t);var r=nA(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}nt.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,r,n,s,a,u;return t=e.r/255,r=e.g/255,n=e.b/255,t<=.03928?s=t/12.92:s=Math.pow((t+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),n<=.03928?u=n/12.92:u=Math.pow((n+.055)/1.055,2.4),.2126*s+.7152*a+.0722*u},setAlpha:function(e){return this._a=Ip(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Sp(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Sp(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=wp(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=wp(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return Ap(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return oA(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(te(this._r,255)*100)+"%",g:Math.round(te(this._g,255)*100)+"%",b:Math.round(te(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(te(this._r,255)*100)+"%, "+Math.round(te(this._g,255)*100)+"%, "+Math.round(te(this._b,255)*100)+"%)":"rgba("+Math.round(te(this._r,255)*100)+"%, "+Math.round(te(this._g,255)*100)+"%, "+Math.round(te(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:_A[Ap(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+Cp(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var s=nt(e);r="#"+Cp(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0,s=!t&&n&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return s?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return nt(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(cA,arguments)},brighten:function(){return this._applyModification(fA,arguments)},darken:function(){return this._applyModification(dA,arguments)},desaturate:function(){return this._applyModification(uA,arguments)},saturate:function(){return this._applyModification(lA,arguments)},greyscale:function(){return this._applyModification(hA,arguments)},spin:function(){return this._applyModification(pA,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(vA,arguments)},complement:function(){return this._applyCombination(gA,arguments)},monochromatic:function(){return this._applyCombination(yA,arguments)},splitcomplement:function(){return this._applyCombination(mA,arguments)},triad:function(){return this._applyCombination(Ep,[3])},tetrad:function(){return this._applyCombination(Ep,[4])}},nt.fromRatio=function(e,t){if(typeof e=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=fs(e[n]));e=r}return nt(e,t)};function nA(e){var t={r:0,g:0,b:0},r=1,n=null,s=null,a=null,u=!1,l=!1;return typeof e=="string"&&(e=wA(e)),typeof e=="object"&&(Dr(e.r)&&Dr(e.g)&&Dr(e.b)?(t=iA(e.r,e.g,e.b),u=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Dr(e.h)&&Dr(e.s)&&Dr(e.v)?(n=fs(e.s),s=fs(e.v),t=aA(e.h,n,s),u=!0,l="hsv"):Dr(e.h)&&Dr(e.s)&&Dr(e.l)&&(n=fs(e.s),a=fs(e.l),t=sA(e.h,n,a),u=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Ip(r),{ok:u,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function iA(e,t,r){return{r:te(e,255)*255,g:te(t,255)*255,b:te(r,255)*255}}function wp(e,t,r){e=te(e,255),t=te(t,255),r=te(r,255);var n=Math.max(e,t,r),s=Math.min(e,t,r),a,u,l=(n+s)/2;if(n==s)a=u=0;else{var c=n-s;switch(u=l>.5?c/(2-n-s):c/(n+s),n){case e:a=(t-r)/c+(t<r?6:0);break;case t:a=(r-e)/c+2;break;case r:a=(e-t)/c+4;break}a/=6}return{h:a,s:u,l}}function sA(e,t,r){var n,s,a;e=te(e,360),t=te(t,100),r=te(r,100);function u(f,p,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?f+(p-f)*6*m:m<1/2?p:m<2/3?f+(p-f)*(2/3-m)*6:f}if(t===0)n=s=a=r;else{var l=r<.5?r*(1+t):r+t-r*t,c=2*r-l;n=u(c,l,e+1/3),s=u(c,l,e),a=u(c,l,e-1/3)}return{r:n*255,g:s*255,b:a*255}}function Sp(e,t,r){e=te(e,255),t=te(t,255),r=te(r,255);var n=Math.max(e,t,r),s=Math.min(e,t,r),a,u,l=n,c=n-s;if(u=n===0?0:c/n,n==s)a=0;else{switch(n){case e:a=(t-r)/c+(t<r?6:0);break;case t:a=(r-e)/c+2;break;case r:a=(e-t)/c+4;break}a/=6}return{h:a,s:u,v:l}}function aA(e,t,r){e=te(e,360)*6,t=te(t,100),r=te(r,100);var n=Math.floor(e),s=e-n,a=r*(1-t),u=r*(1-s*t),l=r*(1-(1-s)*t),c=n%6,f=[r,u,a,a,l,r][c],p=[l,r,r,u,a,a][c],m=[a,a,l,r,r,u][c];return{r:f*255,g:p*255,b:m*255}}function Ap(e,t,r,n){var s=[fr(Math.round(e).toString(16)),fr(Math.round(t).toString(16)),fr(Math.round(r).toString(16))];return n&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function oA(e,t,r,n,s){var a=[fr(Math.round(e).toString(16)),fr(Math.round(t).toString(16)),fr(Math.round(r).toString(16)),fr(Rp(n))];return s&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Cp(e,t,r,n){var s=[fr(Rp(n)),fr(Math.round(e).toString(16)),fr(Math.round(t).toString(16)),fr(Math.round(r).toString(16))];return s.join("")}nt.equals=function(e,t){return!e||!t?!1:nt(e).toRgbString()==nt(t).toRgbString()},nt.random=function(){return nt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function uA(e,t){t=t===0?0:t||10;var r=nt(e).toHsl();return r.s-=t/100,r.s=Na(r.s),nt(r)}function lA(e,t){t=t===0?0:t||10;var r=nt(e).toHsl();return r.s+=t/100,r.s=Na(r.s),nt(r)}function hA(e){return nt(e).desaturate(100)}function cA(e,t){t=t===0?0:t||10;var r=nt(e).toHsl();return r.l+=t/100,r.l=Na(r.l),nt(r)}function fA(e,t){t=t===0?0:t||10;var r=nt(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),nt(r)}function dA(e,t){t=t===0?0:t||10;var r=nt(e).toHsl();return r.l-=t/100,r.l=Na(r.l),nt(r)}function pA(e,t){var r=nt(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,nt(r)}function gA(e){var t=nt(e).toHsl();return t.h=(t.h+180)%360,nt(t)}function Ep(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=nt(e).toHsl(),n=[nt(e)],s=360/t,a=1;a<t;a++)n.push(nt({h:(r.h+a*s)%360,s:r.s,l:r.l}));return n}function mA(e){var t=nt(e).toHsl(),r=t.h;return[nt(e),nt({h:(r+72)%360,s:t.s,l:t.l}),nt({h:(r+216)%360,s:t.s,l:t.l})]}function vA(e,t,r){t=t||6,r=r||30;var n=nt(e).toHsl(),s=360/r,a=[nt(e)];for(n.h=(n.h-(s*t>>1)+720)%360;--t;)n.h=(n.h+s)%360,a.push(nt(n));return a}function yA(e,t){t=t||6;for(var r=nt(e).toHsv(),n=r.h,s=r.s,a=r.v,u=[],l=1/t;t--;)u.push(nt({h:n,s,v:a})),a=(a+l)%1;return u}nt.mix=function(e,t,r){r=r===0?0:r||50;var n=nt(e).toRgb(),s=nt(t).toRgb(),a=r/100,u={r:(s.r-n.r)*a+n.r,g:(s.g-n.g)*a+n.g,b:(s.b-n.b)*a+n.b,a:(s.a-n.a)*a+n.a};return nt(u)},nt.readability=function(e,t){var r=nt(e),n=nt(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},nt.isReadable=function(e,t,r){var n=nt.readability(e,t),s,a;switch(a=!1,s=SA(r),s.level+s.size){case"AAsmall":case"AAAlarge":a=n>=4.5;break;case"AAlarge":a=n>=3;break;case"AAAsmall":a=n>=7;break}return a},nt.mostReadable=function(e,t,r){var n=null,s=0,a,u,l,c;r=r||{},u=r.includeFallbackColors,l=r.level,c=r.size;for(var f=0;f<t.length;f++)a=nt.readability(e,t[f]),a>s&&(s=a,n=nt(t[f]));return nt.isReadable(e,n,{level:l,size:c})||!u?n:(r.includeFallbackColors=!1,nt.mostReadable(e,["#fff","#000"],r))};var Rl=nt.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},_A=nt.hexNames=xA(Rl);function xA(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Ip(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function te(e,t){bA(e)&&(e="100%");var r=TA(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Na(e){return Math.min(1,Math.max(0,e))}function $e(e){return parseInt(e,16)}function bA(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function TA(e){return typeof e=="string"&&e.indexOf("%")!=-1}function fr(e){return e.length==1?"0"+e:""+e}function fs(e){return e<=1&&(e=e*100+"%"),e}function Rp(e){return Math.round(parseFloat(e)*255).toString(16)}function Pp(e){return $e(e)/255}var dr=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",s="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+s),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+s),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+s),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Dr(e){return!!dr.CSS_UNIT.exec(e)}function wA(e){e=e.replace(eA,"").replace(rA,"").toLowerCase();var t=!1;if(Rl[e])e=Rl[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=dr.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=dr.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=dr.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=dr.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=dr.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=dr.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=dr.hex8.exec(e))?{r:$e(r[1]),g:$e(r[2]),b:$e(r[3]),a:Pp(r[4]),format:t?"name":"hex8"}:(r=dr.hex6.exec(e))?{r:$e(r[1]),g:$e(r[2]),b:$e(r[3]),format:t?"name":"hex"}:(r=dr.hex4.exec(e))?{r:$e(r[1]+""+r[1]),g:$e(r[2]+""+r[2]),b:$e(r[3]+""+r[3]),a:Pp(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=dr.hex3.exec(e))?{r:$e(r[1]+""+r[1]),g:$e(r[2]+""+r[2]),b:$e(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function SA(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}var AA=function(){function e(t,r){var n=[],s=!0,a=!1,u=void 0;try{for(var l=t[Symbol.iterator](),c;!(s=(c=l.next()).done)&&(n.push(c.value),!(r&&n.length===r));s=!0);}catch(f){a=!0,u=f}finally{try{!s&&l.return&&l.return()}finally{if(a)throw u}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),ds=Math.PI*2,Pl=function(t,r,n,s,a,u,l){var c=t.x,f=t.y;c*=r,f*=n;var p=s*c-a*f,m=a*c+s*f;return{x:p+u,y:m+l}},CA=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),s=Math.cos(t),a=Math.sin(t),u=Math.cos(t+r),l=Math.sin(t+r);return[{x:s-a*n,y:a+s*n},{x:u+l*n,y:l-u*n},{x:u,y:l}]},Mp=function(t,r,n,s){var a=t*s-r*n<0?-1:1,u=t*n+r*s;return u>1&&(u=1),u<-1&&(u=-1),a*Math.acos(u)},EA=function(t,r,n,s,a,u,l,c,f,p,m,g){var x=Math.pow(a,2),y=Math.pow(u,2),S=Math.pow(m,2),T=Math.pow(g,2),w=x*y-x*T-y*S;w<0&&(w=0),w/=x*T+y*S,w=Math.sqrt(w)*(l===c?-1:1);var I=w*a/u*g,A=w*-u/a*m,R=p*I-f*A+(t+n)/2,N=f*I+p*A+(r+s)/2,B=(m-I)/a,L=(g-A)/u,O=(-m-I)/a,z=(-g-A)/u,X=Mp(1,0,B,L),tt=Mp(B,L,O,z);return c===0&&tt>0&&(tt-=ds),c===1&&tt<0&&(tt+=ds),[R,N,X,tt]},Op=function(t){var r=t.px,n=t.py,s=t.cx,a=t.cy,u=t.rx,l=t.ry,c=t.xAxisRotation,f=c===void 0?0:c,p=t.largeArcFlag,m=p===void 0?0:p,g=t.sweepFlag,x=g===void 0?0:g,y=[];if(u===0||l===0)return[];var S=Math.sin(f*ds/360),T=Math.cos(f*ds/360),w=T*(r-s)/2+S*(n-a)/2,I=-S*(r-s)/2+T*(n-a)/2;if(w===0&&I===0)return[];u=Math.abs(u),l=Math.abs(l);var A=Math.pow(w,2)/Math.pow(u,2)+Math.pow(I,2)/Math.pow(l,2);A>1&&(u*=Math.sqrt(A),l*=Math.sqrt(A));var R=EA(r,n,s,a,u,l,m,x,S,T,w,I),N=AA(R,4),B=N[0],L=N[1],O=N[2],z=N[3],X=Math.abs(z)/(ds/4);Math.abs(1-X)<1e-7&&(X=1);var tt=Math.max(Math.ceil(X),1);z/=tt;for(var it=0;it<tt;it++)y.push(CA(O,z)),O+=z;return y.map(function(V){var j=Pl(V[0],u,l,T,S,B,L),xt=j.x,kt=j.y,G=Pl(V[1],u,l,T,S,B,L),rt=G.x,gt=G.y,H=Pl(V[2],u,l,T,S,B,L),K=H.x,ct=H.y;return{x1:xt,y1:kt,x2:rt,y2:gt,x:K,y:ct}})};class IA extends El{constructor(t){super(),this.lineColor=null,t&&this.drawSVG(t)}drawSVG(t){if(typeof t=="string"){const r=document.createElement("div");r.innerHTML=t.trim(),t=r.querySelector("svg")}if(!t)throw new Error("Missing <svg> element in SVG constructor");return this._svgFill(t),this._svgChildren(t.children),this}_svgChildren(t,r=!1){for(let n=0;n<t.length;n++){const s=t[n];switch(this._svgFill(s,r),s.nodeName.toLowerCase()){case"path":{this._svgPath(s);break}case"circle":case"ellipse":{this._svgCircle(s);break}case"rect":{this._svgRect(s);break}case"polygon":{this._svgPoly(s,!0);break}case"polyline":{this._svgPoly(s);break}case"g":break;default:{console.info(`[PIXI.SVG] <${s.nodeName}> elements unsupported`);break}}this._svgChildren(s.children,!0)}}_hexToUint(t){if(t[0]==="#")return t=t.substr(1),t.length===3&&(t=t.replace(/([a-f0-9])/ig,"$1$1")),parseInt(t,16);const{r,g:n,b:s}=nt(t).toRgb();return(r<<16)+(n<<8)+s}_svgCircle(t){let r="r",n="r";const s=t.nodeName==="elipse";s&&(r+="x",n+="y");const a=parseFloat(t.getAttribute(n)),u=parseFloat(t.getAttribute(r)),l=t.getAttribute("cx"),c=t.getAttribute("cy");let f=0,p=0;l!==null&&(f=parseFloat(l)),c!==null&&(p=parseFloat(c)),s?this.drawEllipse(f,p,a,u):this.drawCircle(f,p,a)}_svgRect(t){const r=parseFloat(t.getAttribute("x")),n=parseFloat(t.getAttribute("y")),s=parseFloat(t.getAttribute("width")),a=parseFloat(t.getAttribute("height")),u=parseFloat(t.getAttribute("rx"));u?this.drawRoundedRect(r,n,s,a,u):this.drawRect(r,n,s,a)}_convertStyleName(t){return t.trim().replace("-width","Width").replace(/.*-(line)?/,"")}_svgStyle(t){const r=t.getAttribute("style"),n=t.getAttribute("opacity"),s={fill:t.getAttribute("fill"),opacity:n||t.getAttribute("fill-opacity"),stroke:t.getAttribute("stroke"),strokeOpacity:n||t.getAttribute("stroke-opacity"),strokeWidth:t.getAttribute("stroke-width"),cap:t.getAttribute("stroke-linecap"),join:t.getAttribute("stroke-linejoin"),miterLimit:t.getAttribute("stroke-miterlimit")};return r!==null&&r.split(";").forEach(a=>{const[u,l]=a.split(":");if(u){const c=this._convertStyleName(u);s[c]||(s[c]=l.trim())}}),s}_svgPoly(t,r){const n=t.getAttribute("points").split(/[ ,]/g).map(s=>parseInt(s,10));this.drawPolygon(n),r&&this.closePath()}_svgFill(t,r){const{fill:n,opacity:s,stroke:a,strokeOpacity:u,strokeWidth:l,cap:c,join:f,miterLimit:p}=this._svgStyle(t),g=l!==null?parseFloat(l):a!==null?1:0,x=a!==null?this._hexToUint(a):this.lineColor;n?n==="none"?this.beginFill(0,0):this.beginFill(this._hexToUint(n),s!==null?parseFloat(s):1):r||this.beginFill(0),this.lineStyle({width:a===null&&l===null&&r?this.line.width:g,alpha:u===null?this.line.alpha:parseFloat(u),color:a===null&&r?this.line.color:x,cap:c===null&&r?this.line.cap:c,join:f===null&&r?this.line.join:f,miterLimit:p===null&&r?this.line.miterLimit:parseFloat(p)}),t.getAttribute("fill-rule")&&console.info('[PIXI.SVG] "fill-rule" attribute is not supported')}_svgPath(t){const r=t.getAttribute("d");let n=0,s=0;const a=Il(r.trim());for(let u=0;u<a.length;u++){const l=a[u];switch(l.code){case"m":{this.moveTo(n+=l.end.x,s+=l.end.y);break}case"M":{this.moveTo(n=l.end.x,s=l.end.y);break}case"H":{this.lineTo(n=l.value,s);break}case"h":{this.lineTo(n+=l.value,s);break}case"V":{this.lineTo(n,s=l.value);break}case"v":{this.lineTo(n,s+=l.value);break}case"Z":{this.closePath();break}case"L":{this.lineTo(n=l.end.x,s=l.end.y);break}case"l":{this.lineTo(n+=l.end.x,s+=l.end.y);break}case"C":{this.bezierCurveTo(l.cp1.x,l.cp1.y,l.cp2.x,l.cp2.y,n=l.end.x,s=l.end.y);break}case"c":{const c=n,f=s;this.bezierCurveTo(c+l.cp1.x,f+l.cp1.y,c+l.cp2.x,f+l.cp2.y,n+=l.end.x,s+=l.end.y);break}case"s":case"q":{const c=n,f=s;this.quadraticCurveTo(c+l.cp.x,f+l.cp.y,n+=l.end.x,s+=l.end.y);break}case"S":case"Q":{this.quadraticCurveTo(l.cp.x,l.cp.y,n=l.end.x,s=l.end.y);break}case"a":{Op({px:n,py:s,cx:n+=l.end.x,cy:s+=l.end.y,rx:l.radii.x,ry:l.radii.y,xAxisRotation:l.rotation,largeArcFlag:l.large?1:0,sweepFlag:l.clockwise?1:0}).forEach(({x1:c,y1:f,x2:p,y2:m,x:g,y:x})=>this.bezierCurveTo(c,f,p,m,g,x));break}case"A":{Op({px:n,py:s,cx:n=l.end.x,cy:s=l.end.y,rx:l.radii.x,ry:l.radii.y,xAxisRotation:l.rotation,largeArcFlag:l.large?1:0,sweepFlag:l.clockwise?1:0}).forEach(({x1:c,y1:f,x2:p,y2:m,x:g,y:x})=>this.bezierCurveTo(c,f,p,m,g,x));break}default:{console.info("[PIXI.SVG] Draw command not supported:",l.code,l);break}}}}}var La={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},RA=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function PA(e){return e===10||e===13||e===8232||e===8233||e===32||e===9||e===11||e===12||e===160||e>=5760&&RA.indexOf(e)>=0}function MA(e){switch(e|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function OA(e){return(e|32)===97}function _i(e){return e>=48&&e<=57}function FA(e){return e>=48&&e<=57||e===43||e===45||e===46}function NA(e){this.index=0,this.path=e,this.max=e.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function ka(e){for(;e.index<e.max&&PA(e.path.charCodeAt(e.index));)e.index++}function LA(e){var t=e.path.charCodeAt(e.index);if(t===48){e.param=0,e.index++;return}if(t===49){e.param=1,e.index++;return}e.err="SvgPath: arc flag can be 0 or 1 only (at pos "+e.index+")"}function kA(e){var t=e.index,r=t,n=e.max,s=!1,a=!1,u=!1,l=!1,c;if(r>=n){e.err="SvgPath: missed param (at pos "+r+")";return}if(c=e.path.charCodeAt(r),(c===43||c===45)&&(r++,c=r<n?e.path.charCodeAt(r):0),!_i(c)&&c!==46){e.err="SvgPath: param should start with 0..9 or `.` (at pos "+r+")";return}if(c!==46){if(s=c===48,r++,c=r<n?e.path.charCodeAt(r):0,s&&r<n&&c&&_i(c)){e.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+t+")";return}for(;r<n&&_i(e.path.charCodeAt(r));)r++,a=!0;c=r<n?e.path.charCodeAt(r):0}if(c===46){for(l=!0,r++;_i(e.path.charCodeAt(r));)r++,u=!0;c=r<n?e.path.charCodeAt(r):0}if(c===101||c===69){if(l&&!a&&!u){e.err="SvgPath: invalid float exponent (at pos "+r+")";return}if(r++,c=r<n?e.path.charCodeAt(r):0,(c===43||c===45)&&r++,r<n&&_i(e.path.charCodeAt(r)))for(;r<n&&_i(e.path.charCodeAt(r));)r++;else{e.err="SvgPath: invalid float exponent (at pos "+r+")";return}}e.index=r,e.param=parseFloat(e.path.slice(t,r))+0}function Ml(e){var t,r;t=e.path[e.segmentStart],r=t.toLowerCase();var n=e.data;if(r==="m"&&n.length>2&&(e.result.push([t,n[0],n[1]]),n=n.slice(2),r="l",t=t==="m"?"l":"L"),r==="r")e.result.push([t].concat(n));else for(;n.length>=La[r]&&(e.result.push([t].concat(n.splice(0,La[r]))),!!La[r]););}function BA(e){var t=e.max,r,n,s,a,u;if(e.segmentStart=e.index,r=e.path.charCodeAt(e.index),n=OA(r),!MA(r)){e.err="SvgPath: bad command "+e.path[e.index]+" (at pos "+e.index+")";return}if(a=La[e.path[e.index].toLowerCase()],e.index++,ka(e),e.data=[],!a){Ml(e);return}for(s=!1;;){for(u=a;u>0;u--){if(n&&(u===3||u===4)?LA(e):kA(e),e.err.length){Ml(e);return}e.data.push(e.param),ka(e),s=!1,e.index<t&&e.path.charCodeAt(e.index)===44&&(e.index++,ka(e),s=!0)}if(!s&&(e.index>=e.max||!FA(e.path.charCodeAt(e.index))))break}Ml(e)}var DA=function(t){var r=new NA(t),n=r.max;for(ka(r);r.index<n&&!r.err.length;)BA(r);return r.result.length&&("mM".indexOf(r.result[0][0])<0?(r.err="SvgPath: string should start with `M` or `m`",r.result=[]):r.result[0][0]="M"),{err:r.err,segments:r.result}};function UA(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}function pr(){if(!(this instanceof pr))return new pr;this.queue=[],this.cache=null}pr.prototype.matrix=function(e){return e[0]===1&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===0&&e[5]===0?this:(this.cache=null,this.queue.push(e),this)},pr.prototype.translate=function(e,t){return(e!==0||t!==0)&&(this.cache=null,this.queue.push([1,0,0,1,e,t])),this},pr.prototype.scale=function(e,t){return(e!==1||t!==1)&&(this.cache=null,this.queue.push([e,0,0,t,0,0])),this},pr.prototype.rotate=function(e,t,r){var n,s,a;return e!==0&&(this.translate(t,r),n=e*Math.PI/180,s=Math.cos(n),a=Math.sin(n),this.queue.push([s,a,-a,s,0,0]),this.cache=null,this.translate(-t,-r)),this},pr.prototype.skewX=function(e){return e!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(e*Math.PI/180),1,0,0])),this},pr.prototype.skewY=function(e){return e!==0&&(this.cache=null,this.queue.push([1,Math.tan(e*Math.PI/180),0,1,0,0])),this},pr.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var e=1;e<this.queue.length;e++)this.cache=UA(this.cache,this.queue[e]);return this.cache},pr.prototype.calc=function(e,t,r){var n;return this.queue.length?(this.cache||(this.cache=this.toArray()),n=this.cache,[e*n[0]+t*n[2]+(r?0:n[4]),e*n[1]+t*n[3]+(r?0:n[5])]):[e,t]};var Fp=pr,$A=Fp,GA={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},zA=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,HA=/[\s,]+/,VA=function(t){var r=new $A,n,s;return t.split(zA).forEach(function(a){if(a.length){if(typeof GA[a]<"u"){n=a;return}switch(s=a.split(HA).map(function(u){return+u||0}),n){case"matrix":s.length===6&&r.matrix(s);return;case"scale":s.length===1?r.scale(s[0],s[0]):s.length===2&&r.scale(s[0],s[1]);return;case"rotate":s.length===1?r.rotate(s[0],0,0):s.length===3&&r.rotate(s[0],s[1],s[2]);return;case"translate":s.length===1?r.translate(s[0],0):s.length===2&&r.translate(s[0],s[1]);return;case"skewX":s.length===1&&r.skewX(s[0]);return;case"skewY":s.length===1&&r.skewY(s[0]);return}}}),r},ps=Math.PI*2;function Np(e,t,r,n){var s=e*n-t*r<0?-1:1,a=e*r+t*n;return a>1&&(a=1),a<-1&&(a=-1),s*Math.acos(a)}function jA(e,t,r,n,s,a,u,l,c,f){var p=f*(e-r)/2+c*(t-n)/2,m=-c*(e-r)/2+f*(t-n)/2,g=u*u,x=l*l,y=p*p,S=m*m,T=g*x-g*S-x*y;T<0&&(T=0),T/=g*S+x*y,T=Math.sqrt(T)*(s===a?-1:1);var w=T*u/l*m,I=T*-l/u*p,A=f*w-c*I+(e+r)/2,R=c*w+f*I+(t+n)/2,N=(p-w)/u,B=(m-I)/l,L=(-p-w)/u,O=(-m-I)/l,z=Np(1,0,N,B),X=Np(N,B,L,O);return a===0&&X>0&&(X-=ps),a===1&&X<0&&(X+=ps),[A,R,z,X]}function XA(e,t){var r=1.3333333333333333*Math.tan(t/4),n=Math.cos(e),s=Math.sin(e),a=Math.cos(e+t),u=Math.sin(e+t);return[n,s,n-s*r,s+n*r,a+u*r,u-a*r,a,u]}var WA=function(t,r,n,s,a,u,l,c,f){var p=Math.sin(f*ps/360),m=Math.cos(f*ps/360),g=m*(t-n)/2+p*(r-s)/2,x=-p*(t-n)/2+m*(r-s)/2;if(g===0&&x===0)return[];if(l===0||c===0)return[];l=Math.abs(l),c=Math.abs(c);var y=g*g/(l*l)+x*x/(c*c);y>1&&(l*=Math.sqrt(y),c*=Math.sqrt(y));var S=jA(t,r,n,s,a,u,l,c,p,m),T=[],w=S[2],I=S[3],A=Math.max(Math.ceil(Math.abs(I)/(ps/4)),1);I/=A;for(var R=0;R<A;R++)T.push(XA(w,I)),w+=I;return T.map(function(N){for(var B=0;B<N.length;B+=2){var L=N[B+0],O=N[B+1];L*=l,O*=c;var z=m*L-p*O,X=p*L+m*O;N[B+0]=z+S[0],N[B+1]=X+S[1]}return N})},gs=1e-10,Lp=Math.PI/180;function ms(e,t,r){if(!(this instanceof ms))return new ms(e,t,r);this.rx=e,this.ry=t,this.ax=r}ms.prototype.transform=function(e){var t=Math.cos(this.ax*Lp),r=Math.sin(this.ax*Lp),n=[this.rx*(e[0]*t+e[2]*r),this.rx*(e[1]*t+e[3]*r),this.ry*(-e[0]*r+e[2]*t),this.ry*(-e[1]*r+e[3]*t)],s=n[0]*n[0]+n[2]*n[2],a=n[1]*n[1]+n[3]*n[3],u=((n[0]-n[3])*(n[0]-n[3])+(n[2]+n[1])*(n[2]+n[1]))*((n[0]+n[3])*(n[0]+n[3])+(n[2]-n[1])*(n[2]-n[1])),l=(s+a)/2;if(u<gs*l)return this.rx=this.ry=Math.sqrt(l),this.ax=0,this;var c=n[0]*n[1]+n[2]*n[3];u=Math.sqrt(u);var f=l+u/2,p=l-u/2;return this.ax=Math.abs(c)<gs&&Math.abs(f-a)<gs?90:Math.atan(Math.abs(c)>Math.abs(f-a)?(f-s)/c:c/(f-a))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(f),this.ry=Math.sqrt(p)):(this.ax+=90,this.rx=Math.sqrt(p),this.ry=Math.sqrt(f)),this},ms.prototype.isDegenerate=function(){return this.rx<gs*this.ry||this.ry<gs*this.rx};var qA=ms,YA=DA,KA=VA,nn=Fp,ZA=WA,JA=qA;function ie(e){if(!(this instanceof ie))return new ie(e);var t=YA(e);this.segments=t.segments,this.err=t.err,this.__stack=[]}ie.from=function(e){if(typeof e=="string")return new ie(e);if(e instanceof ie){var t=new ie("");return t.err=e.err,t.segments=e.segments.map(function(r){return r.slice()}),t.__stack=e.__stack.map(function(r){return nn().matrix(r.toArray())}),t}throw new Error("SvgPath.from: invalid param type "+e)},ie.prototype.__matrix=function(e){var t=this,r;e.queue.length&&this.iterate(function(n,s,a,u){var l,c,f,p;switch(n[0]){case"v":l=e.calc(0,n[1],!0),c=l[0]===0?["v",l[1]]:["l",l[0],l[1]];break;case"V":l=e.calc(a,n[1],!1),c=l[0]===e.calc(a,u,!1)[0]?["V",l[1]]:["L",l[0],l[1]];break;case"h":l=e.calc(n[1],0,!0),c=l[1]===0?["h",l[0]]:["l",l[0],l[1]];break;case"H":l=e.calc(n[1],u,!1),c=l[1]===e.calc(a,u,!1)[1]?["H",l[0]]:["L",l[0],l[1]];break;case"a":case"A":var m=e.toArray(),g=JA(n[1],n[2],n[3]).transform(m);if(m[0]*m[3]-m[1]*m[2]<0&&(n[5]=n[5]?"0":"1"),l=e.calc(n[6],n[7],n[0]==="a"),n[0]==="A"&&n[6]===a&&n[7]===u||n[0]==="a"&&n[6]===0&&n[7]===0){c=[n[0]==="a"?"l":"L",l[0],l[1]];break}g.isDegenerate()?c=[n[0]==="a"?"l":"L",l[0],l[1]]:c=[n[0],g.rx,g.ry,g.ax,n[4],n[5],l[0],l[1]];break;case"m":p=s>0,l=e.calc(n[1],n[2],p),c=["m",l[0],l[1]];break;default:for(f=n[0],c=[f],p=f.toLowerCase()===f,r=1;r<n.length;r+=2)l=e.calc(n[r],n[r+1],p),c.push(l[0],l[1])}t.segments[s]=c},!0)},ie.prototype.__evaluateStack=function(){var e,t;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(e=nn(),t=this.__stack.length;--t>=0;)e.matrix(this.__stack[t].toArray());this.__matrix(e),this.__stack=[]}},ie.prototype.toString=function(){var e="",t="",r=!1;this.__evaluateStack();for(var n=0,s=this.segments.length;n<s;n++){var a=this.segments[n],u=a[0];u!==t||u==="m"||u==="M"?(u==="m"&&t==="z"&&(e+=" "),e+=u,r=!1):r=!0;for(var l=1;l<a.length;l++){var c=a[l];l===1?r&&c>=0&&(e+=" "):c>=0&&(e+=" "),e+=c}t=u}return e},ie.prototype.translate=function(e,t){return this.__stack.push(nn().translate(e,t||0)),this},ie.prototype.scale=function(e,t){return this.__stack.push(nn().scale(e,!t&&t!==0?e:t)),this},ie.prototype.rotate=function(e,t,r){return this.__stack.push(nn().rotate(e,t||0,r||0)),this},ie.prototype.skewX=function(e){return this.__stack.push(nn().skewX(e)),this},ie.prototype.skewY=function(e){return this.__stack.push(nn().skewY(e)),this},ie.prototype.matrix=function(e){return this.__stack.push(nn().matrix(e)),this},ie.prototype.transform=function(e){return e.trim()?(this.__stack.push(KA(e)),this):this},ie.prototype.round=function(e){var t=0,r=0,n=0,s=0,a;return e=e||0,this.__evaluateStack(),this.segments.forEach(function(u){var l=u[0].toLowerCase()===u[0];switch(u[0]){case"H":case"h":l&&(u[1]+=n),n=u[1]-u[1].toFixed(e),u[1]=+u[1].toFixed(e);return;case"V":case"v":l&&(u[1]+=s),s=u[1]-u[1].toFixed(e),u[1]=+u[1].toFixed(e);return;case"Z":case"z":n=t,s=r;return;case"M":case"m":l&&(u[1]+=n,u[2]+=s),n=u[1]-u[1].toFixed(e),s=u[2]-u[2].toFixed(e),t=n,r=s,u[1]=+u[1].toFixed(e),u[2]=+u[2].toFixed(e);return;case"A":case"a":l&&(u[6]+=n,u[7]+=s),n=u[6]-u[6].toFixed(e),s=u[7]-u[7].toFixed(e),u[1]=+u[1].toFixed(e),u[2]=+u[2].toFixed(e),u[3]=+u[3].toFixed(e+2),u[6]=+u[6].toFixed(e),u[7]=+u[7].toFixed(e);return;default:a=u.length,l&&(u[a-2]+=n,u[a-1]+=s),n=u[a-2]-u[a-2].toFixed(e),s=u[a-1]-u[a-1].toFixed(e),u.forEach(function(c,f){f&&(u[f]=+u[f].toFixed(e))});return}}),this},ie.prototype.iterate=function(e,t){var r=this.segments,n={},s=!1,a=0,u=0,l=0,c=0,f,p,m;if(t||this.__evaluateStack(),r.forEach(function(g,x){var y=e(g,x,a,u);Array.isArray(y)&&(n[x]=y,s=!0);var S=g[0]===g[0].toLowerCase();switch(g[0]){case"m":case"M":a=g[1]+(S?a:0),u=g[2]+(S?u:0),l=a,c=u;return;case"h":case"H":a=g[1]+(S?a:0);return;case"v":case"V":u=g[1]+(S?u:0);return;case"z":case"Z":a=l,u=c;return;default:a=g[g.length-2]+(S?a:0),u=g[g.length-1]+(S?u:0)}}),!s)return this;for(m=[],f=0;f<r.length;f++)if(typeof n[f]<"u")for(p=0;p<n[f].length;p++)m.push(n[f][p]);else m.push(r[f]);return this.segments=m,this},ie.prototype.abs=function(){return this.iterate(function(e,t,r,n){var s=e[0],a=s.toUpperCase(),u;if(s!==a)switch(e[0]=a,s){case"v":e[1]+=n;return;case"a":e[6]+=r,e[7]+=n;return;default:for(u=1;u<e.length;u++)e[u]+=u%2?r:n}},!0),this},ie.prototype.rel=function(){return this.iterate(function(e,t,r,n){var s=e[0],a=s.toLowerCase(),u;if(s!==a&&!(t===0&&s==="M"))switch(e[0]=a,s){case"V":e[1]-=n;return;case"A":e[6]-=r,e[7]-=n;return;default:for(u=1;u<e.length;u++)e[u]-=u%2?r:n}},!0),this},ie.prototype.unarc=function(){return this.iterate(function(e,t,r,n){var s,a,u,l=[],c=e[0];return c!=="A"&&c!=="a"?null:(c==="a"?(a=r+e[6],u=n+e[7]):(a=e[6],u=e[7]),s=ZA(r,n,a,u,e[4],e[5],e[1],e[2],e[3]),s.length===0?[[e[0]==="a"?"l":"L",e[6],e[7]]]:(s.forEach(function(f){l.push(["C",f[2],f[3],f[4],f[5],f[6],f[7]])}),l))}),this},ie.prototype.unshort=function(){var e=this.segments,t,r,n,s,a;return this.iterate(function(u,l,c,f){var p=u[0],m=p.toUpperCase(),g;l&&(m==="T"?(g=p==="t",n=e[l-1],n[0]==="Q"?(t=n[1]-c,r=n[2]-f):n[0]==="q"?(t=n[1]-n[3],r=n[2]-n[4]):(t=0,r=0),s=-t,a=-r,g||(s+=c,a+=f),e[l]=[g?"q":"Q",s,a,u[1],u[2]]):m==="S"&&(g=p==="s",n=e[l-1],n[0]==="C"?(t=n[3]-c,r=n[4]-f):n[0]==="c"?(t=n[3]-n[5],r=n[4]-n[6]):(t=0,r=0),s=-t,a=-r,g||(s+=c,a+=f),e[l]=[g?"c":"C",s,a,u[1],u[2],u[3],u[4]]))}),this};var QA=ie,tC=QA;const eC=Hn(tC),rC=st.forwardRef((e,t)=>{const[r,n]=st.useState(null),s=W.useRef(null),a=W.useRef(null),u=W.useRef(null),{path:l,visible:c,transformation:{x:f,y:p,width:m,height:g,anchor:x,hexColor:y,fill:S,stroke:T="none",strokeWidth:w=0,colorCorrection:I={}},pointerdown:A,pointerup:R}=e,N=Yt.useApp(),{temperatureFilter:B,sharpnessFilter:L,hueFilter:O,blurFilter:z,adjustmentFilter:X}=cs(I),{blurRadius:tt=0}=I;return st.useEffect(()=>{const it=eC(l).scale(5).translate(0,0).toString(),V=`<svg xmlns="http://www.w3.org/2000/svg" width="${m}" height="${g}">
1932
- <path stroke="${T}" stroke-width="${w}" fill="${y||S}" d="${it}">
1931
+ */(function(e,t){(function(r,n){e.exports=n()})(QS,function(){return function(n){for(var s={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},a={number:function(S){return+x("number",S)},"coordinate pair":function(S){var T=x("number",S);if(T===null&&!S)return null;x("comma");var w=x("number",!0);return{x:+T,y:+w}},"arc definition":function(S){var T=a["coordinate pair"](S);if(!T&&!S)return null;x("comma");var w=+x("number",!0);x("comma",!0);var I=!!+x("flag",!0);x("comma");var A=!!+x("flag",!0);x("comma");var R=a["coordinate pair"](!0);return{radii:T,rotation:w,large:I,clockwise:A,end:R}}},u=0,l=[];u<n.length;){var c=x("command"),f=c.toUpperCase(),p=c!==f,m;switch(f){case"M":m=y("coordinate pair").map(function(S,T){return T===1&&(c=p?"l":"L"),g({end:S})});break;case"L":case"T":m=y("coordinate pair").map(function(S){return g({end:S})});break;case"C":if(m=y("coordinate pair"),m.length%3)throw Error("Expected coordinate pair triplet at position "+u);m=m.reduce(function(S,T,w){var I=w%3;if(!I)S.push(g({cp1:T}));else{var A=S[S.length-1];A[I===1?"cp2":"end"]=T}return S},[]);break;case"Q":case"S":if(m=y("coordinate pair"),m.length&1)throw Error("Expected coordinate pair couple at position "+u);m=m.reduce(function(S,T,w){var I=w&1;if(!I)S.push(g({cp:T}));else{var A=S[S.length-1];A.end=T}return S},[]);break;case"H":case"V":m=y("number").map(function(S){return g({value:S})});break;case"A":m=y("arc definition").map(g);break;case"Z":m=[{code:"Z"}];break}l.push.apply(l,m)}return l;function g(S){return S.code=c,S.relative=p,S}function x(S,T){s[S].lastIndex=u;var w=s[S].exec(n);if(!w||w.index!==u){if(!T)return null;throw Error("Expected "+S+" at position "+u)}return u=s[S].lastIndex,w[1]}function y(S){for(var T=[],w,I=!0;w=a[S](I);)T.push(w),I=!!x("comma");return T}}})})(tA);const eA=/^\s+/,rA=/\s+$/;function nt(e,t){if(e=e||"",t=t||{},e instanceof nt)return e;if(!(this instanceof nt))return new nt(e,t);var r=nA(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}nt.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,r,n,s,a,u;return t=e.r/255,r=e.g/255,n=e.b/255,t<=.03928?s=t/12.92:s=Math.pow((t+.055)/1.055,2.4),r<=.03928?a=r/12.92:a=Math.pow((r+.055)/1.055,2.4),n<=.03928?u=n/12.92:u=Math.pow((n+.055)/1.055,2.4),.2126*s+.7152*a+.0722*u},setAlpha:function(e){return this._a=Ip(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Sp(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Sp(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=wp(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=wp(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return Ap(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return oA(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(te(this._r,255)*100)+"%",g:Math.round(te(this._g,255)*100)+"%",b:Math.round(te(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(te(this._r,255)*100)+"%, "+Math.round(te(this._g,255)*100)+"%, "+Math.round(te(this._b,255)*100)+"%)":"rgba("+Math.round(te(this._r,255)*100)+"%, "+Math.round(te(this._g,255)*100)+"%, "+Math.round(te(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:_A[Ap(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+Cp(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var s=nt(e);r="#"+Cp(s._r,s._g,s._b,s._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0,s=!t&&n&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return s?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return nt(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(cA,arguments)},brighten:function(){return this._applyModification(fA,arguments)},darken:function(){return this._applyModification(dA,arguments)},desaturate:function(){return this._applyModification(uA,arguments)},saturate:function(){return this._applyModification(lA,arguments)},greyscale:function(){return this._applyModification(hA,arguments)},spin:function(){return this._applyModification(pA,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(vA,arguments)},complement:function(){return this._applyCombination(gA,arguments)},monochromatic:function(){return this._applyCombination(yA,arguments)},splitcomplement:function(){return this._applyCombination(mA,arguments)},triad:function(){return this._applyCombination(Ep,[3])},tetrad:function(){return this._applyCombination(Ep,[4])}},nt.fromRatio=function(e,t){if(typeof e=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=fs(e[n]));e=r}return nt(e,t)};function nA(e){var t={r:0,g:0,b:0},r=1,n=null,s=null,a=null,u=!1,l=!1;return typeof e=="string"&&(e=wA(e)),typeof e=="object"&&(Dr(e.r)&&Dr(e.g)&&Dr(e.b)?(t=iA(e.r,e.g,e.b),u=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Dr(e.h)&&Dr(e.s)&&Dr(e.v)?(n=fs(e.s),s=fs(e.v),t=aA(e.h,n,s),u=!0,l="hsv"):Dr(e.h)&&Dr(e.s)&&Dr(e.l)&&(n=fs(e.s),a=fs(e.l),t=sA(e.h,n,a),u=!0,l="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Ip(r),{ok:u,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function iA(e,t,r){return{r:te(e,255)*255,g:te(t,255)*255,b:te(r,255)*255}}function wp(e,t,r){e=te(e,255),t=te(t,255),r=te(r,255);var n=Math.max(e,t,r),s=Math.min(e,t,r),a,u,l=(n+s)/2;if(n==s)a=u=0;else{var c=n-s;switch(u=l>.5?c/(2-n-s):c/(n+s),n){case e:a=(t-r)/c+(t<r?6:0);break;case t:a=(r-e)/c+2;break;case r:a=(e-t)/c+4;break}a/=6}return{h:a,s:u,l}}function sA(e,t,r){var n,s,a;e=te(e,360),t=te(t,100),r=te(r,100);function u(f,p,m){return m<0&&(m+=1),m>1&&(m-=1),m<1/6?f+(p-f)*6*m:m<1/2?p:m<2/3?f+(p-f)*(2/3-m)*6:f}if(t===0)n=s=a=r;else{var l=r<.5?r*(1+t):r+t-r*t,c=2*r-l;n=u(c,l,e+1/3),s=u(c,l,e),a=u(c,l,e-1/3)}return{r:n*255,g:s*255,b:a*255}}function Sp(e,t,r){e=te(e,255),t=te(t,255),r=te(r,255);var n=Math.max(e,t,r),s=Math.min(e,t,r),a,u,l=n,c=n-s;if(u=n===0?0:c/n,n==s)a=0;else{switch(n){case e:a=(t-r)/c+(t<r?6:0);break;case t:a=(r-e)/c+2;break;case r:a=(e-t)/c+4;break}a/=6}return{h:a,s:u,v:l}}function aA(e,t,r){e=te(e,360)*6,t=te(t,100),r=te(r,100);var n=Math.floor(e),s=e-n,a=r*(1-t),u=r*(1-s*t),l=r*(1-(1-s)*t),c=n%6,f=[r,u,a,a,l,r][c],p=[l,r,r,u,a,a][c],m=[a,a,l,r,r,u][c];return{r:f*255,g:p*255,b:m*255}}function Ap(e,t,r,n){var s=[fr(Math.round(e).toString(16)),fr(Math.round(t).toString(16)),fr(Math.round(r).toString(16))];return n&&s[0].charAt(0)==s[0].charAt(1)&&s[1].charAt(0)==s[1].charAt(1)&&s[2].charAt(0)==s[2].charAt(1)?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function oA(e,t,r,n,s){var a=[fr(Math.round(e).toString(16)),fr(Math.round(t).toString(16)),fr(Math.round(r).toString(16)),fr(Rp(n))];return s&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Cp(e,t,r,n){var s=[fr(Rp(n)),fr(Math.round(e).toString(16)),fr(Math.round(t).toString(16)),fr(Math.round(r).toString(16))];return s.join("")}nt.equals=function(e,t){return!e||!t?!1:nt(e).toRgbString()==nt(t).toRgbString()},nt.random=function(){return nt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function uA(e,t){t=t===0?0:t||10;var r=nt(e).toHsl();return r.s-=t/100,r.s=Na(r.s),nt(r)}function lA(e,t){t=t===0?0:t||10;var r=nt(e).toHsl();return r.s+=t/100,r.s=Na(r.s),nt(r)}function hA(e){return nt(e).desaturate(100)}function cA(e,t){t=t===0?0:t||10;var r=nt(e).toHsl();return r.l+=t/100,r.l=Na(r.l),nt(r)}function fA(e,t){t=t===0?0:t||10;var r=nt(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),nt(r)}function dA(e,t){t=t===0?0:t||10;var r=nt(e).toHsl();return r.l-=t/100,r.l=Na(r.l),nt(r)}function pA(e,t){var r=nt(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,nt(r)}function gA(e){var t=nt(e).toHsl();return t.h=(t.h+180)%360,nt(t)}function Ep(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=nt(e).toHsl(),n=[nt(e)],s=360/t,a=1;a<t;a++)n.push(nt({h:(r.h+a*s)%360,s:r.s,l:r.l}));return n}function mA(e){var t=nt(e).toHsl(),r=t.h;return[nt(e),nt({h:(r+72)%360,s:t.s,l:t.l}),nt({h:(r+216)%360,s:t.s,l:t.l})]}function vA(e,t,r){t=t||6,r=r||30;var n=nt(e).toHsl(),s=360/r,a=[nt(e)];for(n.h=(n.h-(s*t>>1)+720)%360;--t;)n.h=(n.h+s)%360,a.push(nt(n));return a}function yA(e,t){t=t||6;for(var r=nt(e).toHsv(),n=r.h,s=r.s,a=r.v,u=[],l=1/t;t--;)u.push(nt({h:n,s,v:a})),a=(a+l)%1;return u}nt.mix=function(e,t,r){r=r===0?0:r||50;var n=nt(e).toRgb(),s=nt(t).toRgb(),a=r/100,u={r:(s.r-n.r)*a+n.r,g:(s.g-n.g)*a+n.g,b:(s.b-n.b)*a+n.b,a:(s.a-n.a)*a+n.a};return nt(u)},nt.readability=function(e,t){var r=nt(e),n=nt(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},nt.isReadable=function(e,t,r){var n=nt.readability(e,t),s,a;switch(a=!1,s=SA(r),s.level+s.size){case"AAsmall":case"AAAlarge":a=n>=4.5;break;case"AAlarge":a=n>=3;break;case"AAAsmall":a=n>=7;break}return a},nt.mostReadable=function(e,t,r){var n=null,s=0,a,u,l,c;r=r||{},u=r.includeFallbackColors,l=r.level,c=r.size;for(var f=0;f<t.length;f++)a=nt.readability(e,t[f]),a>s&&(s=a,n=nt(t[f]));return nt.isReadable(e,n,{level:l,size:c})||!u?n:(r.includeFallbackColors=!1,nt.mostReadable(e,["#fff","#000"],r))};var Rl=nt.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},_A=nt.hexNames=xA(Rl);function xA(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Ip(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function te(e,t){bA(e)&&(e="100%");var r=TA(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Na(e){return Math.min(1,Math.max(0,e))}function $e(e){return parseInt(e,16)}function bA(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function TA(e){return typeof e=="string"&&e.indexOf("%")!=-1}function fr(e){return e.length==1?"0"+e:""+e}function fs(e){return e<=1&&(e=e*100+"%"),e}function Rp(e){return Math.round(parseFloat(e)*255).toString(16)}function Pp(e){return $e(e)/255}var dr=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",s="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+s),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+s),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+s),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Dr(e){return!!dr.CSS_UNIT.exec(e)}function wA(e){e=e.replace(eA,"").replace(rA,"").toLowerCase();var t=!1;if(Rl[e])e=Rl[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=dr.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=dr.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=dr.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=dr.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=dr.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=dr.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=dr.hex8.exec(e))?{r:$e(r[1]),g:$e(r[2]),b:$e(r[3]),a:Pp(r[4]),format:t?"name":"hex8"}:(r=dr.hex6.exec(e))?{r:$e(r[1]),g:$e(r[2]),b:$e(r[3]),format:t?"name":"hex"}:(r=dr.hex4.exec(e))?{r:$e(r[1]+""+r[1]),g:$e(r[2]+""+r[2]),b:$e(r[3]+""+r[3]),a:Pp(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=dr.hex3.exec(e))?{r:$e(r[1]+""+r[1]),g:$e(r[2]+""+r[2]),b:$e(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function SA(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}var AA=function(){function e(t,r){var n=[],s=!0,a=!1,u=void 0;try{for(var l=t[Symbol.iterator](),c;!(s=(c=l.next()).done)&&(n.push(c.value),!(r&&n.length===r));s=!0);}catch(f){a=!0,u=f}finally{try{!s&&l.return&&l.return()}finally{if(a)throw u}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),ds=Math.PI*2,Pl=function(t,r,n,s,a,u,l){var c=t.x,f=t.y;c*=r,f*=n;var p=s*c-a*f,m=a*c+s*f;return{x:p+u,y:m+l}},CA=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),s=Math.cos(t),a=Math.sin(t),u=Math.cos(t+r),l=Math.sin(t+r);return[{x:s-a*n,y:a+s*n},{x:u+l*n,y:l-u*n},{x:u,y:l}]},Mp=function(t,r,n,s){var a=t*s-r*n<0?-1:1,u=t*n+r*s;return u>1&&(u=1),u<-1&&(u=-1),a*Math.acos(u)},EA=function(t,r,n,s,a,u,l,c,f,p,m,g){var x=Math.pow(a,2),y=Math.pow(u,2),S=Math.pow(m,2),T=Math.pow(g,2),w=x*y-x*T-y*S;w<0&&(w=0),w/=x*T+y*S,w=Math.sqrt(w)*(l===c?-1:1);var I=w*a/u*g,A=w*-u/a*m,R=p*I-f*A+(t+n)/2,N=f*I+p*A+(r+s)/2,B=(m-I)/a,L=(g-A)/u,O=(-m-I)/a,z=(-g-A)/u,X=Mp(1,0,B,L),tt=Mp(B,L,O,z);return c===0&&tt>0&&(tt-=ds),c===1&&tt<0&&(tt+=ds),[R,N,X,tt]},Op=function(t){var r=t.px,n=t.py,s=t.cx,a=t.cy,u=t.rx,l=t.ry,c=t.xAxisRotation,f=c===void 0?0:c,p=t.largeArcFlag,m=p===void 0?0:p,g=t.sweepFlag,x=g===void 0?0:g,y=[];if(u===0||l===0)return[];var S=Math.sin(f*ds/360),T=Math.cos(f*ds/360),w=T*(r-s)/2+S*(n-a)/2,I=-S*(r-s)/2+T*(n-a)/2;if(w===0&&I===0)return[];u=Math.abs(u),l=Math.abs(l);var A=Math.pow(w,2)/Math.pow(u,2)+Math.pow(I,2)/Math.pow(l,2);A>1&&(u*=Math.sqrt(A),l*=Math.sqrt(A));var R=EA(r,n,s,a,u,l,m,x,S,T,w,I),N=AA(R,4),B=N[0],L=N[1],O=N[2],z=N[3],X=Math.abs(z)/(ds/4);Math.abs(1-X)<1e-7&&(X=1);var tt=Math.max(Math.ceil(X),1);z/=tt;for(var st=0;st<tt;st++)y.push(CA(O,z)),O+=z;return y.map(function(V){var j=Pl(V[0],u,l,T,S,B,L),bt=j.x,kt=j.y,G=Pl(V[1],u,l,T,S,B,L),rt=G.x,gt=G.y,H=Pl(V[2],u,l,T,S,B,L),K=H.x,ct=H.y;return{x1:bt,y1:kt,x2:rt,y2:gt,x:K,y:ct}})};class IA extends El{constructor(t){super(),this.lineColor=null,t&&this.drawSVG(t)}drawSVG(t){if(typeof t=="string"){const r=document.createElement("div");r.innerHTML=t.trim(),t=r.querySelector("svg")}if(!t)throw new Error("Missing <svg> element in SVG constructor");return this._svgFill(t),this._svgChildren(t.children),this}_svgChildren(t,r=!1){for(let n=0;n<t.length;n++){const s=t[n];switch(this._svgFill(s,r),s.nodeName.toLowerCase()){case"path":{this._svgPath(s);break}case"circle":case"ellipse":{this._svgCircle(s);break}case"rect":{this._svgRect(s);break}case"polygon":{this._svgPoly(s,!0);break}case"polyline":{this._svgPoly(s);break}case"g":break;default:{console.info(`[PIXI.SVG] <${s.nodeName}> elements unsupported`);break}}this._svgChildren(s.children,!0)}}_hexToUint(t){if(t[0]==="#")return t=t.substr(1),t.length===3&&(t=t.replace(/([a-f0-9])/ig,"$1$1")),parseInt(t,16);const{r,g:n,b:s}=nt(t).toRgb();return(r<<16)+(n<<8)+s}_svgCircle(t){let r="r",n="r";const s=t.nodeName==="elipse";s&&(r+="x",n+="y");const a=parseFloat(t.getAttribute(n)),u=parseFloat(t.getAttribute(r)),l=t.getAttribute("cx"),c=t.getAttribute("cy");let f=0,p=0;l!==null&&(f=parseFloat(l)),c!==null&&(p=parseFloat(c)),s?this.drawEllipse(f,p,a,u):this.drawCircle(f,p,a)}_svgRect(t){const r=parseFloat(t.getAttribute("x")),n=parseFloat(t.getAttribute("y")),s=parseFloat(t.getAttribute("width")),a=parseFloat(t.getAttribute("height")),u=parseFloat(t.getAttribute("rx"));u?this.drawRoundedRect(r,n,s,a,u):this.drawRect(r,n,s,a)}_convertStyleName(t){return t.trim().replace("-width","Width").replace(/.*-(line)?/,"")}_svgStyle(t){const r=t.getAttribute("style"),n=t.getAttribute("opacity"),s={fill:t.getAttribute("fill"),opacity:n||t.getAttribute("fill-opacity"),stroke:t.getAttribute("stroke"),strokeOpacity:n||t.getAttribute("stroke-opacity"),strokeWidth:t.getAttribute("stroke-width"),cap:t.getAttribute("stroke-linecap"),join:t.getAttribute("stroke-linejoin"),miterLimit:t.getAttribute("stroke-miterlimit")};return r!==null&&r.split(";").forEach(a=>{const[u,l]=a.split(":");if(u){const c=this._convertStyleName(u);s[c]||(s[c]=l.trim())}}),s}_svgPoly(t,r){const n=t.getAttribute("points").split(/[ ,]/g).map(s=>parseInt(s,10));this.drawPolygon(n),r&&this.closePath()}_svgFill(t,r){const{fill:n,opacity:s,stroke:a,strokeOpacity:u,strokeWidth:l,cap:c,join:f,miterLimit:p}=this._svgStyle(t),g=l!==null?parseFloat(l):a!==null?1:0,x=a!==null?this._hexToUint(a):this.lineColor;n?n==="none"?this.beginFill(0,0):this.beginFill(this._hexToUint(n),s!==null?parseFloat(s):1):r||this.beginFill(0),this.lineStyle({width:a===null&&l===null&&r?this.line.width:g,alpha:u===null?this.line.alpha:parseFloat(u),color:a===null&&r?this.line.color:x,cap:c===null&&r?this.line.cap:c,join:f===null&&r?this.line.join:f,miterLimit:p===null&&r?this.line.miterLimit:parseFloat(p)}),t.getAttribute("fill-rule")&&console.info('[PIXI.SVG] "fill-rule" attribute is not supported')}_svgPath(t){const r=t.getAttribute("d");let n=0,s=0;const a=Il(r.trim());for(let u=0;u<a.length;u++){const l=a[u];switch(l.code){case"m":{this.moveTo(n+=l.end.x,s+=l.end.y);break}case"M":{this.moveTo(n=l.end.x,s=l.end.y);break}case"H":{this.lineTo(n=l.value,s);break}case"h":{this.lineTo(n+=l.value,s);break}case"V":{this.lineTo(n,s=l.value);break}case"v":{this.lineTo(n,s+=l.value);break}case"Z":{this.closePath();break}case"L":{this.lineTo(n=l.end.x,s=l.end.y);break}case"l":{this.lineTo(n+=l.end.x,s+=l.end.y);break}case"C":{this.bezierCurveTo(l.cp1.x,l.cp1.y,l.cp2.x,l.cp2.y,n=l.end.x,s=l.end.y);break}case"c":{const c=n,f=s;this.bezierCurveTo(c+l.cp1.x,f+l.cp1.y,c+l.cp2.x,f+l.cp2.y,n+=l.end.x,s+=l.end.y);break}case"s":case"q":{const c=n,f=s;this.quadraticCurveTo(c+l.cp.x,f+l.cp.y,n+=l.end.x,s+=l.end.y);break}case"S":case"Q":{this.quadraticCurveTo(l.cp.x,l.cp.y,n=l.end.x,s=l.end.y);break}case"a":{Op({px:n,py:s,cx:n+=l.end.x,cy:s+=l.end.y,rx:l.radii.x,ry:l.radii.y,xAxisRotation:l.rotation,largeArcFlag:l.large?1:0,sweepFlag:l.clockwise?1:0}).forEach(({x1:c,y1:f,x2:p,y2:m,x:g,y:x})=>this.bezierCurveTo(c,f,p,m,g,x));break}case"A":{Op({px:n,py:s,cx:n=l.end.x,cy:s=l.end.y,rx:l.radii.x,ry:l.radii.y,xAxisRotation:l.rotation,largeArcFlag:l.large?1:0,sweepFlag:l.clockwise?1:0}).forEach(({x1:c,y1:f,x2:p,y2:m,x:g,y:x})=>this.bezierCurveTo(c,f,p,m,g,x));break}default:{console.info("[PIXI.SVG] Draw command not supported:",l.code,l);break}}}}}var La={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},RA=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function PA(e){return e===10||e===13||e===8232||e===8233||e===32||e===9||e===11||e===12||e===160||e>=5760&&RA.indexOf(e)>=0}function MA(e){switch(e|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function OA(e){return(e|32)===97}function _i(e){return e>=48&&e<=57}function FA(e){return e>=48&&e<=57||e===43||e===45||e===46}function NA(e){this.index=0,this.path=e,this.max=e.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function ka(e){for(;e.index<e.max&&PA(e.path.charCodeAt(e.index));)e.index++}function LA(e){var t=e.path.charCodeAt(e.index);if(t===48){e.param=0,e.index++;return}if(t===49){e.param=1,e.index++;return}e.err="SvgPath: arc flag can be 0 or 1 only (at pos "+e.index+")"}function kA(e){var t=e.index,r=t,n=e.max,s=!1,a=!1,u=!1,l=!1,c;if(r>=n){e.err="SvgPath: missed param (at pos "+r+")";return}if(c=e.path.charCodeAt(r),(c===43||c===45)&&(r++,c=r<n?e.path.charCodeAt(r):0),!_i(c)&&c!==46){e.err="SvgPath: param should start with 0..9 or `.` (at pos "+r+")";return}if(c!==46){if(s=c===48,r++,c=r<n?e.path.charCodeAt(r):0,s&&r<n&&c&&_i(c)){e.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+t+")";return}for(;r<n&&_i(e.path.charCodeAt(r));)r++,a=!0;c=r<n?e.path.charCodeAt(r):0}if(c===46){for(l=!0,r++;_i(e.path.charCodeAt(r));)r++,u=!0;c=r<n?e.path.charCodeAt(r):0}if(c===101||c===69){if(l&&!a&&!u){e.err="SvgPath: invalid float exponent (at pos "+r+")";return}if(r++,c=r<n?e.path.charCodeAt(r):0,(c===43||c===45)&&r++,r<n&&_i(e.path.charCodeAt(r)))for(;r<n&&_i(e.path.charCodeAt(r));)r++;else{e.err="SvgPath: invalid float exponent (at pos "+r+")";return}}e.index=r,e.param=parseFloat(e.path.slice(t,r))+0}function Ml(e){var t,r;t=e.path[e.segmentStart],r=t.toLowerCase();var n=e.data;if(r==="m"&&n.length>2&&(e.result.push([t,n[0],n[1]]),n=n.slice(2),r="l",t=t==="m"?"l":"L"),r==="r")e.result.push([t].concat(n));else for(;n.length>=La[r]&&(e.result.push([t].concat(n.splice(0,La[r]))),!!La[r]););}function BA(e){var t=e.max,r,n,s,a,u;if(e.segmentStart=e.index,r=e.path.charCodeAt(e.index),n=OA(r),!MA(r)){e.err="SvgPath: bad command "+e.path[e.index]+" (at pos "+e.index+")";return}if(a=La[e.path[e.index].toLowerCase()],e.index++,ka(e),e.data=[],!a){Ml(e);return}for(s=!1;;){for(u=a;u>0;u--){if(n&&(u===3||u===4)?LA(e):kA(e),e.err.length){Ml(e);return}e.data.push(e.param),ka(e),s=!1,e.index<t&&e.path.charCodeAt(e.index)===44&&(e.index++,ka(e),s=!0)}if(!s&&(e.index>=e.max||!FA(e.path.charCodeAt(e.index))))break}Ml(e)}var DA=function(t){var r=new NA(t),n=r.max;for(ka(r);r.index<n&&!r.err.length;)BA(r);return r.result.length&&("mM".indexOf(r.result[0][0])<0?(r.err="SvgPath: string should start with `M` or `m`",r.result=[]):r.result[0][0]="M"),{err:r.err,segments:r.result}};function UA(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}function pr(){if(!(this instanceof pr))return new pr;this.queue=[],this.cache=null}pr.prototype.matrix=function(e){return e[0]===1&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===0&&e[5]===0?this:(this.cache=null,this.queue.push(e),this)},pr.prototype.translate=function(e,t){return(e!==0||t!==0)&&(this.cache=null,this.queue.push([1,0,0,1,e,t])),this},pr.prototype.scale=function(e,t){return(e!==1||t!==1)&&(this.cache=null,this.queue.push([e,0,0,t,0,0])),this},pr.prototype.rotate=function(e,t,r){var n,s,a;return e!==0&&(this.translate(t,r),n=e*Math.PI/180,s=Math.cos(n),a=Math.sin(n),this.queue.push([s,a,-a,s,0,0]),this.cache=null,this.translate(-t,-r)),this},pr.prototype.skewX=function(e){return e!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(e*Math.PI/180),1,0,0])),this},pr.prototype.skewY=function(e){return e!==0&&(this.cache=null,this.queue.push([1,Math.tan(e*Math.PI/180),0,1,0,0])),this},pr.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var e=1;e<this.queue.length;e++)this.cache=UA(this.cache,this.queue[e]);return this.cache},pr.prototype.calc=function(e,t,r){var n;return this.queue.length?(this.cache||(this.cache=this.toArray()),n=this.cache,[e*n[0]+t*n[2]+(r?0:n[4]),e*n[1]+t*n[3]+(r?0:n[5])]):[e,t]};var Fp=pr,$A=Fp,GA={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},zA=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,HA=/[\s,]+/,VA=function(t){var r=new $A,n,s;return t.split(zA).forEach(function(a){if(a.length){if(typeof GA[a]<"u"){n=a;return}switch(s=a.split(HA).map(function(u){return+u||0}),n){case"matrix":s.length===6&&r.matrix(s);return;case"scale":s.length===1?r.scale(s[0],s[0]):s.length===2&&r.scale(s[0],s[1]);return;case"rotate":s.length===1?r.rotate(s[0],0,0):s.length===3&&r.rotate(s[0],s[1],s[2]);return;case"translate":s.length===1?r.translate(s[0],0):s.length===2&&r.translate(s[0],s[1]);return;case"skewX":s.length===1&&r.skewX(s[0]);return;case"skewY":s.length===1&&r.skewY(s[0]);return}}}),r},ps=Math.PI*2;function Np(e,t,r,n){var s=e*n-t*r<0?-1:1,a=e*r+t*n;return a>1&&(a=1),a<-1&&(a=-1),s*Math.acos(a)}function jA(e,t,r,n,s,a,u,l,c,f){var p=f*(e-r)/2+c*(t-n)/2,m=-c*(e-r)/2+f*(t-n)/2,g=u*u,x=l*l,y=p*p,S=m*m,T=g*x-g*S-x*y;T<0&&(T=0),T/=g*S+x*y,T=Math.sqrt(T)*(s===a?-1:1);var w=T*u/l*m,I=T*-l/u*p,A=f*w-c*I+(e+r)/2,R=c*w+f*I+(t+n)/2,N=(p-w)/u,B=(m-I)/l,L=(-p-w)/u,O=(-m-I)/l,z=Np(1,0,N,B),X=Np(N,B,L,O);return a===0&&X>0&&(X-=ps),a===1&&X<0&&(X+=ps),[A,R,z,X]}function XA(e,t){var r=1.3333333333333333*Math.tan(t/4),n=Math.cos(e),s=Math.sin(e),a=Math.cos(e+t),u=Math.sin(e+t);return[n,s,n-s*r,s+n*r,a+u*r,u-a*r,a,u]}var WA=function(t,r,n,s,a,u,l,c,f){var p=Math.sin(f*ps/360),m=Math.cos(f*ps/360),g=m*(t-n)/2+p*(r-s)/2,x=-p*(t-n)/2+m*(r-s)/2;if(g===0&&x===0)return[];if(l===0||c===0)return[];l=Math.abs(l),c=Math.abs(c);var y=g*g/(l*l)+x*x/(c*c);y>1&&(l*=Math.sqrt(y),c*=Math.sqrt(y));var S=jA(t,r,n,s,a,u,l,c,p,m),T=[],w=S[2],I=S[3],A=Math.max(Math.ceil(Math.abs(I)/(ps/4)),1);I/=A;for(var R=0;R<A;R++)T.push(XA(w,I)),w+=I;return T.map(function(N){for(var B=0;B<N.length;B+=2){var L=N[B+0],O=N[B+1];L*=l,O*=c;var z=m*L-p*O,X=p*L+m*O;N[B+0]=z+S[0],N[B+1]=X+S[1]}return N})},gs=1e-10,Lp=Math.PI/180;function ms(e,t,r){if(!(this instanceof ms))return new ms(e,t,r);this.rx=e,this.ry=t,this.ax=r}ms.prototype.transform=function(e){var t=Math.cos(this.ax*Lp),r=Math.sin(this.ax*Lp),n=[this.rx*(e[0]*t+e[2]*r),this.rx*(e[1]*t+e[3]*r),this.ry*(-e[0]*r+e[2]*t),this.ry*(-e[1]*r+e[3]*t)],s=n[0]*n[0]+n[2]*n[2],a=n[1]*n[1]+n[3]*n[3],u=((n[0]-n[3])*(n[0]-n[3])+(n[2]+n[1])*(n[2]+n[1]))*((n[0]+n[3])*(n[0]+n[3])+(n[2]-n[1])*(n[2]-n[1])),l=(s+a)/2;if(u<gs*l)return this.rx=this.ry=Math.sqrt(l),this.ax=0,this;var c=n[0]*n[1]+n[2]*n[3];u=Math.sqrt(u);var f=l+u/2,p=l-u/2;return this.ax=Math.abs(c)<gs&&Math.abs(f-a)<gs?90:Math.atan(Math.abs(c)>Math.abs(f-a)?(f-s)/c:c/(f-a))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(f),this.ry=Math.sqrt(p)):(this.ax+=90,this.rx=Math.sqrt(p),this.ry=Math.sqrt(f)),this},ms.prototype.isDegenerate=function(){return this.rx<gs*this.ry||this.ry<gs*this.rx};var qA=ms,YA=DA,KA=VA,nn=Fp,ZA=WA,JA=qA;function ie(e){if(!(this instanceof ie))return new ie(e);var t=YA(e);this.segments=t.segments,this.err=t.err,this.__stack=[]}ie.from=function(e){if(typeof e=="string")return new ie(e);if(e instanceof ie){var t=new ie("");return t.err=e.err,t.segments=e.segments.map(function(r){return r.slice()}),t.__stack=e.__stack.map(function(r){return nn().matrix(r.toArray())}),t}throw new Error("SvgPath.from: invalid param type "+e)},ie.prototype.__matrix=function(e){var t=this,r;e.queue.length&&this.iterate(function(n,s,a,u){var l,c,f,p;switch(n[0]){case"v":l=e.calc(0,n[1],!0),c=l[0]===0?["v",l[1]]:["l",l[0],l[1]];break;case"V":l=e.calc(a,n[1],!1),c=l[0]===e.calc(a,u,!1)[0]?["V",l[1]]:["L",l[0],l[1]];break;case"h":l=e.calc(n[1],0,!0),c=l[1]===0?["h",l[0]]:["l",l[0],l[1]];break;case"H":l=e.calc(n[1],u,!1),c=l[1]===e.calc(a,u,!1)[1]?["H",l[0]]:["L",l[0],l[1]];break;case"a":case"A":var m=e.toArray(),g=JA(n[1],n[2],n[3]).transform(m);if(m[0]*m[3]-m[1]*m[2]<0&&(n[5]=n[5]?"0":"1"),l=e.calc(n[6],n[7],n[0]==="a"),n[0]==="A"&&n[6]===a&&n[7]===u||n[0]==="a"&&n[6]===0&&n[7]===0){c=[n[0]==="a"?"l":"L",l[0],l[1]];break}g.isDegenerate()?c=[n[0]==="a"?"l":"L",l[0],l[1]]:c=[n[0],g.rx,g.ry,g.ax,n[4],n[5],l[0],l[1]];break;case"m":p=s>0,l=e.calc(n[1],n[2],p),c=["m",l[0],l[1]];break;default:for(f=n[0],c=[f],p=f.toLowerCase()===f,r=1;r<n.length;r+=2)l=e.calc(n[r],n[r+1],p),c.push(l[0],l[1])}t.segments[s]=c},!0)},ie.prototype.__evaluateStack=function(){var e,t;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(e=nn(),t=this.__stack.length;--t>=0;)e.matrix(this.__stack[t].toArray());this.__matrix(e),this.__stack=[]}},ie.prototype.toString=function(){var e="",t="",r=!1;this.__evaluateStack();for(var n=0,s=this.segments.length;n<s;n++){var a=this.segments[n],u=a[0];u!==t||u==="m"||u==="M"?(u==="m"&&t==="z"&&(e+=" "),e+=u,r=!1):r=!0;for(var l=1;l<a.length;l++){var c=a[l];l===1?r&&c>=0&&(e+=" "):c>=0&&(e+=" "),e+=c}t=u}return e},ie.prototype.translate=function(e,t){return this.__stack.push(nn().translate(e,t||0)),this},ie.prototype.scale=function(e,t){return this.__stack.push(nn().scale(e,!t&&t!==0?e:t)),this},ie.prototype.rotate=function(e,t,r){return this.__stack.push(nn().rotate(e,t||0,r||0)),this},ie.prototype.skewX=function(e){return this.__stack.push(nn().skewX(e)),this},ie.prototype.skewY=function(e){return this.__stack.push(nn().skewY(e)),this},ie.prototype.matrix=function(e){return this.__stack.push(nn().matrix(e)),this},ie.prototype.transform=function(e){return e.trim()?(this.__stack.push(KA(e)),this):this},ie.prototype.round=function(e){var t=0,r=0,n=0,s=0,a;return e=e||0,this.__evaluateStack(),this.segments.forEach(function(u){var l=u[0].toLowerCase()===u[0];switch(u[0]){case"H":case"h":l&&(u[1]+=n),n=u[1]-u[1].toFixed(e),u[1]=+u[1].toFixed(e);return;case"V":case"v":l&&(u[1]+=s),s=u[1]-u[1].toFixed(e),u[1]=+u[1].toFixed(e);return;case"Z":case"z":n=t,s=r;return;case"M":case"m":l&&(u[1]+=n,u[2]+=s),n=u[1]-u[1].toFixed(e),s=u[2]-u[2].toFixed(e),t=n,r=s,u[1]=+u[1].toFixed(e),u[2]=+u[2].toFixed(e);return;case"A":case"a":l&&(u[6]+=n,u[7]+=s),n=u[6]-u[6].toFixed(e),s=u[7]-u[7].toFixed(e),u[1]=+u[1].toFixed(e),u[2]=+u[2].toFixed(e),u[3]=+u[3].toFixed(e+2),u[6]=+u[6].toFixed(e),u[7]=+u[7].toFixed(e);return;default:a=u.length,l&&(u[a-2]+=n,u[a-1]+=s),n=u[a-2]-u[a-2].toFixed(e),s=u[a-1]-u[a-1].toFixed(e),u.forEach(function(c,f){f&&(u[f]=+u[f].toFixed(e))});return}}),this},ie.prototype.iterate=function(e,t){var r=this.segments,n={},s=!1,a=0,u=0,l=0,c=0,f,p,m;if(t||this.__evaluateStack(),r.forEach(function(g,x){var y=e(g,x,a,u);Array.isArray(y)&&(n[x]=y,s=!0);var S=g[0]===g[0].toLowerCase();switch(g[0]){case"m":case"M":a=g[1]+(S?a:0),u=g[2]+(S?u:0),l=a,c=u;return;case"h":case"H":a=g[1]+(S?a:0);return;case"v":case"V":u=g[1]+(S?u:0);return;case"z":case"Z":a=l,u=c;return;default:a=g[g.length-2]+(S?a:0),u=g[g.length-1]+(S?u:0)}}),!s)return this;for(m=[],f=0;f<r.length;f++)if(typeof n[f]<"u")for(p=0;p<n[f].length;p++)m.push(n[f][p]);else m.push(r[f]);return this.segments=m,this},ie.prototype.abs=function(){return this.iterate(function(e,t,r,n){var s=e[0],a=s.toUpperCase(),u;if(s!==a)switch(e[0]=a,s){case"v":e[1]+=n;return;case"a":e[6]+=r,e[7]+=n;return;default:for(u=1;u<e.length;u++)e[u]+=u%2?r:n}},!0),this},ie.prototype.rel=function(){return this.iterate(function(e,t,r,n){var s=e[0],a=s.toLowerCase(),u;if(s!==a&&!(t===0&&s==="M"))switch(e[0]=a,s){case"V":e[1]-=n;return;case"A":e[6]-=r,e[7]-=n;return;default:for(u=1;u<e.length;u++)e[u]-=u%2?r:n}},!0),this},ie.prototype.unarc=function(){return this.iterate(function(e,t,r,n){var s,a,u,l=[],c=e[0];return c!=="A"&&c!=="a"?null:(c==="a"?(a=r+e[6],u=n+e[7]):(a=e[6],u=e[7]),s=ZA(r,n,a,u,e[4],e[5],e[1],e[2],e[3]),s.length===0?[[e[0]==="a"?"l":"L",e[6],e[7]]]:(s.forEach(function(f){l.push(["C",f[2],f[3],f[4],f[5],f[6],f[7]])}),l))}),this},ie.prototype.unshort=function(){var e=this.segments,t,r,n,s,a;return this.iterate(function(u,l,c,f){var p=u[0],m=p.toUpperCase(),g;l&&(m==="T"?(g=p==="t",n=e[l-1],n[0]==="Q"?(t=n[1]-c,r=n[2]-f):n[0]==="q"?(t=n[1]-n[3],r=n[2]-n[4]):(t=0,r=0),s=-t,a=-r,g||(s+=c,a+=f),e[l]=[g?"q":"Q",s,a,u[1],u[2]]):m==="S"&&(g=p==="s",n=e[l-1],n[0]==="C"?(t=n[3]-c,r=n[4]-f):n[0]==="c"?(t=n[3]-n[5],r=n[4]-n[6]):(t=0,r=0),s=-t,a=-r,g||(s+=c,a+=f),e[l]=[g?"c":"C",s,a,u[1],u[2],u[3],u[4]]))}),this};var QA=ie,tC=QA;const eC=Hn(tC),rC=it.forwardRef((e,t)=>{const[r,n]=it.useState(null),s=q.useRef(null),a=q.useRef(null),u=q.useRef(null),{path:l,visible:c,transformation:{x:f,y:p,width:m,height:g,anchor:x,hexColor:y,fill:S,stroke:T="none",strokeWidth:w=0,colorCorrection:I={}},pointerdown:A,pointerup:R}=e,N=Qt.useApp(),{temperatureFilter:B,sharpnessFilter:L,hueFilter:O,blurFilter:z,adjustmentFilter:X}=cs(I),{blurRadius:tt=0}=I;return it.useEffect(()=>{const st=eC(l).scale(5).translate(0,0).toString(),V=`<svg xmlns="http://www.w3.org/2000/svg" width="${m}" height="${g}">
1932
+ <path stroke="${T}" stroke-width="${w}" fill="${y||S}" d="${st}">
1933
1933
  </path>
1934
- </svg>`,j=new IA(V),xt=N.renderer.generateTexture(j);return n(xt),()=>{}},[N,l,T,w,y,S]),Mt.jsx(Wn,{...e,ref:t,children:Mt.jsx(Yt.Container,{ref:a,children:Mt.jsx(Yt.Container,{ref:u,children:r&&Mt.jsx(Yt.Sprite,{texture:r,width:m,height:g,anchor:x,ref:s,x:f,y:p,alpha:c?1:0,...c&&{interactive:!0,pointerdown:A,pointerup:R},filters:[B,L,O,X,...tt>0?[z]:[]]})})})})});var nC=Tr,iC=function(){return nC.Date.now()},sC=iC,aC=/\s/;function oC(e){for(var t=e.length;t--&&aC.test(e.charAt(t)););return t}var uC=oC,lC=uC,hC=/^\s+/;function cC(e){return e&&e.slice(0,lC(e)+1).replace(hC,"")}var fC=cC,dC=zi,pC=Vi,gC="[object Symbol]";function mC(e){return typeof e=="symbol"||pC(e)&&dC(e)==gC}var Ba=mC,vC=fC,kp=Hi,yC=Ba,Bp=0/0,_C=/^[-+]0x[0-9a-f]+$/i,xC=/^0b[01]+$/i,bC=/^0o[0-7]+$/i,TC=parseInt;function wC(e){if(typeof e=="number")return e;if(yC(e))return Bp;if(kp(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=kp(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=vC(e);var r=xC.test(e);return r||bC.test(e)?TC(e.slice(2),r?2:8):_C.test(e)?Bp:+e}var SC=wC,AC=Hi,Ol=sC,Dp=SC,CC="Expected a function",EC=Math.max,IC=Math.min;function RC(e,t,r){var n,s,a,u,l,c,f=0,p=!1,m=!1,g=!0;if(typeof e!="function")throw new TypeError(CC);t=Dp(t)||0,AC(r)&&(p=!!r.leading,m="maxWait"in r,a=m?EC(Dp(r.maxWait)||0,t):a,g="trailing"in r?!!r.trailing:g);function x(B){var L=n,O=s;return n=s=void 0,f=B,u=e.apply(O,L),u}function y(B){return f=B,l=setTimeout(w,t),p?x(B):u}function S(B){var L=B-c,O=B-f,z=t-L;return m?IC(z,a-O):z}function T(B){var L=B-c,O=B-f;return c===void 0||L>=t||L<0||m&&O>=a}function w(){var B=Ol();if(T(B))return I(B);l=setTimeout(w,S(B))}function I(B){return l=void 0,g&&n?x(B):(n=s=void 0,u)}function A(){l!==void 0&&clearTimeout(l),f=0,n=c=s=l=void 0}function R(){return l===void 0?u:I(Ol())}function N(){var B=Ol(),L=T(B);if(n=arguments,s=this,c=B,L){if(l===void 0)return y(c);if(m)return clearTimeout(l),l=setTimeout(w,t),x(c)}return l===void 0&&(l=setTimeout(w,t)),u}return N.cancel=A,N.flush=R,N}var PC=RC;const xi=Hn(PC),MC=e=>{const t={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=st.useState(!1),n=W.useRef(null),s=W.useRef(t),a=W.useRef(null),{tl:u,dragModeRef:l}=W.useContext(gn),{uniqueId:c,src:f,startAt:p,endAt:m,mute:g,speed:x,audioStartAt:y,audioEndAt:S,visible:T}=e,w=st.useRef(null);we(ue.PAUSE,()=>{var O;n.current&&w.current&&((O=w.current)==null||O.pause(),s.current.isPlaying=!1)}),st.useEffect(()=>{w.current&&(l.current?(w.current.pause(),s.current.isPlaying=!1,s.current.isDragging=!0):s.current.isDragging=!1)},[l]);const I=(O,z)=>{var X,tt;n.current&&((X=w.current)==null||X.play({volume:!g&&T?1:0,start:O,end:z,speed:x||1}),l.current?((tt=w.current)==null||tt.pause(),s.current.isPlaying=!1,s.current.completed=!1):(s.current.isPlaying=!0,s.current.completed=!1))},A=xi((O,z)=>{var X;w.current&&((X=w.current)==null||X.play({volume:!g&&T?1:0,start:O,end:z,speed:x||1}),s.current.isPlaying=!0)},100),R=xi(()=>{w.current&&(w.current.pause(),s.current.isPlaying=!1)},300),N=()=>{var O;n.current&&((O=w.current)==null||O.stop(),s.current.isPlaying=!1,s.current.completed=!0)},B=(O,z)=>{var tt,it,V,j;const X=O+((tt=a.current)==null?void 0:tt.time());w.current&&l.current?(A(X,z),R(),s.current.isPlaying=!1):n.current&&!s.current.isPlaying&&w.current&&((it=w.current)==null||it.refresh(),(V=w.current)==null||V.refreshPaused(),(j=w.current)==null||j.resume(),s.current.isPlaying=!0)},L=()=>{};return W.useEffect(()=>{let O=oe.context(()=>{});if(n.current&&u.current){const z={duration:Number(S)-Number(y),onStart:I,onComplete:N,onStartParams:[y,S],onCompleteParams:[],onInterrupt:L,onUpdate:B,onUpdateParams:[y,S]};O=oe.context(()=>{a.current=oe.from(n.current,z,y),u.current.to(n.current,{alpha:1,duration:.01},p).to(n.current,{alpha:0,duration:.1},Number(m)-.09),u.current.add(a.current,p)})}return()=>{a.current&&(a.current.kill(),oe.killTweensOf(a.current)),O.revert()}},[p,m,y,S]),st.useEffect(()=>{n.current&&r(!0)},[]),st.useEffect(()=>{n.current&&w.current&&(s.current.mute=!g&&T?1:0,s.current.speed=x,w.current.volume=g?0:1)},[T,g,x]),st.useEffect(()=>(Zo(f)||(w.current=iv.Sound.from({url:f,preload:!0,singleInstance:!0,loaded:()=>{console.log("audio loaded"),s.current.loaded=!0}})),()=>{w.current&&w.current.pause&&w.current.pause()}),[c,f]),Mt.jsx(Yt.Container,{ref:n})};function OC(e,t){for(var r=-1,n=e==null?0:e.length,s=Array(n);++r<n;)s[r]=t(e[r],r,e);return s}var Up=OC;function FC(){this.__data__=[],this.size=0}var NC=FC;function LC(e,t){return e===t||e!==e&&t!==t}var $p=LC,kC=$p;function BC(e,t){for(var r=e.length;r--;)if(kC(e[r][0],t))return r;return-1}var Da=BC,DC=Da,UC=Array.prototype,$C=UC.splice;function GC(e){var t=this.__data__,r=DC(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():$C.call(t,r,1),--this.size,!0}var zC=GC,HC=Da;function VC(e){var t=this.__data__,r=HC(t,e);return r<0?void 0:t[r][1]}var jC=VC,XC=Da;function WC(e){return XC(this.__data__,e)>-1}var qC=WC,YC=Da;function KC(e,t){var r=this.__data__,n=YC(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var ZC=KC,JC=NC,QC=zC,tE=jC,eE=qC,rE=ZC;function bi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}bi.prototype.clear=JC,bi.prototype.delete=QC,bi.prototype.get=tE,bi.prototype.has=eE,bi.prototype.set=rE;var Ua=bi,nE=Ua;function iE(){this.__data__=new nE,this.size=0}var sE=iE;function aE(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var oE=aE;function uE(e){return this.__data__.get(e)}var lE=uE;function hE(e){return this.__data__.has(e)}var cE=hE,fE=jn,dE=fE(Object,"create"),$a=dE,Gp=$a;function pE(){this.__data__=Gp?Gp(null):{},this.size=0}var gE=pE;function mE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var vE=mE,yE=$a,_E="__lodash_hash_undefined__",xE=Object.prototype,bE=xE.hasOwnProperty;function TE(e){var t=this.__data__;if(yE){var r=t[e];return r===_E?void 0:r}return bE.call(t,e)?t[e]:void 0}var wE=TE,SE=$a,AE=Object.prototype,CE=AE.hasOwnProperty;function EE(e){var t=this.__data__;return SE?t[e]!==void 0:CE.call(t,e)}var IE=EE,RE=$a,PE="__lodash_hash_undefined__";function ME(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=RE&&t===void 0?PE:t,this}var OE=ME,FE=gE,NE=vE,LE=wE,kE=IE,BE=OE;function Ti(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ti.prototype.clear=FE,Ti.prototype.delete=NE,Ti.prototype.get=LE,Ti.prototype.has=kE,Ti.prototype.set=BE;var DE=Ti,zp=DE,UE=Ua,$E=Go;function GE(){this.size=0,this.__data__={hash:new zp,map:new($E||UE),string:new zp}}var zE=GE;function HE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var VE=HE,jE=VE;function XE(e,t){var r=e.__data__;return jE(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ga=XE,WE=Ga;function qE(e){var t=WE(this,e).delete(e);return this.size-=t?1:0,t}var YE=qE,KE=Ga;function ZE(e){return KE(this,e).get(e)}var JE=ZE,QE=Ga;function t2(e){return QE(this,e).has(e)}var e2=t2,r2=Ga;function n2(e,t){var r=r2(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var i2=n2,s2=zE,a2=YE,o2=JE,u2=e2,l2=i2;function wi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}wi.prototype.clear=s2,wi.prototype.delete=a2,wi.prototype.get=o2,wi.prototype.has=u2,wi.prototype.set=l2;var Fl=wi,h2=Ua,c2=Go,f2=Fl,d2=200;function p2(e,t){var r=this.__data__;if(r instanceof h2){var n=r.__data__;if(!c2||n.length<d2-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new f2(n)}return r.set(e,t),this.size=r.size,this}var g2=p2,m2=Ua,v2=sE,y2=oE,_2=lE,x2=cE,b2=g2;function Si(e){var t=this.__data__=new m2(e);this.size=t.size}Si.prototype.clear=v2,Si.prototype.delete=y2,Si.prototype.get=_2,Si.prototype.has=x2,Si.prototype.set=b2;var Hp=Si,T2="__lodash_hash_undefined__";function w2(e){return this.__data__.set(e,T2),this}var S2=w2;function A2(e){return this.__data__.has(e)}var C2=A2,E2=Fl,I2=S2,R2=C2;function za(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new E2;++t<r;)this.add(e[t])}za.prototype.add=za.prototype.push=I2,za.prototype.has=R2;var P2=za;function M2(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var O2=M2;function F2(e,t){return e.has(t)}var N2=F2,L2=P2,k2=O2,B2=N2,D2=1,U2=2;function $2(e,t,r,n,s,a){var u=r&D2,l=e.length,c=t.length;if(l!=c&&!(u&&c>l))return!1;var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var m=-1,g=!0,x=r&U2?new L2:void 0;for(a.set(e,t),a.set(t,e);++m<l;){var y=e[m],S=t[m];if(n)var T=u?n(S,y,m,t,e,a):n(y,S,m,e,t,a);if(T!==void 0){if(T)continue;g=!1;break}if(x){if(!k2(t,function(w,I){if(!B2(x,I)&&(y===w||s(y,w,r,n,a)))return x.push(I)})){g=!1;break}}else if(!(y===S||s(y,S,r,n,a))){g=!1;break}}return a.delete(e),a.delete(t),g}var Vp=$2,G2=Tr,z2=G2.Uint8Array,H2=z2;function V2(e){var t=-1,r=Array(e.size);return e.forEach(function(n,s){r[++t]=[s,n]}),r}var j2=V2;function X2(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var W2=X2,jp=ks,Xp=H2,q2=$p,Y2=Vp,K2=j2,Z2=W2,J2=1,Q2=2,tI="[object Boolean]",eI="[object Date]",rI="[object Error]",nI="[object Map]",iI="[object Number]",sI="[object RegExp]",aI="[object Set]",oI="[object String]",uI="[object Symbol]",lI="[object ArrayBuffer]",hI="[object DataView]",Wp=jp?jp.prototype:void 0,Nl=Wp?Wp.valueOf:void 0;function cI(e,t,r,n,s,a,u){switch(r){case hI:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case lI:return!(e.byteLength!=t.byteLength||!a(new Xp(e),new Xp(t)));case tI:case eI:case iI:return q2(+e,+t);case rI:return e.name==t.name&&e.message==t.message;case sI:case oI:return e==t+"";case nI:var l=K2;case aI:var c=n&J2;if(l||(l=Z2),e.size!=t.size&&!c)return!1;var f=u.get(e);if(f)return f==t;n|=Q2,u.set(e,t);var p=Y2(l(e),l(t),n,s,a,u);return u.delete(e),p;case uI:if(Nl)return Nl.call(e)==Nl.call(t)}return!1}var fI=cI;function dI(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}var pI=dI,gI=pI,mI=wr;function vI(e,t,r){var n=t(e);return mI(e)?n:gI(n,r(e))}var yI=vI;function _I(e,t){for(var r=-1,n=e==null?0:e.length,s=0,a=[];++r<n;){var u=e[r];t(u,r,e)&&(a[s++]=u)}return a}var xI=_I;function bI(){return[]}var TI=bI,wI=xI,SI=TI,AI=Object.prototype,CI=AI.propertyIsEnumerable,qp=Object.getOwnPropertySymbols,EI=qp?function(e){return e==null?[]:(e=Object(e),wI(qp(e),function(t){return CI.call(e,t)}))}:SI,II=EI;function RI(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var PI=RI,MI=9007199254740991,OI=/^(?:0|[1-9]\d*)$/;function FI(e,t){var r=typeof e;return t=t??MI,!!t&&(r=="number"||r!="symbol"&&OI.test(e))&&e>-1&&e%1==0&&e<t}var Yp=FI,NI=PI,LI=Wo,kI=wr,BI=Yo,DI=Yp,UI=Ko,$I=Object.prototype,GI=$I.hasOwnProperty;function zI(e,t){var r=kI(e),n=!r&&LI(e),s=!r&&!n&&BI(e),a=!r&&!n&&!s&&UI(e),u=r||n||s||a,l=u?NI(e.length,String):[],c=l.length;for(var f in e)(t||GI.call(e,f))&&!(u&&(f=="length"||s&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||DI(f,c)))&&l.push(f);return l}var HI=zI,VI=HI,jI=fc,XI=Bs;function WI(e){return XI(e)?VI(e):jI(e)}var Ll=WI,qI=yI,YI=II,KI=Ll;function ZI(e){return qI(e,KI,YI)}var JI=ZI,Kp=JI,QI=1,tR=Object.prototype,eR=tR.hasOwnProperty;function rR(e,t,r,n,s,a){var u=r&QI,l=Kp(e),c=l.length,f=Kp(t),p=f.length;if(c!=p&&!u)return!1;for(var m=c;m--;){var g=l[m];if(!(u?g in t:eR.call(t,g)))return!1}var x=a.get(e),y=a.get(t);if(x&&y)return x==t&&y==e;var S=!0;a.set(e,t),a.set(t,e);for(var T=u;++m<c;){g=l[m];var w=e[g],I=t[g];if(n)var A=u?n(I,w,g,t,e,a):n(w,I,g,e,t,a);if(!(A===void 0?w===I||s(w,I,r,n,a):A)){S=!1;break}T||(T=g=="constructor")}if(S&&!T){var R=e.constructor,N=t.constructor;R!=N&&"constructor"in e&&"constructor"in t&&!(typeof R=="function"&&R instanceof R&&typeof N=="function"&&N instanceof N)&&(S=!1)}return a.delete(e),a.delete(t),S}var nR=rR,kl=Hp,iR=Vp,sR=fI,aR=nR,Zp=Ec,Jp=wr,Qp=Yo,oR=Ko,uR=1,tg="[object Arguments]",eg="[object Array]",Ha="[object Object]",lR=Object.prototype,rg=lR.hasOwnProperty;function hR(e,t,r,n,s,a){var u=Jp(e),l=Jp(t),c=u?eg:Zp(e),f=l?eg:Zp(t);c=c==tg?Ha:c,f=f==tg?Ha:f;var p=c==Ha,m=f==Ha,g=c==f;if(g&&Qp(e)){if(!Qp(t))return!1;u=!0,p=!1}if(g&&!p)return a||(a=new kl),u||oR(e)?iR(e,t,r,n,s,a):sR(e,t,c,r,n,s,a);if(!(r&uR)){var x=p&&rg.call(e,"__wrapped__"),y=m&&rg.call(t,"__wrapped__");if(x||y){var S=x?e.value():e,T=y?t.value():t;return a||(a=new kl),s(S,T,r,n,a)}}return g?(a||(a=new kl),aR(e,t,r,n,s,a)):!1}var cR=hR,fR=cR,ng=Vi;function ig(e,t,r,n,s){return e===t?!0:e==null||t==null||!ng(e)&&!ng(t)?e!==e&&t!==t:fR(e,t,r,n,ig,s)}var sg=ig,dR=Hp,pR=sg,gR=1,mR=2;function vR(e,t,r,n){var s=r.length,a=s,u=!n;if(e==null)return!a;for(e=Object(e);s--;){var l=r[s];if(u&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++s<a;){l=r[s];var c=l[0],f=e[c],p=l[1];if(u&&l[2]){if(f===void 0&&!(c in e))return!1}else{var m=new dR;if(n)var g=n(f,p,c,e,t,m);if(!(g===void 0?pR(p,f,gR|mR,n,m):g))return!1}}return!0}var yR=vR,_R=Hi;function xR(e){return e===e&&!_R(e)}var ag=xR,bR=ag,TR=Ll;function wR(e){for(var t=TR(e),r=t.length;r--;){var n=t[r],s=e[n];t[r]=[n,s,bR(s)]}return t}var SR=wR;function AR(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var og=AR,CR=yR,ER=SR,IR=og;function RR(e){var t=ER(e);return t.length==1&&t[0][2]?IR(t[0][0],t[0][1]):function(r){return r===e||CR(r,e,t)}}var PR=RR,MR=wr,OR=Ba,FR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,NR=/^\w*$/;function LR(e,t){if(MR(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||OR(e)?!0:NR.test(e)||!FR.test(e)||t!=null&&e in Object(t)}var Bl=LR,ug=Fl,kR="Expected a function";function Dl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(kR);var r=function(){var n=arguments,s=t?t.apply(this,n):n[0],a=r.cache;if(a.has(s))return a.get(s);var u=e.apply(this,n);return r.cache=a.set(s,u)||a,u};return r.cache=new(Dl.Cache||ug),r}Dl.Cache=ug;var BR=Dl,DR=BR,UR=500;function $R(e){var t=DR(e,function(n){return r.size===UR&&r.clear(),n}),r=t.cache;return t}var GR=$R,zR=GR,HR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,VR=/\\(\\)?/g,jR=zR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(HR,function(r,n,s,a){t.push(s?a.replace(VR,"$1"):n||r)}),t}),XR=jR,lg=ks,WR=Up,qR=wr,YR=Ba,KR=1/0,hg=lg?lg.prototype:void 0,cg=hg?hg.toString:void 0;function fg(e){if(typeof e=="string")return e;if(qR(e))return WR(e,fg)+"";if(YR(e))return cg?cg.call(e):"";var t=e+"";return t=="0"&&1/e==-KR?"-0":t}var ZR=fg,JR=ZR;function QR(e){return e==null?"":JR(e)}var tP=QR,eP=wr,rP=Bl,nP=XR,iP=tP;function sP(e,t){return eP(e)?e:rP(e,t)?[e]:nP(iP(e))}var dg=sP,aP=Ba,oP=1/0;function uP(e){if(typeof e=="string"||aP(e))return e;var t=e+"";return t=="0"&&1/e==-oP?"-0":t}var Va=uP,lP=dg,hP=Va;function cP(e,t){t=lP(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[hP(t[r++])];return r&&r==n?e:void 0}var pg=cP,fP=pg;function dP(e,t,r){var n=e==null?void 0:fP(e,t);return n===void 0?r:n}var pP=dP;function gP(e,t){return e!=null&&t in Object(e)}var mP=gP,vP=dg,yP=Wo,_P=wr,xP=Yp,bP=qo,TP=Va;function wP(e,t,r){t=vP(t,e);for(var n=-1,s=t.length,a=!1;++n<s;){var u=TP(t[n]);if(!(a=e!=null&&r(e,u)))break;e=e[u]}return a||++n!=s?a:(s=e==null?0:e.length,!!s&&bP(s)&&xP(u,s)&&(_P(e)||yP(e)))}var SP=wP,AP=mP,CP=SP;function EP(e,t){return e!=null&&CP(e,t,AP)}var IP=EP,RP=sg,PP=pP,MP=IP,OP=Bl,FP=ag,NP=og,LP=Va,kP=1,BP=2;function DP(e,t){return OP(e)&&FP(t)?NP(LP(e),t):function(r){var n=PP(r,e);return n===void 0&&n===t?MP(r,e):RP(t,n,kP|BP)}}var UP=DP;function $P(e){return e}var GP=$P;function zP(e){return function(t){return t==null?void 0:t[e]}}var HP=zP,VP=pg;function jP(e){return function(t){return VP(t,e)}}var XP=jP,WP=HP,qP=XP,YP=Bl,KP=Va;function ZP(e){return YP(e)?WP(KP(e)):qP(e)}var JP=ZP,QP=PR,tM=UP,eM=GP,rM=wr,nM=JP;function iM(e){return typeof e=="function"?e:e==null?eM:typeof e=="object"?rM(e)?tM(e[0],e[1]):QP(e):nM(e)}var sM=iM;function aM(e){return function(t,r,n){for(var s=-1,a=Object(t),u=n(t),l=u.length;l--;){var c=u[e?l:++s];if(r(a[c],c,a)===!1)break}return t}}var oM=aM,uM=oM,lM=uM(),hM=lM,cM=hM,fM=Ll;function dM(e,t){return e&&cM(e,t,fM)}var pM=dM,gM=Bs;function mM(e,t){return function(r,n){if(r==null)return r;if(!gM(r))return e(r,n);for(var s=r.length,a=t?s:-1,u=Object(r);(t?a--:++a<s)&&n(u[a],a,u)!==!1;);return r}}var vM=mM,yM=pM,_M=vM,xM=_M(yM),bM=xM,TM=bM,wM=Bs;function SM(e,t){var r=-1,n=wM(e)?Array(e.length):[];return TM(e,function(s,a,u){n[++r]=t(s,a,u)}),n}var AM=SM,CM=Up,EM=sM,IM=AM,RM=wr;function PM(e,t){var r=RM(e)?CM:IM;return r(e,EM(t))}var MM=PM;const OM=Hn(MM);var Fn={},gg={},Ur={};Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.loop=Ur.conditional=Ur.parse=void 0;var FM=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n;if(Array.isArray(r))r.forEach(function(u){return e(t,u,n,s)});else if(typeof r=="function")r(t,n,s,e);else{var a=Object.keys(r)[0];Array.isArray(r[a])?(s[a]={},e(t,r[a],n,s[a])):s[a]=r[a](t,n,s,e)}return n};Ur.parse=FM;var NM=function(t,r){return function(n,s,a,u){r(n,s,a)&&u(n,t,s,a)}};Ur.conditional=NM;var LM=function(t,r){return function(n,s,a,u){for(var l=[],c=n.pos;r(n,s,a);){var f={};if(u(n,t,s,f),n.pos===c)break;c=n.pos,l.push(f)}return l}};Ur.loop=LM;var le={};Object.defineProperty(le,"__esModule",{value:!0}),le.readBits=le.readArray=le.readUnsigned=le.readString=le.peekBytes=le.readBytes=le.peekByte=le.readByte=le.buildStream=void 0;var kM=function(t){return{data:t,pos:0}};le.buildStream=kM;var mg=function(){return function(t){return t.data[t.pos++]}};le.readByte=mg;var BM=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+t]}};le.peekByte=BM;var ja=function(t){return function(r){return r.data.subarray(r.pos,r.pos+=t)}};le.readBytes=ja;var DM=function(t){return function(r){return r.data.subarray(r.pos,r.pos+t)}};le.peekBytes=DM;var UM=function(t){return function(r){return Array.from(ja(t)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};le.readString=UM;var $M=function(t){return function(r){var n=ja(2)(r);return t?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};le.readUnsigned=$M;var GM=function(t,r){return function(n,s,a){for(var u=typeof r=="function"?r(n,s,a):r,l=ja(t),c=new Array(u),f=0;f<u;f++)c[f]=l(n);return c}};le.readArray=GM;var zM=function(t,r,n){for(var s=0,a=0;a<n;a++)s+=t[r+a]&&Math.pow(2,n-a-1);return s},HM=function(t){return function(r){for(var n=mg()(r),s=new Array(8),a=0;a<8;a++)s[7-a]=!!(n&1<<a);return Object.keys(t).reduce(function(u,l){var c=t[l];return c.length?u[l]=zM(s,c.index,c.length):u[l]=s[c.index],u},{})}};le.readBits=HM,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ur,r=le,n={blocks:function(g){for(var x=0,y=[],S=g.data.length,T=0,w=(0,r.readByte)()(g);w!==x&&w;w=(0,r.readByte)()(g)){if(g.pos+w>=S){var I=S-g.pos;y.push((0,r.readBytes)(I)(g)),T+=I;break}y.push((0,r.readBytes)(w)(g)),T+=w}for(var A=new Uint8Array(T),R=0,N=0;N<y.length;N++)A.set(y[N],R),R+=y[N].length;return A}},s=(0,t.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},function(m){var g=(0,r.peekBytes)(2)(m);return g[0]===33&&g[1]===249}),a=(0,t.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,t.conditional)({lct:(0,r.readArray)(3,function(m,g,x){return Math.pow(2,x.descriptor.lct.size+1)})},function(m,g,x){return x.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(m){return(0,r.peekByte)()(m)===44}),u=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(g,x,y){return(0,r.readBytes)(y.text.blockSize)(g)}},n]},function(m){var g=(0,r.peekBytes)(2)(m);return g[0]===33&&g[1]===1}),l=(0,t.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(g,x,y){return(0,r.readString)(y.blockSize)(g)}},n]},function(m){var g=(0,r.peekBytes)(2)(m);return g[0]===33&&g[1]===255}),c=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(m){var g=(0,r.peekBytes)(2)(m);return g[0]===33&&g[1]===254}),f=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,t.conditional)({gct:(0,r.readArray)(3,function(m,g){return Math.pow(2,g.lsd.gct.size+1)})},function(m,g){return g.lsd.gct.exists}),{frames:(0,t.loop)([s,l,c,a,u],function(m){var g=(0,r.peekByte)()(m);return g===33||g===44})}],p=f;e.default=p}(gg);var Xa={};Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.deinterlace=void 0;var VM=function(t,r){for(var n=new Array(t.length),s=t.length/r,a=function(g,x){var y=t.slice(x*r,(x+1)*r);n.splice.apply(n,[g*r,r].concat(y))},u=[0,4,2,1],l=[8,8,4,2],c=0,f=0;f<4;f++)for(var p=u[f];p<s;p+=l[f])a(p,c),c++;return n};Xa.deinterlace=VM;var Wa={};Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.lzw=void 0;var jM=function(t,r,n){var s=4096,a=-1,u=n,l,c,f,p,m,g,x,B,y,S,N,T,L,O,X,z,w=new Array(n),I=new Array(s),A=new Array(s),R=new Array(s+1);for(T=t,c=1<<T,m=c+1,l=c+2,x=a,p=T+1,f=(1<<p)-1,y=0;y<c;y++)I[y]=0,A[y]=y;var N,B,L,O,z,X;for(N=B=L=O=z=X=0,S=0;S<u;){if(O===0){if(B<p){N+=r[X]<<B,B+=8,X++;continue}if(y=N&f,N>>=p,B-=p,y>l||y==m)break;if(y==c){p=T+1,f=(1<<p)-1,l=c+2,x=a;continue}if(x==a){R[O++]=A[y],x=y,L=y;continue}for(g=y,y==l&&(R[O++]=L,y=x);y>c;)R[O++]=A[y],y=I[y];L=A[y]&255,R[O++]=L,l<s&&(I[l]=x,A[l]=L,l++,!(l&f)&&l<s&&(p++,f+=l)),x=g}O--,w[z++]=R[O],S++}for(S=z;S<u;S++)w[S]=0;return w};Wa.lzw=jM,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.decompressFrames=Fn.decompressFrame=Fn.parseGIF=void 0;var XM=ZM(gg),WM=Ur,qM=le,YM=Xa,KM=Wa;function ZM(e){return e&&e.__esModule?e:{default:e}}var JM=function(t){var r=new Uint8Array(t);return(0,WM.parse)((0,qM.buildStream)(r),XM.default)};Fn.parseGIF=JM;var QM=function(t){for(var r=t.pixels.length,n=new Uint8ClampedArray(r*4),s=0;s<r;s++){var a=s*4,u=t.pixels[s],l=t.colorTable[u]||[0,0,0];n[a]=l[0],n[a+1]=l[1],n[a+2]=l[2],n[a+3]=u!==t.transparentIndex?255:0}return n},vg=function(t,r,n){if(!t.image){console.warn("gif frame does not have associated image.");return}var s=t.image,a=s.descriptor.width*s.descriptor.height,u=(0,KM.lzw)(s.data.minCodeSize,s.data.blocks,a);s.descriptor.lct.interlaced&&(u=(0,YM.deinterlace)(u,s.descriptor.width));var l={pixels:u,dims:{top:t.image.descriptor.top,left:t.image.descriptor.left,width:t.image.descriptor.width,height:t.image.descriptor.height}};return s.descriptor.lct&&s.descriptor.lct.exists?l.colorTable=s.lct:l.colorTable=r,t.gce&&(l.delay=(t.gce.delay||10)*10,l.disposalType=t.gce.extras.disposal,t.gce.extras.transparentColorGiven&&(l.transparentIndex=t.gce.transparentColorIndex)),n&&(l.patch=QM(l)),l};Fn.decompressFrame=vg;var tO=function(t,r){return t.frames.filter(function(n){return n.image}).map(function(n){return vg(n,t.gct,r)})};Fn.decompressFrames=tO;const yg=(e,t={})=>{typeof t=="function"&&(t=t(e));const r=t.loaded&&e.loaded!==t.loaded,{playing:n,...s}=t,a={...e,...s};return r&&Object.assign(a,{playing:a.autoPlay&&a.loaded}),(t.delays!=null||t.frames!=null)&&Object.assign(a,{length:a.frames.length}),(t.index!=null||t.frames!=null)&&Object.assign(a,{index:a.length===0?0:(a.length+a.index)%a.length}),t.playing!=null&&Object.assign(a,a.loaded?{playing:n}:{autoPlay:n}),a},eO=e=>yg({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},e),rO=e=>W.useReducer(yg,e,eO);var nO='function e(e){var r={exports:{}};return e(r,r.exports),r.exports}var r=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loop=r.conditional=r.parse=void 0;r.parse=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(t))t.forEach((function(t){return e(r,t,n,a)}));else if("function"==typeof t)t(r,n,a,e);else{var i=Object.keys(t)[0];Array.isArray(t[i])?(a[i]={},e(r,t[i],n,a[i])):a[i]=t[i](r,n,a,e)}return n};r.conditional=function(e,r){return function(t,n,a,i){r(t,n,a)&&i(t,e,n,a)}};r.loop=function(e,r){return function(t,n,a,i){for(var o=[];r(t,n,a);){var s={};i(t,e,n,s),o.push(s)}return o}}})),t=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.readBits=r.readArray=r.readUnsigned=r.readString=r.peekBytes=r.readBytes=r.peekByte=r.readByte=r.buildStream=void 0;r.buildStream=function(e){return{data:e,pos:0}};var t=function(){return function(e){return e.data[e.pos++]}};r.readByte=t;r.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(r){return r.data[r.pos+e]}};var n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};r.readBytes=n;r.peekBytes=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};r.readString=function(e){return function(r){return Array.from(n(e)(r)).map((function(e){return String.fromCharCode(e)})).join("")}};r.readUnsigned=function(e){return function(r){var t=n(2)(r);return e?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};r.readArray=function(e,r){return function(t,a,i){for(var o="function"==typeof r?r(t,a,i):r,s=n(e),d=new Array(o),c=0;c<o;c++)d[c]=s(t);return d}};r.readBits=function(e){return function(r){for(var t=function(e){return e.data[e.pos++]}(r),n=new Array(8),a=0;a<8;a++)n[7-a]=!!(t&1<<a);return Object.keys(e).reduce((function(r,t){var a=e[t];return a.length?r[t]=function(e,r,t){for(var n=0,a=0;a<t;a++)n+=e[r+a]&&Math.pow(2,t-a-1);return n}(n,a.index,a.length):r[t]=n[a.index],r}),{})}}})),n=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={blocks:function(e){for(var r=[],n=e.data.length,a=0,i=(0,t.readByte)()(e);0!==i;i=(0,t.readByte)()(e)){if(e.pos+i>=n){var o=n-e.pos;r.push((0,t.readBytes)(o)(e)),a+=o;break}r.push((0,t.readBytes)(i)(e)),a+=i}for(var s=new Uint8Array(a),d=0,c=0;c<r.length;c++)s.set(r[c],d),d+=r[c].length;return s}},i=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&249===r[1]})),o=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,(function(e,r,t){return Math.pow(2,t.descriptor.lct.size+1)}))},(function(e,r,t){return t.descriptor.lct.exists})),{data:[{minCodeSize:(0,t.readByte)()},a]}]},(function(e){return 44===(0,t.peekByte)()(e)})),s=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(e,r,n){return(0,t.readBytes)(n.text.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&1===r[1]})),d=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(e,r,n){return(0,t.readString)(n.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&255===r[1]})),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&254===r[1]})),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,(function(e,r){return Math.pow(2,r.lsd.gct.size+1)}))},(function(e,r){return r.lsd.gct.exists})),{frames:(0,r.loop)([i,d,c,o,s],(function(e){var r=(0,t.peekByte)()(e);return 33===r||44===r}))}];n.default=u})),a=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.deinterlace=void 0;r.deinterlace=function(e,r){for(var t=new Array(e.length),n=e.length/r,a=function(n,a){var i=e.slice(a*r,(a+1)*r);t.splice.apply(t,[n*r,r].concat(i))},i=[0,4,2,1],o=[8,8,4,2],s=0,d=0;d<4;d++)for(var c=i[d];c<n;c+=o[d])a(c,s),s++;return t}})),i=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lzw=void 0;r.lzw=function(e,r,t){var n,a,i,o,s,d,c,u,l,f,p,g,y,h,v,m,x=4096,B=t,w=new Array(t),b=new Array(x),k=new Array(x),A=new Array(4097);for(s=(a=1<<(f=e))+1,n=a+2,c=-1,i=(1<<(o=f+1))-1,u=0;u<a;u++)b[u]=0,k[u]=u;for(p=g=y=h=v=m=0,l=0;l<B;){if(0===h){if(g<o){p+=r[m]<<g,g+=8,m++;continue}if(u=p&i,p>>=o,g-=o,u>n||u==s)break;if(u==a){i=(1<<(o=f+1))-1,n=a+2,c=-1;continue}if(-1==c){A[h++]=k[u],c=u,y=u;continue}for(d=u,u==n&&(A[h++]=y,u=c);u>a;)A[h++]=k[u],u=b[u];y=255&k[u],A[h++]=y,n<x&&(b[n]=c,k[n]=y,0==(++n&i)&&n<x&&(o++,i+=n)),c=d}h--,w[v++]=A[h],l++}for(l=v;l<B;l++)w[l]=0;return w}})),o=e((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFrames=o.decompressFrame=o.parseGIF=void 0;var s,d=(s=n)&&s.__esModule?s:{default:s};o.parseGIF=function(e){var n=new Uint8Array(e);return(0,r.parse)((0,t.buildStream)(n),d.default)};var c=function(e,r,t){if(e.image){var n=e.image,o=n.descriptor.width*n.descriptor.height,s=(0,i.lzw)(n.data.minCodeSize,n.data.blocks,o);n.descriptor.lct.interlaced&&(s=(0,a.deinterlace)(s,n.descriptor.width));var d={pixels:s,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?d.colorTable=n.lct:d.colorTable=r,e.gce&&(d.delay=10*(e.gce.delay||10),d.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(d.transparentIndex=e.gce.transparentColorIndex)),t&&(d.patch=function(e){for(var r=e.pixels.length,t=new Uint8ClampedArray(4*r),n=0;n<r;n++){var a=4*n,i=e.pixels[n],o=e.colorTable[i]||[0,0,0];t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=i!==e.transparentIndex?255:0}return t}(d)),d}console.warn("gif frame does not have associated image.")};o.decompressFrame=c;o.decompressFrames=function(e,r){return e.frames.filter((function(e){return e.image})).map((function(t){return c(t,e.gct,r)}))}}));const s=(e,r,t)=>{const{width:n,height:a,top:i,left:o}=r.dims,s=i*t.width+o;for(let i=0;i<a;i++)for(let a=0;a<n;a++){const o=i*n+a,d=r.pixels[o];if(d!==r.transparentIndex){const n=s+i*t.width+a,o=r.colorTable[d]||[0,0,0];e[4*n]=o[0],e[4*n+1]=o[1],e[4*n+2]=o[2],e[4*n+3]=255}}return e},d=new Map;self.addEventListener("message",(e=>{const{type:r,src:t}=e.data||e;switch(r){case"parse":if(!d.has(t)){const e=new AbortController,r={signal:e.signal};d.set(t,e),((e,{signal:r})=>fetch(e,{signal:r}).then((e=>{if(!e.headers.get("Content-Type").includes("image/gif"))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()})).then((e=>o.parseGIF(e))).then((e=>((e=>{let r=null;for(const t of e.frames)r=t.gce?t.gce:r,"image"in t&&!("gce"in t)&&(t.gce=r)})(e),e))).then((e=>Promise.all([o.decompressFrames(e,!1),{width:e.lsd.width,height:e.lsd.height}]))).then((([e,r])=>{const t=[],n=r.width*r.height*4;for(let a=0;a<e.length;++a){const i=e[a],o=0===a||2===e[a-1].disposalType?new Uint8ClampedArray(n):t[a-1].slice();t.push(s(o,i,r))}return{...r,loaded:!0,delays:e.map((e=>e.delay)),frames:t}})))(t,r).then((e=>{self.postMessage(Object.assign(e,{src:t}),e.frames.map((e=>e.buffer)))})).catch((e=>{self.postMessage({src:t,error:e,loaded:!0})})).finally((()=>{d.delete(t)}))}break;case"cancel":if(d.has(t)){d.get(t).abort(),d.delete(t)}}}));\n';function iO(e){const t=new Blob([nO],{type:"application/javascript"}),r=URL.createObjectURL(t),n=new Worker(r,e);return URL.revokeObjectURL(r),n}const sO=e=>({...e,frames:e.frames.map(t=>{const r=new ImageData(e.width,e.height);return r.data.set(new Uint8ClampedArray(t)),r})}),aO=(e,t)=>{const r={};return()=>(r.instance||(r.instance=e()),W.useLayoutEffect(()=>(r.timeout?(clearTimeout(r.timeout),delete r.timeout):r.usageCount=(r.usageCount||0)+1,()=>{r.timeout=setTimeout(()=>{r.usageCount=r.usageCount-1,r.usageCount===0&&(t&&t(r.instance),delete r.instance,delete r.timeout)})}),[r,t]),r.instance)},oO=e=>{const t=W.useRef(e);return W.useEffect(()=>{t.current=e},[e]),t},uO=e=>{const t=oO(e);return W.useCallback(r=>t.current&&t.current(r),[])},lO=aO(()=>new iO,e=>e.terminate()),hO=(e,t)=>{const r=uO(t),n=lO();W.useEffect(()=>{if(typeof e=="string"){const s=a=>{const u=a.data||a;if(u.src===e){const l=u.error?u:sO(u);r(l)}};return n.addEventListener("message",s),n.postMessage({src:e,type:"parse"}),()=>{n.postMessage({src:e,type:"cancel"}),n.removeEventListener("message",s)}}},[n,e])},cO=({isPlaying:e,forwardRef:t,...r})=>{const n=st.useRef(null);return st.useImperativeHandle(t,()=>n.current,[n]),st.useEffect(()=>{if(n.current===null)return;const s=n.current;s[e?"gotoAndPlay":"gotoAndStop"](s.currentFrame)},[e]),Mt.jsx(Yt.AnimatedSprite,{ref:n,...r,isPlaying:e})},_g=st.memo(cO);var qa={exports:{}};/**
1934
+ </svg>`,j=new IA(V),bt=N.renderer.generateTexture(j);return n(bt),()=>{}},[N,l,T,w,y,S]),Ft.jsx(Wn,{...e,ref:t,children:Ft.jsx(Qt.Container,{ref:a,children:Ft.jsx(Qt.Container,{ref:u,children:r&&Ft.jsx(Qt.Sprite,{texture:r,width:m,height:g,anchor:x,ref:s,x:f,y:p,alpha:c?1:0,...c&&{interactive:!0,pointerdown:A,pointerup:R},filters:[B,L,O,X,...tt>0?[z]:[]]})})})})});var nC=Tr,iC=function(){return nC.Date.now()},sC=iC,aC=/\s/;function oC(e){for(var t=e.length;t--&&aC.test(e.charAt(t)););return t}var uC=oC,lC=uC,hC=/^\s+/;function cC(e){return e&&e.slice(0,lC(e)+1).replace(hC,"")}var fC=cC,dC=zi,pC=Vi,gC="[object Symbol]";function mC(e){return typeof e=="symbol"||pC(e)&&dC(e)==gC}var Ba=mC,vC=fC,kp=Hi,yC=Ba,Bp=0/0,_C=/^[-+]0x[0-9a-f]+$/i,xC=/^0b[01]+$/i,bC=/^0o[0-7]+$/i,TC=parseInt;function wC(e){if(typeof e=="number")return e;if(yC(e))return Bp;if(kp(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=kp(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=vC(e);var r=xC.test(e);return r||bC.test(e)?TC(e.slice(2),r?2:8):_C.test(e)?Bp:+e}var SC=wC,AC=Hi,Ol=sC,Dp=SC,CC="Expected a function",EC=Math.max,IC=Math.min;function RC(e,t,r){var n,s,a,u,l,c,f=0,p=!1,m=!1,g=!0;if(typeof e!="function")throw new TypeError(CC);t=Dp(t)||0,AC(r)&&(p=!!r.leading,m="maxWait"in r,a=m?EC(Dp(r.maxWait)||0,t):a,g="trailing"in r?!!r.trailing:g);function x(B){var L=n,O=s;return n=s=void 0,f=B,u=e.apply(O,L),u}function y(B){return f=B,l=setTimeout(w,t),p?x(B):u}function S(B){var L=B-c,O=B-f,z=t-L;return m?IC(z,a-O):z}function T(B){var L=B-c,O=B-f;return c===void 0||L>=t||L<0||m&&O>=a}function w(){var B=Ol();if(T(B))return I(B);l=setTimeout(w,S(B))}function I(B){return l=void 0,g&&n?x(B):(n=s=void 0,u)}function A(){l!==void 0&&clearTimeout(l),f=0,n=c=s=l=void 0}function R(){return l===void 0?u:I(Ol())}function N(){var B=Ol(),L=T(B);if(n=arguments,s=this,c=B,L){if(l===void 0)return y(c);if(m)return clearTimeout(l),l=setTimeout(w,t),x(c)}return l===void 0&&(l=setTimeout(w,t)),u}return N.cancel=A,N.flush=R,N}var PC=RC;const xi=Hn(PC),MC=e=>{const t={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=it.useState(!1),n=q.useRef(null),s=q.useRef(t),a=q.useRef(null),{tl:u,dragModeRef:l}=q.useContext(gn),{uniqueId:c,src:f,startAt:p,endAt:m,mute:g,speed:x,audioStartAt:y,audioEndAt:S,visible:T}=e,w=it.useRef(null);we(ue.PAUSE,()=>{var O;n.current&&w.current&&((O=w.current)==null||O.pause(),s.current.isPlaying=!1)}),it.useEffect(()=>{w.current&&(l.current?(w.current.pause(),s.current.isPlaying=!1,s.current.isDragging=!0):s.current.isDragging=!1)},[l]);const I=(O,z)=>{var X,tt;n.current&&((X=w.current)==null||X.play({volume:!g&&T?1:0,start:O,end:z,speed:x||1}),l.current?((tt=w.current)==null||tt.pause(),s.current.isPlaying=!1,s.current.completed=!1):(s.current.isPlaying=!0,s.current.completed=!1))},A=xi((O,z)=>{var X;w.current&&((X=w.current)==null||X.play({volume:!g&&T?1:0,start:O,end:z,speed:x||1}),s.current.isPlaying=!0)},100),R=xi(()=>{w.current&&(w.current.pause(),s.current.isPlaying=!1)},300),N=()=>{var O;n.current&&((O=w.current)==null||O.stop(),s.current.isPlaying=!1,s.current.completed=!0)},B=(O,z)=>{var tt,st,V,j;const X=O+((tt=a.current)==null?void 0:tt.time());w.current&&l.current?(A(X,z),R(),s.current.isPlaying=!1):n.current&&!s.current.isPlaying&&w.current&&((st=w.current)==null||st.refresh(),(V=w.current)==null||V.refreshPaused(),(j=w.current)==null||j.resume(),s.current.isPlaying=!0)},L=()=>{};return q.useEffect(()=>{let O=oe.context(()=>{});if(n.current&&u.current){const z={duration:Number(S)-Number(y),onStart:I,onComplete:N,onStartParams:[y,S],onCompleteParams:[],onInterrupt:L,onUpdate:B,onUpdateParams:[y,S]};O=oe.context(()=>{a.current=oe.from(n.current,z,y),u.current.to(n.current,{alpha:1,duration:.01},p).to(n.current,{alpha:0,duration:.1},Number(m)-.09),u.current.add(a.current,p)})}return()=>{a.current&&(a.current.kill(),oe.killTweensOf(a.current)),O.revert()}},[p,m,y,S]),it.useEffect(()=>{n.current&&r(!0)},[]),it.useEffect(()=>{n.current&&w.current&&(s.current.mute=!g&&T?1:0,s.current.speed=x,w.current.volume=g?0:1)},[T,g,x]),it.useEffect(()=>(Zo(f)||(w.current=iv.Sound.from({url:f,preload:!0,singleInstance:!0,loaded:()=>{console.log("audio loaded"),s.current.loaded=!0}})),()=>{w.current&&w.current.pause&&w.current.pause()}),[c,f]),Ft.jsx(Qt.Container,{ref:n})};function OC(e,t){for(var r=-1,n=e==null?0:e.length,s=Array(n);++r<n;)s[r]=t(e[r],r,e);return s}var Up=OC;function FC(){this.__data__=[],this.size=0}var NC=FC;function LC(e,t){return e===t||e!==e&&t!==t}var $p=LC,kC=$p;function BC(e,t){for(var r=e.length;r--;)if(kC(e[r][0],t))return r;return-1}var Da=BC,DC=Da,UC=Array.prototype,$C=UC.splice;function GC(e){var t=this.__data__,r=DC(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():$C.call(t,r,1),--this.size,!0}var zC=GC,HC=Da;function VC(e){var t=this.__data__,r=HC(t,e);return r<0?void 0:t[r][1]}var jC=VC,XC=Da;function WC(e){return XC(this.__data__,e)>-1}var qC=WC,YC=Da;function KC(e,t){var r=this.__data__,n=YC(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var ZC=KC,JC=NC,QC=zC,tE=jC,eE=qC,rE=ZC;function bi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}bi.prototype.clear=JC,bi.prototype.delete=QC,bi.prototype.get=tE,bi.prototype.has=eE,bi.prototype.set=rE;var Ua=bi,nE=Ua;function iE(){this.__data__=new nE,this.size=0}var sE=iE;function aE(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var oE=aE;function uE(e){return this.__data__.get(e)}var lE=uE;function hE(e){return this.__data__.has(e)}var cE=hE,fE=jn,dE=fE(Object,"create"),$a=dE,Gp=$a;function pE(){this.__data__=Gp?Gp(null):{},this.size=0}var gE=pE;function mE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var vE=mE,yE=$a,_E="__lodash_hash_undefined__",xE=Object.prototype,bE=xE.hasOwnProperty;function TE(e){var t=this.__data__;if(yE){var r=t[e];return r===_E?void 0:r}return bE.call(t,e)?t[e]:void 0}var wE=TE,SE=$a,AE=Object.prototype,CE=AE.hasOwnProperty;function EE(e){var t=this.__data__;return SE?t[e]!==void 0:CE.call(t,e)}var IE=EE,RE=$a,PE="__lodash_hash_undefined__";function ME(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=RE&&t===void 0?PE:t,this}var OE=ME,FE=gE,NE=vE,LE=wE,kE=IE,BE=OE;function Ti(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ti.prototype.clear=FE,Ti.prototype.delete=NE,Ti.prototype.get=LE,Ti.prototype.has=kE,Ti.prototype.set=BE;var DE=Ti,zp=DE,UE=Ua,$E=Go;function GE(){this.size=0,this.__data__={hash:new zp,map:new($E||UE),string:new zp}}var zE=GE;function HE(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var VE=HE,jE=VE;function XE(e,t){var r=e.__data__;return jE(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ga=XE,WE=Ga;function qE(e){var t=WE(this,e).delete(e);return this.size-=t?1:0,t}var YE=qE,KE=Ga;function ZE(e){return KE(this,e).get(e)}var JE=ZE,QE=Ga;function t2(e){return QE(this,e).has(e)}var e2=t2,r2=Ga;function n2(e,t){var r=r2(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var i2=n2,s2=zE,a2=YE,o2=JE,u2=e2,l2=i2;function wi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}wi.prototype.clear=s2,wi.prototype.delete=a2,wi.prototype.get=o2,wi.prototype.has=u2,wi.prototype.set=l2;var Fl=wi,h2=Ua,c2=Go,f2=Fl,d2=200;function p2(e,t){var r=this.__data__;if(r instanceof h2){var n=r.__data__;if(!c2||n.length<d2-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new f2(n)}return r.set(e,t),this.size=r.size,this}var g2=p2,m2=Ua,v2=sE,y2=oE,_2=lE,x2=cE,b2=g2;function Si(e){var t=this.__data__=new m2(e);this.size=t.size}Si.prototype.clear=v2,Si.prototype.delete=y2,Si.prototype.get=_2,Si.prototype.has=x2,Si.prototype.set=b2;var Hp=Si,T2="__lodash_hash_undefined__";function w2(e){return this.__data__.set(e,T2),this}var S2=w2;function A2(e){return this.__data__.has(e)}var C2=A2,E2=Fl,I2=S2,R2=C2;function za(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new E2;++t<r;)this.add(e[t])}za.prototype.add=za.prototype.push=I2,za.prototype.has=R2;var P2=za;function M2(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var O2=M2;function F2(e,t){return e.has(t)}var N2=F2,L2=P2,k2=O2,B2=N2,D2=1,U2=2;function $2(e,t,r,n,s,a){var u=r&D2,l=e.length,c=t.length;if(l!=c&&!(u&&c>l))return!1;var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var m=-1,g=!0,x=r&U2?new L2:void 0;for(a.set(e,t),a.set(t,e);++m<l;){var y=e[m],S=t[m];if(n)var T=u?n(S,y,m,t,e,a):n(y,S,m,e,t,a);if(T!==void 0){if(T)continue;g=!1;break}if(x){if(!k2(t,function(w,I){if(!B2(x,I)&&(y===w||s(y,w,r,n,a)))return x.push(I)})){g=!1;break}}else if(!(y===S||s(y,S,r,n,a))){g=!1;break}}return a.delete(e),a.delete(t),g}var Vp=$2,G2=Tr,z2=G2.Uint8Array,H2=z2;function V2(e){var t=-1,r=Array(e.size);return e.forEach(function(n,s){r[++t]=[s,n]}),r}var j2=V2;function X2(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var W2=X2,jp=ks,Xp=H2,q2=$p,Y2=Vp,K2=j2,Z2=W2,J2=1,Q2=2,tI="[object Boolean]",eI="[object Date]",rI="[object Error]",nI="[object Map]",iI="[object Number]",sI="[object RegExp]",aI="[object Set]",oI="[object String]",uI="[object Symbol]",lI="[object ArrayBuffer]",hI="[object DataView]",Wp=jp?jp.prototype:void 0,Nl=Wp?Wp.valueOf:void 0;function cI(e,t,r,n,s,a,u){switch(r){case hI:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case lI:return!(e.byteLength!=t.byteLength||!a(new Xp(e),new Xp(t)));case tI:case eI:case iI:return q2(+e,+t);case rI:return e.name==t.name&&e.message==t.message;case sI:case oI:return e==t+"";case nI:var l=K2;case aI:var c=n&J2;if(l||(l=Z2),e.size!=t.size&&!c)return!1;var f=u.get(e);if(f)return f==t;n|=Q2,u.set(e,t);var p=Y2(l(e),l(t),n,s,a,u);return u.delete(e),p;case uI:if(Nl)return Nl.call(e)==Nl.call(t)}return!1}var fI=cI;function dI(e,t){for(var r=-1,n=t.length,s=e.length;++r<n;)e[s+r]=t[r];return e}var pI=dI,gI=pI,mI=wr;function vI(e,t,r){var n=t(e);return mI(e)?n:gI(n,r(e))}var yI=vI;function _I(e,t){for(var r=-1,n=e==null?0:e.length,s=0,a=[];++r<n;){var u=e[r];t(u,r,e)&&(a[s++]=u)}return a}var xI=_I;function bI(){return[]}var TI=bI,wI=xI,SI=TI,AI=Object.prototype,CI=AI.propertyIsEnumerable,qp=Object.getOwnPropertySymbols,EI=qp?function(e){return e==null?[]:(e=Object(e),wI(qp(e),function(t){return CI.call(e,t)}))}:SI,II=EI;function RI(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var PI=RI,MI=9007199254740991,OI=/^(?:0|[1-9]\d*)$/;function FI(e,t){var r=typeof e;return t=t??MI,!!t&&(r=="number"||r!="symbol"&&OI.test(e))&&e>-1&&e%1==0&&e<t}var Yp=FI,NI=PI,LI=Wo,kI=wr,BI=Yo,DI=Yp,UI=Ko,$I=Object.prototype,GI=$I.hasOwnProperty;function zI(e,t){var r=kI(e),n=!r&&LI(e),s=!r&&!n&&BI(e),a=!r&&!n&&!s&&UI(e),u=r||n||s||a,l=u?NI(e.length,String):[],c=l.length;for(var f in e)(t||GI.call(e,f))&&!(u&&(f=="length"||s&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||DI(f,c)))&&l.push(f);return l}var HI=zI,VI=HI,jI=fc,XI=Bs;function WI(e){return XI(e)?VI(e):jI(e)}var Ll=WI,qI=yI,YI=II,KI=Ll;function ZI(e){return qI(e,KI,YI)}var JI=ZI,Kp=JI,QI=1,tR=Object.prototype,eR=tR.hasOwnProperty;function rR(e,t,r,n,s,a){var u=r&QI,l=Kp(e),c=l.length,f=Kp(t),p=f.length;if(c!=p&&!u)return!1;for(var m=c;m--;){var g=l[m];if(!(u?g in t:eR.call(t,g)))return!1}var x=a.get(e),y=a.get(t);if(x&&y)return x==t&&y==e;var S=!0;a.set(e,t),a.set(t,e);for(var T=u;++m<c;){g=l[m];var w=e[g],I=t[g];if(n)var A=u?n(I,w,g,t,e,a):n(w,I,g,e,t,a);if(!(A===void 0?w===I||s(w,I,r,n,a):A)){S=!1;break}T||(T=g=="constructor")}if(S&&!T){var R=e.constructor,N=t.constructor;R!=N&&"constructor"in e&&"constructor"in t&&!(typeof R=="function"&&R instanceof R&&typeof N=="function"&&N instanceof N)&&(S=!1)}return a.delete(e),a.delete(t),S}var nR=rR,kl=Hp,iR=Vp,sR=fI,aR=nR,Zp=Ec,Jp=wr,Qp=Yo,oR=Ko,uR=1,tg="[object Arguments]",eg="[object Array]",Ha="[object Object]",lR=Object.prototype,rg=lR.hasOwnProperty;function hR(e,t,r,n,s,a){var u=Jp(e),l=Jp(t),c=u?eg:Zp(e),f=l?eg:Zp(t);c=c==tg?Ha:c,f=f==tg?Ha:f;var p=c==Ha,m=f==Ha,g=c==f;if(g&&Qp(e)){if(!Qp(t))return!1;u=!0,p=!1}if(g&&!p)return a||(a=new kl),u||oR(e)?iR(e,t,r,n,s,a):sR(e,t,c,r,n,s,a);if(!(r&uR)){var x=p&&rg.call(e,"__wrapped__"),y=m&&rg.call(t,"__wrapped__");if(x||y){var S=x?e.value():e,T=y?t.value():t;return a||(a=new kl),s(S,T,r,n,a)}}return g?(a||(a=new kl),aR(e,t,r,n,s,a)):!1}var cR=hR,fR=cR,ng=Vi;function ig(e,t,r,n,s){return e===t?!0:e==null||t==null||!ng(e)&&!ng(t)?e!==e&&t!==t:fR(e,t,r,n,ig,s)}var sg=ig,dR=Hp,pR=sg,gR=1,mR=2;function vR(e,t,r,n){var s=r.length,a=s,u=!n;if(e==null)return!a;for(e=Object(e);s--;){var l=r[s];if(u&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++s<a;){l=r[s];var c=l[0],f=e[c],p=l[1];if(u&&l[2]){if(f===void 0&&!(c in e))return!1}else{var m=new dR;if(n)var g=n(f,p,c,e,t,m);if(!(g===void 0?pR(p,f,gR|mR,n,m):g))return!1}}return!0}var yR=vR,_R=Hi;function xR(e){return e===e&&!_R(e)}var ag=xR,bR=ag,TR=Ll;function wR(e){for(var t=TR(e),r=t.length;r--;){var n=t[r],s=e[n];t[r]=[n,s,bR(s)]}return t}var SR=wR;function AR(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var og=AR,CR=yR,ER=SR,IR=og;function RR(e){var t=ER(e);return t.length==1&&t[0][2]?IR(t[0][0],t[0][1]):function(r){return r===e||CR(r,e,t)}}var PR=RR,MR=wr,OR=Ba,FR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,NR=/^\w*$/;function LR(e,t){if(MR(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||OR(e)?!0:NR.test(e)||!FR.test(e)||t!=null&&e in Object(t)}var Bl=LR,ug=Fl,kR="Expected a function";function Dl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(kR);var r=function(){var n=arguments,s=t?t.apply(this,n):n[0],a=r.cache;if(a.has(s))return a.get(s);var u=e.apply(this,n);return r.cache=a.set(s,u)||a,u};return r.cache=new(Dl.Cache||ug),r}Dl.Cache=ug;var BR=Dl,DR=BR,UR=500;function $R(e){var t=DR(e,function(n){return r.size===UR&&r.clear(),n}),r=t.cache;return t}var GR=$R,zR=GR,HR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,VR=/\\(\\)?/g,jR=zR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(HR,function(r,n,s,a){t.push(s?a.replace(VR,"$1"):n||r)}),t}),XR=jR,lg=ks,WR=Up,qR=wr,YR=Ba,KR=1/0,hg=lg?lg.prototype:void 0,cg=hg?hg.toString:void 0;function fg(e){if(typeof e=="string")return e;if(qR(e))return WR(e,fg)+"";if(YR(e))return cg?cg.call(e):"";var t=e+"";return t=="0"&&1/e==-KR?"-0":t}var ZR=fg,JR=ZR;function QR(e){return e==null?"":JR(e)}var tP=QR,eP=wr,rP=Bl,nP=XR,iP=tP;function sP(e,t){return eP(e)?e:rP(e,t)?[e]:nP(iP(e))}var dg=sP,aP=Ba,oP=1/0;function uP(e){if(typeof e=="string"||aP(e))return e;var t=e+"";return t=="0"&&1/e==-oP?"-0":t}var Va=uP,lP=dg,hP=Va;function cP(e,t){t=lP(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[hP(t[r++])];return r&&r==n?e:void 0}var pg=cP,fP=pg;function dP(e,t,r){var n=e==null?void 0:fP(e,t);return n===void 0?r:n}var pP=dP;function gP(e,t){return e!=null&&t in Object(e)}var mP=gP,vP=dg,yP=Wo,_P=wr,xP=Yp,bP=qo,TP=Va;function wP(e,t,r){t=vP(t,e);for(var n=-1,s=t.length,a=!1;++n<s;){var u=TP(t[n]);if(!(a=e!=null&&r(e,u)))break;e=e[u]}return a||++n!=s?a:(s=e==null?0:e.length,!!s&&bP(s)&&xP(u,s)&&(_P(e)||yP(e)))}var SP=wP,AP=mP,CP=SP;function EP(e,t){return e!=null&&CP(e,t,AP)}var IP=EP,RP=sg,PP=pP,MP=IP,OP=Bl,FP=ag,NP=og,LP=Va,kP=1,BP=2;function DP(e,t){return OP(e)&&FP(t)?NP(LP(e),t):function(r){var n=PP(r,e);return n===void 0&&n===t?MP(r,e):RP(t,n,kP|BP)}}var UP=DP;function $P(e){return e}var GP=$P;function zP(e){return function(t){return t==null?void 0:t[e]}}var HP=zP,VP=pg;function jP(e){return function(t){return VP(t,e)}}var XP=jP,WP=HP,qP=XP,YP=Bl,KP=Va;function ZP(e){return YP(e)?WP(KP(e)):qP(e)}var JP=ZP,QP=PR,tM=UP,eM=GP,rM=wr,nM=JP;function iM(e){return typeof e=="function"?e:e==null?eM:typeof e=="object"?rM(e)?tM(e[0],e[1]):QP(e):nM(e)}var sM=iM;function aM(e){return function(t,r,n){for(var s=-1,a=Object(t),u=n(t),l=u.length;l--;){var c=u[e?l:++s];if(r(a[c],c,a)===!1)break}return t}}var oM=aM,uM=oM,lM=uM(),hM=lM,cM=hM,fM=Ll;function dM(e,t){return e&&cM(e,t,fM)}var pM=dM,gM=Bs;function mM(e,t){return function(r,n){if(r==null)return r;if(!gM(r))return e(r,n);for(var s=r.length,a=t?s:-1,u=Object(r);(t?a--:++a<s)&&n(u[a],a,u)!==!1;);return r}}var vM=mM,yM=pM,_M=vM,xM=_M(yM),bM=xM,TM=bM,wM=Bs;function SM(e,t){var r=-1,n=wM(e)?Array(e.length):[];return TM(e,function(s,a,u){n[++r]=t(s,a,u)}),n}var AM=SM,CM=Up,EM=sM,IM=AM,RM=wr;function PM(e,t){var r=RM(e)?CM:IM;return r(e,EM(t))}var MM=PM;const OM=Hn(MM);var Fn={},gg={},Ur={};Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.loop=Ur.conditional=Ur.parse=void 0;var FM=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n;if(Array.isArray(r))r.forEach(function(u){return e(t,u,n,s)});else if(typeof r=="function")r(t,n,s,e);else{var a=Object.keys(r)[0];Array.isArray(r[a])?(s[a]={},e(t,r[a],n,s[a])):s[a]=r[a](t,n,s,e)}return n};Ur.parse=FM;var NM=function(t,r){return function(n,s,a,u){r(n,s,a)&&u(n,t,s,a)}};Ur.conditional=NM;var LM=function(t,r){return function(n,s,a,u){for(var l=[],c=n.pos;r(n,s,a);){var f={};if(u(n,t,s,f),n.pos===c)break;c=n.pos,l.push(f)}return l}};Ur.loop=LM;var le={};Object.defineProperty(le,"__esModule",{value:!0}),le.readBits=le.readArray=le.readUnsigned=le.readString=le.peekBytes=le.readBytes=le.peekByte=le.readByte=le.buildStream=void 0;var kM=function(t){return{data:t,pos:0}};le.buildStream=kM;var mg=function(){return function(t){return t.data[t.pos++]}};le.readByte=mg;var BM=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+t]}};le.peekByte=BM;var ja=function(t){return function(r){return r.data.subarray(r.pos,r.pos+=t)}};le.readBytes=ja;var DM=function(t){return function(r){return r.data.subarray(r.pos,r.pos+t)}};le.peekBytes=DM;var UM=function(t){return function(r){return Array.from(ja(t)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};le.readString=UM;var $M=function(t){return function(r){var n=ja(2)(r);return t?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};le.readUnsigned=$M;var GM=function(t,r){return function(n,s,a){for(var u=typeof r=="function"?r(n,s,a):r,l=ja(t),c=new Array(u),f=0;f<u;f++)c[f]=l(n);return c}};le.readArray=GM;var zM=function(t,r,n){for(var s=0,a=0;a<n;a++)s+=t[r+a]&&Math.pow(2,n-a-1);return s},HM=function(t){return function(r){for(var n=mg()(r),s=new Array(8),a=0;a<8;a++)s[7-a]=!!(n&1<<a);return Object.keys(t).reduce(function(u,l){var c=t[l];return c.length?u[l]=zM(s,c.index,c.length):u[l]=s[c.index],u},{})}};le.readBits=HM,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Ur,r=le,n={blocks:function(g){for(var x=0,y=[],S=g.data.length,T=0,w=(0,r.readByte)()(g);w!==x&&w;w=(0,r.readByte)()(g)){if(g.pos+w>=S){var I=S-g.pos;y.push((0,r.readBytes)(I)(g)),T+=I;break}y.push((0,r.readBytes)(w)(g)),T+=w}for(var A=new Uint8Array(T),R=0,N=0;N<y.length;N++)A.set(y[N],R),R+=y[N].length;return A}},s=(0,t.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},function(m){var g=(0,r.peekBytes)(2)(m);return g[0]===33&&g[1]===249}),a=(0,t.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,t.conditional)({lct:(0,r.readArray)(3,function(m,g,x){return Math.pow(2,x.descriptor.lct.size+1)})},function(m,g,x){return x.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(m){return(0,r.peekByte)()(m)===44}),u=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(g,x,y){return(0,r.readBytes)(y.text.blockSize)(g)}},n]},function(m){var g=(0,r.peekBytes)(2)(m);return g[0]===33&&g[1]===1}),l=(0,t.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(g,x,y){return(0,r.readString)(y.blockSize)(g)}},n]},function(m){var g=(0,r.peekBytes)(2)(m);return g[0]===33&&g[1]===255}),c=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(m){var g=(0,r.peekBytes)(2)(m);return g[0]===33&&g[1]===254}),f=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,t.conditional)({gct:(0,r.readArray)(3,function(m,g){return Math.pow(2,g.lsd.gct.size+1)})},function(m,g){return g.lsd.gct.exists}),{frames:(0,t.loop)([s,l,c,a,u],function(m){var g=(0,r.peekByte)()(m);return g===33||g===44})}],p=f;e.default=p}(gg);var Xa={};Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.deinterlace=void 0;var VM=function(t,r){for(var n=new Array(t.length),s=t.length/r,a=function(g,x){var y=t.slice(x*r,(x+1)*r);n.splice.apply(n,[g*r,r].concat(y))},u=[0,4,2,1],l=[8,8,4,2],c=0,f=0;f<4;f++)for(var p=u[f];p<s;p+=l[f])a(p,c),c++;return n};Xa.deinterlace=VM;var Wa={};Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.lzw=void 0;var jM=function(t,r,n){var s=4096,a=-1,u=n,l,c,f,p,m,g,x,B,y,S,N,T,L,O,X,z,w=new Array(n),I=new Array(s),A=new Array(s),R=new Array(s+1);for(T=t,c=1<<T,m=c+1,l=c+2,x=a,p=T+1,f=(1<<p)-1,y=0;y<c;y++)I[y]=0,A[y]=y;var N,B,L,O,z,X;for(N=B=L=O=z=X=0,S=0;S<u;){if(O===0){if(B<p){N+=r[X]<<B,B+=8,X++;continue}if(y=N&f,N>>=p,B-=p,y>l||y==m)break;if(y==c){p=T+1,f=(1<<p)-1,l=c+2,x=a;continue}if(x==a){R[O++]=A[y],x=y,L=y;continue}for(g=y,y==l&&(R[O++]=L,y=x);y>c;)R[O++]=A[y],y=I[y];L=A[y]&255,R[O++]=L,l<s&&(I[l]=x,A[l]=L,l++,!(l&f)&&l<s&&(p++,f+=l)),x=g}O--,w[z++]=R[O],S++}for(S=z;S<u;S++)w[S]=0;return w};Wa.lzw=jM,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.decompressFrames=Fn.decompressFrame=Fn.parseGIF=void 0;var XM=ZM(gg),WM=Ur,qM=le,YM=Xa,KM=Wa;function ZM(e){return e&&e.__esModule?e:{default:e}}var JM=function(t){var r=new Uint8Array(t);return(0,WM.parse)((0,qM.buildStream)(r),XM.default)};Fn.parseGIF=JM;var QM=function(t){for(var r=t.pixels.length,n=new Uint8ClampedArray(r*4),s=0;s<r;s++){var a=s*4,u=t.pixels[s],l=t.colorTable[u]||[0,0,0];n[a]=l[0],n[a+1]=l[1],n[a+2]=l[2],n[a+3]=u!==t.transparentIndex?255:0}return n},vg=function(t,r,n){if(!t.image){console.warn("gif frame does not have associated image.");return}var s=t.image,a=s.descriptor.width*s.descriptor.height,u=(0,KM.lzw)(s.data.minCodeSize,s.data.blocks,a);s.descriptor.lct.interlaced&&(u=(0,YM.deinterlace)(u,s.descriptor.width));var l={pixels:u,dims:{top:t.image.descriptor.top,left:t.image.descriptor.left,width:t.image.descriptor.width,height:t.image.descriptor.height}};return s.descriptor.lct&&s.descriptor.lct.exists?l.colorTable=s.lct:l.colorTable=r,t.gce&&(l.delay=(t.gce.delay||10)*10,l.disposalType=t.gce.extras.disposal,t.gce.extras.transparentColorGiven&&(l.transparentIndex=t.gce.transparentColorIndex)),n&&(l.patch=QM(l)),l};Fn.decompressFrame=vg;var tO=function(t,r){return t.frames.filter(function(n){return n.image}).map(function(n){return vg(n,t.gct,r)})};Fn.decompressFrames=tO;const yg=(e,t={})=>{typeof t=="function"&&(t=t(e));const r=t.loaded&&e.loaded!==t.loaded,{playing:n,...s}=t,a={...e,...s};return r&&Object.assign(a,{playing:a.autoPlay&&a.loaded}),(t.delays!=null||t.frames!=null)&&Object.assign(a,{length:a.frames.length}),(t.index!=null||t.frames!=null)&&Object.assign(a,{index:a.length===0?0:(a.length+a.index)%a.length}),t.playing!=null&&Object.assign(a,a.loaded?{playing:n}:{autoPlay:n}),a},eO=e=>yg({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},e),rO=e=>q.useReducer(yg,e,eO);var nO='function e(e){var r={exports:{}};return e(r,r.exports),r.exports}var r=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loop=r.conditional=r.parse=void 0;r.parse=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(t))t.forEach((function(t){return e(r,t,n,a)}));else if("function"==typeof t)t(r,n,a,e);else{var i=Object.keys(t)[0];Array.isArray(t[i])?(a[i]={},e(r,t[i],n,a[i])):a[i]=t[i](r,n,a,e)}return n};r.conditional=function(e,r){return function(t,n,a,i){r(t,n,a)&&i(t,e,n,a)}};r.loop=function(e,r){return function(t,n,a,i){for(var o=[];r(t,n,a);){var s={};i(t,e,n,s),o.push(s)}return o}}})),t=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.readBits=r.readArray=r.readUnsigned=r.readString=r.peekBytes=r.readBytes=r.peekByte=r.readByte=r.buildStream=void 0;r.buildStream=function(e){return{data:e,pos:0}};var t=function(){return function(e){return e.data[e.pos++]}};r.readByte=t;r.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(r){return r.data[r.pos+e]}};var n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};r.readBytes=n;r.peekBytes=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};r.readString=function(e){return function(r){return Array.from(n(e)(r)).map((function(e){return String.fromCharCode(e)})).join("")}};r.readUnsigned=function(e){return function(r){var t=n(2)(r);return e?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};r.readArray=function(e,r){return function(t,a,i){for(var o="function"==typeof r?r(t,a,i):r,s=n(e),d=new Array(o),c=0;c<o;c++)d[c]=s(t);return d}};r.readBits=function(e){return function(r){for(var t=function(e){return e.data[e.pos++]}(r),n=new Array(8),a=0;a<8;a++)n[7-a]=!!(t&1<<a);return Object.keys(e).reduce((function(r,t){var a=e[t];return a.length?r[t]=function(e,r,t){for(var n=0,a=0;a<t;a++)n+=e[r+a]&&Math.pow(2,t-a-1);return n}(n,a.index,a.length):r[t]=n[a.index],r}),{})}}})),n=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={blocks:function(e){for(var r=[],n=e.data.length,a=0,i=(0,t.readByte)()(e);0!==i;i=(0,t.readByte)()(e)){if(e.pos+i>=n){var o=n-e.pos;r.push((0,t.readBytes)(o)(e)),a+=o;break}r.push((0,t.readBytes)(i)(e)),a+=i}for(var s=new Uint8Array(a),d=0,c=0;c<r.length;c++)s.set(r[c],d),d+=r[c].length;return s}},i=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&249===r[1]})),o=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,(function(e,r,t){return Math.pow(2,t.descriptor.lct.size+1)}))},(function(e,r,t){return t.descriptor.lct.exists})),{data:[{minCodeSize:(0,t.readByte)()},a]}]},(function(e){return 44===(0,t.peekByte)()(e)})),s=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(e,r,n){return(0,t.readBytes)(n.text.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&1===r[1]})),d=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(e,r,n){return(0,t.readString)(n.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&255===r[1]})),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&254===r[1]})),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,(function(e,r){return Math.pow(2,r.lsd.gct.size+1)}))},(function(e,r){return r.lsd.gct.exists})),{frames:(0,r.loop)([i,d,c,o,s],(function(e){var r=(0,t.peekByte)()(e);return 33===r||44===r}))}];n.default=u})),a=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.deinterlace=void 0;r.deinterlace=function(e,r){for(var t=new Array(e.length),n=e.length/r,a=function(n,a){var i=e.slice(a*r,(a+1)*r);t.splice.apply(t,[n*r,r].concat(i))},i=[0,4,2,1],o=[8,8,4,2],s=0,d=0;d<4;d++)for(var c=i[d];c<n;c+=o[d])a(c,s),s++;return t}})),i=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lzw=void 0;r.lzw=function(e,r,t){var n,a,i,o,s,d,c,u,l,f,p,g,y,h,v,m,x=4096,B=t,w=new Array(t),b=new Array(x),k=new Array(x),A=new Array(4097);for(s=(a=1<<(f=e))+1,n=a+2,c=-1,i=(1<<(o=f+1))-1,u=0;u<a;u++)b[u]=0,k[u]=u;for(p=g=y=h=v=m=0,l=0;l<B;){if(0===h){if(g<o){p+=r[m]<<g,g+=8,m++;continue}if(u=p&i,p>>=o,g-=o,u>n||u==s)break;if(u==a){i=(1<<(o=f+1))-1,n=a+2,c=-1;continue}if(-1==c){A[h++]=k[u],c=u,y=u;continue}for(d=u,u==n&&(A[h++]=y,u=c);u>a;)A[h++]=k[u],u=b[u];y=255&k[u],A[h++]=y,n<x&&(b[n]=c,k[n]=y,0==(++n&i)&&n<x&&(o++,i+=n)),c=d}h--,w[v++]=A[h],l++}for(l=v;l<B;l++)w[l]=0;return w}})),o=e((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFrames=o.decompressFrame=o.parseGIF=void 0;var s,d=(s=n)&&s.__esModule?s:{default:s};o.parseGIF=function(e){var n=new Uint8Array(e);return(0,r.parse)((0,t.buildStream)(n),d.default)};var c=function(e,r,t){if(e.image){var n=e.image,o=n.descriptor.width*n.descriptor.height,s=(0,i.lzw)(n.data.minCodeSize,n.data.blocks,o);n.descriptor.lct.interlaced&&(s=(0,a.deinterlace)(s,n.descriptor.width));var d={pixels:s,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?d.colorTable=n.lct:d.colorTable=r,e.gce&&(d.delay=10*(e.gce.delay||10),d.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(d.transparentIndex=e.gce.transparentColorIndex)),t&&(d.patch=function(e){for(var r=e.pixels.length,t=new Uint8ClampedArray(4*r),n=0;n<r;n++){var a=4*n,i=e.pixels[n],o=e.colorTable[i]||[0,0,0];t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=i!==e.transparentIndex?255:0}return t}(d)),d}console.warn("gif frame does not have associated image.")};o.decompressFrame=c;o.decompressFrames=function(e,r){return e.frames.filter((function(e){return e.image})).map((function(t){return c(t,e.gct,r)}))}}));const s=(e,r,t)=>{const{width:n,height:a,top:i,left:o}=r.dims,s=i*t.width+o;for(let i=0;i<a;i++)for(let a=0;a<n;a++){const o=i*n+a,d=r.pixels[o];if(d!==r.transparentIndex){const n=s+i*t.width+a,o=r.colorTable[d]||[0,0,0];e[4*n]=o[0],e[4*n+1]=o[1],e[4*n+2]=o[2],e[4*n+3]=255}}return e},d=new Map;self.addEventListener("message",(e=>{const{type:r,src:t}=e.data||e;switch(r){case"parse":if(!d.has(t)){const e=new AbortController,r={signal:e.signal};d.set(t,e),((e,{signal:r})=>fetch(e,{signal:r}).then((e=>{if(!e.headers.get("Content-Type").includes("image/gif"))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()})).then((e=>o.parseGIF(e))).then((e=>((e=>{let r=null;for(const t of e.frames)r=t.gce?t.gce:r,"image"in t&&!("gce"in t)&&(t.gce=r)})(e),e))).then((e=>Promise.all([o.decompressFrames(e,!1),{width:e.lsd.width,height:e.lsd.height}]))).then((([e,r])=>{const t=[],n=r.width*r.height*4;for(let a=0;a<e.length;++a){const i=e[a],o=0===a||2===e[a-1].disposalType?new Uint8ClampedArray(n):t[a-1].slice();t.push(s(o,i,r))}return{...r,loaded:!0,delays:e.map((e=>e.delay)),frames:t}})))(t,r).then((e=>{self.postMessage(Object.assign(e,{src:t}),e.frames.map((e=>e.buffer)))})).catch((e=>{self.postMessage({src:t,error:e,loaded:!0})})).finally((()=>{d.delete(t)}))}break;case"cancel":if(d.has(t)){d.get(t).abort(),d.delete(t)}}}));\n';function iO(e){const t=new Blob([nO],{type:"application/javascript"}),r=URL.createObjectURL(t),n=new Worker(r,e);return URL.revokeObjectURL(r),n}const sO=e=>({...e,frames:e.frames.map(t=>{const r=new ImageData(e.width,e.height);return r.data.set(new Uint8ClampedArray(t)),r})}),aO=(e,t)=>{const r={};return()=>(r.instance||(r.instance=e()),q.useLayoutEffect(()=>(r.timeout?(clearTimeout(r.timeout),delete r.timeout):r.usageCount=(r.usageCount||0)+1,()=>{r.timeout=setTimeout(()=>{r.usageCount=r.usageCount-1,r.usageCount===0&&(t&&t(r.instance),delete r.instance,delete r.timeout)})}),[r,t]),r.instance)},oO=e=>{const t=q.useRef(e);return q.useEffect(()=>{t.current=e},[e]),t},uO=e=>{const t=oO(e);return q.useCallback(r=>t.current&&t.current(r),[])},lO=aO(()=>new iO,e=>e.terminate()),hO=(e,t)=>{const r=uO(t),n=lO();q.useEffect(()=>{if(typeof e=="string"){const s=a=>{const u=a.data||a;if(u.src===e){const l=u.error?u:sO(u);r(l)}};return n.addEventListener("message",s),n.postMessage({src:e,type:"parse"}),()=>{n.postMessage({src:e,type:"cancel"}),n.removeEventListener("message",s)}}},[n,e])},cO=({isPlaying:e,forwardRef:t,...r})=>{const n=it.useRef(null);return it.useImperativeHandle(t,()=>n.current,[n]),it.useEffect(()=>{if(n.current===null)return;const s=n.current;s[e?"gotoAndPlay":"gotoAndStop"](s.currentFrame)},[e]),Ft.jsx(Qt.AnimatedSprite,{ref:n,...r,isPlaying:e})},_g=it.memo(cO);var qa={exports:{}};/**
1935
1935
  * @license
1936
1936
  * Lodash <https://lodash.com/>
1937
1937
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
1938
1938
  * Released under MIT license <https://lodash.com/license>
1939
1939
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
1940
1940
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
1941
- */qa.exports,function(e,t){(function(){var r,n="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",f=500,p="__lodash_placeholder__",m=1,g=2,x=4,y=1,S=2,T=1,w=2,I=4,A=8,R=16,N=32,B=64,L=128,O=256,z=512,X=30,tt="...",it=800,V=16,j=1,xt=2,kt=3,G=1/0,rt=9007199254740991,gt=17976931348623157e292,H=0/0,K=4294967295,ct=K-1,yt=K>>>1,wt=[["ary",L],["bind",T],["bindKey",w],["curry",A],["curryRight",R],["flip",z],["partial",N],["partialRight",B],["rearg",O]],Pt="[object Arguments]",Ft="[object Array]",Vt="[object AsyncFunction]",Ut="[object Boolean]",Zt="[object Date]",J="[object DOMException]",q="[object Error]",at="[object Function]",St="[object GeneratorFunction]",Et="[object Map]",Jt="[object Number]",gr="[object Null]",Me="[object Object]",$r="[object Promise]",mr="[object Proxy]",Ai="[object RegExp]",vr="[object Set]",vs="[object String]",Ya="[object Symbol]",yO="[object Undefined]",ys="[object WeakMap]",_O="[object WeakSet]",_s="[object ArrayBuffer]",Ci="[object DataView]",Ul="[object Float32Array]",$l="[object Float64Array]",Gl="[object Int8Array]",zl="[object Int16Array]",Hl="[object Int32Array]",Vl="[object Uint8Array]",jl="[object Uint8ClampedArray]",Xl="[object Uint16Array]",Wl="[object Uint32Array]",xO=/\b__p \+= '';/g,bO=/\b(__p \+=) '' \+/g,TO=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ag=/&(?:amp|lt|gt|quot|#39);/g,Cg=/[&<>"']/g,wO=RegExp(Ag.source),SO=RegExp(Cg.source),AO=/<%-([\s\S]+?)%>/g,CO=/<%([\s\S]+?)%>/g,Eg=/<%=([\s\S]+?)%>/g,EO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,IO=/^\w*$/,RO=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ql=/[\\^$.*+?()[\]{}|]/g,PO=RegExp(ql.source),Yl=/^\s+/,MO=/\s/,OO=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,FO=/\{\n\/\* \[wrapped with (.+)\] \*/,NO=/,? & /,LO=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kO=/[()=,{}\[\]\/\s]/,BO=/\\(\\)?/g,DO=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ig=/\w*$/,UO=/^[-+]0x[0-9a-f]+$/i,$O=/^0b[01]+$/i,GO=/^\[object .+?Constructor\]$/,zO=/^0o[0-7]+$/i,HO=/^(?:0|[1-9]\d*)$/,VO=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ka=/($^)/,jO=/['\n\r\u2028\u2029\\]/g,Za="\\ud800-\\udfff",XO="\\u0300-\\u036f",WO="\\ufe20-\\ufe2f",qO="\\u20d0-\\u20ff",Rg=XO+WO+qO,Pg="\\u2700-\\u27bf",Mg="a-z\\xdf-\\xf6\\xf8-\\xff",YO="\\xac\\xb1\\xd7\\xf7",KO="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ZO="\\u2000-\\u206f",JO=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Og="A-Z\\xc0-\\xd6\\xd8-\\xde",Fg="\\ufe0e\\ufe0f",Ng=YO+KO+ZO+JO,Kl="['’]",QO="["+Za+"]",Lg="["+Ng+"]",Ja="["+Rg+"]",kg="\\d+",tF="["+Pg+"]",Bg="["+Mg+"]",Dg="[^"+Za+Ng+kg+Pg+Mg+Og+"]",Zl="\\ud83c[\\udffb-\\udfff]",eF="(?:"+Ja+"|"+Zl+")",Ug="[^"+Za+"]",Jl="(?:\\ud83c[\\udde6-\\uddff]){2}",Ql="[\\ud800-\\udbff][\\udc00-\\udfff]",Ei="["+Og+"]",$g="\\u200d",Gg="(?:"+Bg+"|"+Dg+")",rF="(?:"+Ei+"|"+Dg+")",zg="(?:"+Kl+"(?:d|ll|m|re|s|t|ve))?",Hg="(?:"+Kl+"(?:D|LL|M|RE|S|T|VE))?",Vg=eF+"?",jg="["+Fg+"]?",nF="(?:"+$g+"(?:"+[Ug,Jl,Ql].join("|")+")"+jg+Vg+")*",iF="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",sF="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xg=jg+Vg+nF,aF="(?:"+[tF,Jl,Ql].join("|")+")"+Xg,oF="(?:"+[Ug+Ja+"?",Ja,Jl,Ql,QO].join("|")+")",uF=RegExp(Kl,"g"),lF=RegExp(Ja,"g"),th=RegExp(Zl+"(?="+Zl+")|"+oF+Xg,"g"),hF=RegExp([Ei+"?"+Bg+"+"+zg+"(?="+[Lg,Ei,"$"].join("|")+")",rF+"+"+Hg+"(?="+[Lg,Ei+Gg,"$"].join("|")+")",Ei+"?"+Gg+"+"+zg,Ei+"+"+Hg,sF,iF,kg,aF].join("|"),"g"),cF=RegExp("["+$g+Za+Rg+Fg+"]"),fF=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,dF=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],pF=-1,Qt={};Qt[Ul]=Qt[$l]=Qt[Gl]=Qt[zl]=Qt[Hl]=Qt[Vl]=Qt[jl]=Qt[Xl]=Qt[Wl]=!0,Qt[Pt]=Qt[Ft]=Qt[_s]=Qt[Ut]=Qt[Ci]=Qt[Zt]=Qt[q]=Qt[at]=Qt[Et]=Qt[Jt]=Qt[Me]=Qt[Ai]=Qt[vr]=Qt[vs]=Qt[ys]=!1;var qt={};qt[Pt]=qt[Ft]=qt[_s]=qt[Ci]=qt[Ut]=qt[Zt]=qt[Ul]=qt[$l]=qt[Gl]=qt[zl]=qt[Hl]=qt[Et]=qt[Jt]=qt[Me]=qt[Ai]=qt[vr]=qt[vs]=qt[Ya]=qt[Vl]=qt[jl]=qt[Xl]=qt[Wl]=!0,qt[q]=qt[at]=qt[ys]=!1;var gF={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},mF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vF={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},yF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_F=parseFloat,xF=parseInt,Wg=typeof We=="object"&&We&&We.Object===Object&&We,bF=typeof self=="object"&&self&&self.Object===Object&&self,be=Wg||bF||Function("return this")(),eh=t&&!t.nodeType&&t,Nn=eh&&!0&&e&&!e.nodeType&&e,qg=Nn&&Nn.exports===eh,rh=qg&&Wg.process,Ke=function(){try{var P=Nn&&Nn.require&&Nn.require("util").types;return P||rh&&rh.binding&&rh.binding("util")}catch{}}(),Yg=Ke&&Ke.isArrayBuffer,Kg=Ke&&Ke.isDate,Zg=Ke&&Ke.isMap,Jg=Ke&&Ke.isRegExp,Qg=Ke&&Ke.isSet,tm=Ke&&Ke.isTypedArray;function Ge(P,k,F){switch(F.length){case 0:return P.call(k);case 1:return P.call(k,F[0]);case 2:return P.call(k,F[0],F[1]);case 3:return P.call(k,F[0],F[1],F[2])}return P.apply(k,F)}function TF(P,k,F,Q){for(var ft=-1,Bt=P==null?0:P.length;++ft<Bt;){var pe=P[ft];k(Q,pe,F(pe),P)}return Q}function Ze(P,k){for(var F=-1,Q=P==null?0:P.length;++F<Q&&k(P[F],F,P)!==!1;);return P}function wF(P,k){for(var F=P==null?0:P.length;F--&&k(P[F],F,P)!==!1;);return P}function em(P,k){for(var F=-1,Q=P==null?0:P.length;++F<Q;)if(!k(P[F],F,P))return!1;return!0}function sn(P,k){for(var F=-1,Q=P==null?0:P.length,ft=0,Bt=[];++F<Q;){var pe=P[F];k(pe,F,P)&&(Bt[ft++]=pe)}return Bt}function Qa(P,k){var F=P==null?0:P.length;return!!F&&Ii(P,k,0)>-1}function nh(P,k,F){for(var Q=-1,ft=P==null?0:P.length;++Q<ft;)if(F(k,P[Q]))return!0;return!1}function ee(P,k){for(var F=-1,Q=P==null?0:P.length,ft=Array(Q);++F<Q;)ft[F]=k(P[F],F,P);return ft}function an(P,k){for(var F=-1,Q=k.length,ft=P.length;++F<Q;)P[ft+F]=k[F];return P}function ih(P,k,F,Q){var ft=-1,Bt=P==null?0:P.length;for(Q&&Bt&&(F=P[++ft]);++ft<Bt;)F=k(F,P[ft],ft,P);return F}function SF(P,k,F,Q){var ft=P==null?0:P.length;for(Q&&ft&&(F=P[--ft]);ft--;)F=k(F,P[ft],ft,P);return F}function sh(P,k){for(var F=-1,Q=P==null?0:P.length;++F<Q;)if(k(P[F],F,P))return!0;return!1}var AF=ah("length");function CF(P){return P.split("")}function EF(P){return P.match(LO)||[]}function rm(P,k,F){var Q;return F(P,function(ft,Bt,pe){if(k(ft,Bt,pe))return Q=Bt,!1}),Q}function to(P,k,F,Q){for(var ft=P.length,Bt=F+(Q?1:-1);Q?Bt--:++Bt<ft;)if(k(P[Bt],Bt,P))return Bt;return-1}function Ii(P,k,F){return k===k?UF(P,k,F):to(P,nm,F)}function IF(P,k,F,Q){for(var ft=F-1,Bt=P.length;++ft<Bt;)if(Q(P[ft],k))return ft;return-1}function nm(P){return P!==P}function im(P,k){var F=P==null?0:P.length;return F?uh(P,k)/F:H}function ah(P){return function(k){return k==null?r:k[P]}}function oh(P){return function(k){return P==null?r:P[k]}}function sm(P,k,F,Q,ft){return ft(P,function(Bt,pe,Xt){F=Q?(Q=!1,Bt):k(F,Bt,pe,Xt)}),F}function RF(P,k){var F=P.length;for(P.sort(k);F--;)P[F]=P[F].value;return P}function uh(P,k){for(var F,Q=-1,ft=P.length;++Q<ft;){var Bt=k(P[Q]);Bt!==r&&(F=F===r?Bt:F+Bt)}return F}function lh(P,k){for(var F=-1,Q=Array(P);++F<P;)Q[F]=k(F);return Q}function PF(P,k){return ee(k,function(F){return[F,P[F]]})}function am(P){return P&&P.slice(0,hm(P)+1).replace(Yl,"")}function ze(P){return function(k){return P(k)}}function hh(P,k){return ee(k,function(F){return P[F]})}function xs(P,k){return P.has(k)}function om(P,k){for(var F=-1,Q=P.length;++F<Q&&Ii(k,P[F],0)>-1;);return F}function um(P,k){for(var F=P.length;F--&&Ii(k,P[F],0)>-1;);return F}function MF(P,k){for(var F=P.length,Q=0;F--;)P[F]===k&&++Q;return Q}var OF=oh(gF),FF=oh(mF);function NF(P){return"\\"+yF[P]}function LF(P,k){return P==null?r:P[k]}function Ri(P){return cF.test(P)}function kF(P){return fF.test(P)}function BF(P){for(var k,F=[];!(k=P.next()).done;)F.push(k.value);return F}function ch(P){var k=-1,F=Array(P.size);return P.forEach(function(Q,ft){F[++k]=[ft,Q]}),F}function lm(P,k){return function(F){return P(k(F))}}function on(P,k){for(var F=-1,Q=P.length,ft=0,Bt=[];++F<Q;){var pe=P[F];(pe===k||pe===p)&&(P[F]=p,Bt[ft++]=F)}return Bt}function eo(P){var k=-1,F=Array(P.size);return P.forEach(function(Q){F[++k]=Q}),F}function DF(P){var k=-1,F=Array(P.size);return P.forEach(function(Q){F[++k]=[Q,Q]}),F}function UF(P,k,F){for(var Q=F-1,ft=P.length;++Q<ft;)if(P[Q]===k)return Q;return-1}function $F(P,k,F){for(var Q=F+1;Q--;)if(P[Q]===k)return Q;return Q}function Pi(P){return Ri(P)?zF(P):AF(P)}function yr(P){return Ri(P)?HF(P):CF(P)}function hm(P){for(var k=P.length;k--&&MO.test(P.charAt(k)););return k}var GF=oh(vF);function zF(P){for(var k=th.lastIndex=0;th.test(P);)++k;return k}function HF(P){return P.match(th)||[]}function VF(P){return P.match(hF)||[]}var jF=function P(k){k=k==null?be:Mi.defaults(be.Object(),k,Mi.pick(be,dF));var F=k.Array,Q=k.Date,ft=k.Error,Bt=k.Function,pe=k.Math,Xt=k.Object,fh=k.RegExp,XF=k.String,Je=k.TypeError,ro=F.prototype,WF=Bt.prototype,Oi=Xt.prototype,no=k["__core-js_shared__"],io=WF.toString,zt=Oi.hasOwnProperty,qF=0,cm=function(){var i=/[^.]+$/.exec(no&&no.keys&&no.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),so=Oi.toString,YF=io.call(Xt),KF=be._,ZF=fh("^"+io.call(zt).replace(ql,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ao=qg?k.Buffer:r,un=k.Symbol,oo=k.Uint8Array,fm=ao?ao.allocUnsafe:r,uo=lm(Xt.getPrototypeOf,Xt),dm=Xt.create,pm=Oi.propertyIsEnumerable,lo=ro.splice,gm=un?un.isConcatSpreadable:r,bs=un?un.iterator:r,Ln=un?un.toStringTag:r,ho=function(){try{var i=$n(Xt,"defineProperty");return i({},"",{}),i}catch{}}(),JF=k.clearTimeout!==be.clearTimeout&&k.clearTimeout,QF=Q&&Q.now!==be.Date.now&&Q.now,t3=k.setTimeout!==be.setTimeout&&k.setTimeout,co=pe.ceil,fo=pe.floor,dh=Xt.getOwnPropertySymbols,e3=ao?ao.isBuffer:r,mm=k.isFinite,r3=ro.join,n3=lm(Xt.keys,Xt),ge=pe.max,Ee=pe.min,i3=Q.now,s3=k.parseInt,vm=pe.random,a3=ro.reverse,ph=$n(k,"DataView"),Ts=$n(k,"Map"),gh=$n(k,"Promise"),Fi=$n(k,"Set"),ws=$n(k,"WeakMap"),Ss=$n(Xt,"create"),po=ws&&new ws,Ni={},o3=Gn(ph),u3=Gn(Ts),l3=Gn(gh),h3=Gn(Fi),c3=Gn(ws),go=un?un.prototype:r,As=go?go.valueOf:r,ym=go?go.toString:r;function _(i){if(ae(i)&&!dt(i)&&!(i instanceof At)){if(i instanceof Qe)return i;if(zt.call(i,"__wrapped__"))return _0(i)}return new Qe(i)}var Li=function(){function i(){}return function(o){if(!se(o))return{};if(dm)return dm(o);i.prototype=o;var h=new i;return i.prototype=r,h}}();function mo(){}function Qe(i,o){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=r}_.templateSettings={escape:AO,evaluate:CO,interpolate:Eg,variable:"",imports:{_}},_.prototype=mo.prototype,_.prototype.constructor=_,Qe.prototype=Li(mo.prototype),Qe.prototype.constructor=Qe;function At(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=K,this.__views__=[]}function f3(){var i=new At(this.__wrapped__);return i.__actions__=Le(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Le(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Le(this.__views__),i}function d3(){if(this.__filtered__){var i=new At(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function p3(){var i=this.__wrapped__.value(),o=this.__dir__,h=dt(i),d=o<0,v=h?i.length:0,b=CN(0,v,this.__views__),C=b.start,E=b.end,M=E-C,D=d?E:C-1,U=this.__iteratees__,$=U.length,Y=0,et=Ee(M,this.__takeCount__);if(!h||!d&&v==M&&et==M)return zm(i,this.__actions__);var ut=[];t:for(;M--&&Y<et;){D+=o;for(var mt=-1,lt=i[D];++mt<$;){var bt=U[mt],It=bt.iteratee,je=bt.type,Ne=It(lt);if(je==xt)lt=Ne;else if(!Ne){if(je==j)continue t;break t}}ut[Y++]=lt}return ut}At.prototype=Li(mo.prototype),At.prototype.constructor=At;function kn(i){var o=-1,h=i==null?0:i.length;for(this.clear();++o<h;){var d=i[o];this.set(d[0],d[1])}}function g3(){this.__data__=Ss?Ss(null):{},this.size=0}function m3(i){var o=this.has(i)&&delete this.__data__[i];return this.size-=o?1:0,o}function v3(i){var o=this.__data__;if(Ss){var h=o[i];return h===c?r:h}return zt.call(o,i)?o[i]:r}function y3(i){var o=this.__data__;return Ss?o[i]!==r:zt.call(o,i)}function _3(i,o){var h=this.__data__;return this.size+=this.has(i)?0:1,h[i]=Ss&&o===r?c:o,this}kn.prototype.clear=g3,kn.prototype.delete=m3,kn.prototype.get=v3,kn.prototype.has=y3,kn.prototype.set=_3;function Gr(i){var o=-1,h=i==null?0:i.length;for(this.clear();++o<h;){var d=i[o];this.set(d[0],d[1])}}function x3(){this.__data__=[],this.size=0}function b3(i){var o=this.__data__,h=vo(o,i);if(h<0)return!1;var d=o.length-1;return h==d?o.pop():lo.call(o,h,1),--this.size,!0}function T3(i){var o=this.__data__,h=vo(o,i);return h<0?r:o[h][1]}function w3(i){return vo(this.__data__,i)>-1}function S3(i,o){var h=this.__data__,d=vo(h,i);return d<0?(++this.size,h.push([i,o])):h[d][1]=o,this}Gr.prototype.clear=x3,Gr.prototype.delete=b3,Gr.prototype.get=T3,Gr.prototype.has=w3,Gr.prototype.set=S3;function zr(i){var o=-1,h=i==null?0:i.length;for(this.clear();++o<h;){var d=i[o];this.set(d[0],d[1])}}function A3(){this.size=0,this.__data__={hash:new kn,map:new(Ts||Gr),string:new kn}}function C3(i){var o=Ro(this,i).delete(i);return this.size-=o?1:0,o}function E3(i){return Ro(this,i).get(i)}function I3(i){return Ro(this,i).has(i)}function R3(i,o){var h=Ro(this,i),d=h.size;return h.set(i,o),this.size+=h.size==d?0:1,this}zr.prototype.clear=A3,zr.prototype.delete=C3,zr.prototype.get=E3,zr.prototype.has=I3,zr.prototype.set=R3;function Bn(i){var o=-1,h=i==null?0:i.length;for(this.__data__=new zr;++o<h;)this.add(i[o])}function P3(i){return this.__data__.set(i,c),this}function M3(i){return this.__data__.has(i)}Bn.prototype.add=Bn.prototype.push=P3,Bn.prototype.has=M3;function _r(i){var o=this.__data__=new Gr(i);this.size=o.size}function O3(){this.__data__=new Gr,this.size=0}function F3(i){var o=this.__data__,h=o.delete(i);return this.size=o.size,h}function N3(i){return this.__data__.get(i)}function L3(i){return this.__data__.has(i)}function k3(i,o){var h=this.__data__;if(h instanceof Gr){var d=h.__data__;if(!Ts||d.length<s-1)return d.push([i,o]),this.size=++h.size,this;h=this.__data__=new zr(d)}return h.set(i,o),this.size=h.size,this}_r.prototype.clear=O3,_r.prototype.delete=F3,_r.prototype.get=N3,_r.prototype.has=L3,_r.prototype.set=k3;function _m(i,o){var h=dt(i),d=!h&&zn(i),v=!h&&!d&&dn(i),b=!h&&!d&&!v&&Ui(i),C=h||d||v||b,E=C?lh(i.length,XF):[],M=E.length;for(var D in i)(o||zt.call(i,D))&&!(C&&(D=="length"||v&&(D=="offset"||D=="parent")||b&&(D=="buffer"||D=="byteLength"||D=="byteOffset")||Xr(D,M)))&&E.push(D);return E}function xm(i){var o=i.length;return o?i[Ch(0,o-1)]:r}function B3(i,o){return Po(Le(i),Dn(o,0,i.length))}function D3(i){return Po(Le(i))}function mh(i,o,h){(h!==r&&!xr(i[o],h)||h===r&&!(o in i))&&Hr(i,o,h)}function Cs(i,o,h){var d=i[o];(!(zt.call(i,o)&&xr(d,h))||h===r&&!(o in i))&&Hr(i,o,h)}function vo(i,o){for(var h=i.length;h--;)if(xr(i[h][0],o))return h;return-1}function U3(i,o,h,d){return ln(i,function(v,b,C){o(d,v,h(v),C)}),d}function bm(i,o){return i&&Mr(o,_e(o),i)}function $3(i,o){return i&&Mr(o,Be(o),i)}function Hr(i,o,h){o=="__proto__"&&ho?ho(i,o,{configurable:!0,enumerable:!0,value:h,writable:!0}):i[o]=h}function vh(i,o){for(var h=-1,d=o.length,v=F(d),b=i==null;++h<d;)v[h]=b?r:Zh(i,o[h]);return v}function Dn(i,o,h){return i===i&&(h!==r&&(i=i<=h?i:h),o!==r&&(i=i>=o?i:o)),i}function tr(i,o,h,d,v,b){var C,E=o&m,M=o&g,D=o&x;if(h&&(C=v?h(i,d,v,b):h(i)),C!==r)return C;if(!se(i))return i;var U=dt(i);if(U){if(C=IN(i),!E)return Le(i,C)}else{var $=Ie(i),Y=$==at||$==St;if(dn(i))return jm(i,E);if($==Me||$==Pt||Y&&!v){if(C=M||Y?{}:h0(i),!E)return M?vN(i,$3(C,i)):mN(i,bm(C,i))}else{if(!qt[$])return v?i:{};C=RN(i,$,E)}}b||(b=new _r);var et=b.get(i);if(et)return et;b.set(i,C),U0(i)?i.forEach(function(lt){C.add(tr(lt,o,h,lt,i,b))}):B0(i)&&i.forEach(function(lt,bt){C.set(bt,tr(lt,o,h,bt,i,b))});var ut=D?M?Bh:kh:M?Be:_e,mt=U?r:ut(i);return Ze(mt||i,function(lt,bt){mt&&(bt=lt,lt=i[bt]),Cs(C,bt,tr(lt,o,h,bt,i,b))}),C}function G3(i){var o=_e(i);return function(h){return Tm(h,i,o)}}function Tm(i,o,h){var d=h.length;if(i==null)return!d;for(i=Xt(i);d--;){var v=h[d],b=o[v],C=i[v];if(C===r&&!(v in i)||!b(C))return!1}return!0}function wm(i,o,h){if(typeof i!="function")throw new Je(u);return Fs(function(){i.apply(r,h)},o)}function Es(i,o,h,d){var v=-1,b=Qa,C=!0,E=i.length,M=[],D=o.length;if(!E)return M;h&&(o=ee(o,ze(h))),d?(b=nh,C=!1):o.length>=s&&(b=xs,C=!1,o=new Bn(o));t:for(;++v<E;){var U=i[v],$=h==null?U:h(U);if(U=d||U!==0?U:0,C&&$===$){for(var Y=D;Y--;)if(o[Y]===$)continue t;M.push(U)}else b(o,$,d)||M.push(U)}return M}var ln=Km(Pr),Sm=Km(_h,!0);function z3(i,o){var h=!0;return ln(i,function(d,v,b){return h=!!o(d,v,b),h}),h}function yo(i,o,h){for(var d=-1,v=i.length;++d<v;){var b=i[d],C=o(b);if(C!=null&&(E===r?C===C&&!Ve(C):h(C,E)))var E=C,M=b}return M}function H3(i,o,h,d){var v=i.length;for(h=pt(h),h<0&&(h=-h>v?0:v+h),d=d===r||d>v?v:pt(d),d<0&&(d+=v),d=h>d?0:G0(d);h<d;)i[h++]=o;return i}function Am(i,o){var h=[];return ln(i,function(d,v,b){o(d,v,b)&&h.push(d)}),h}function Te(i,o,h,d,v){var b=-1,C=i.length;for(h||(h=MN),v||(v=[]);++b<C;){var E=i[b];o>0&&h(E)?o>1?Te(E,o-1,h,d,v):an(v,E):d||(v[v.length]=E)}return v}var yh=Zm(),Cm=Zm(!0);function Pr(i,o){return i&&yh(i,o,_e)}function _h(i,o){return i&&Cm(i,o,_e)}function _o(i,o){return sn(o,function(h){return Wr(i[h])})}function Un(i,o){o=cn(o,i);for(var h=0,d=o.length;i!=null&&h<d;)i=i[Or(o[h++])];return h&&h==d?i:r}function Em(i,o,h){var d=o(i);return dt(i)?d:an(d,h(i))}function Oe(i){return i==null?i===r?yO:gr:Ln&&Ln in Xt(i)?AN(i):DN(i)}function xh(i,o){return i>o}function V3(i,o){return i!=null&&zt.call(i,o)}function j3(i,o){return i!=null&&o in Xt(i)}function X3(i,o,h){return i>=Ee(o,h)&&i<ge(o,h)}function bh(i,o,h){for(var d=h?nh:Qa,v=i[0].length,b=i.length,C=b,E=F(b),M=1/0,D=[];C--;){var U=i[C];C&&o&&(U=ee(U,ze(o))),M=Ee(U.length,M),E[C]=!h&&(o||v>=120&&U.length>=120)?new Bn(C&&U):r}U=i[0];var $=-1,Y=E[0];t:for(;++$<v&&D.length<M;){var et=U[$],ut=o?o(et):et;if(et=h||et!==0?et:0,!(Y?xs(Y,ut):d(D,ut,h))){for(C=b;--C;){var mt=E[C];if(!(mt?xs(mt,ut):d(i[C],ut,h)))continue t}Y&&Y.push(ut),D.push(et)}}return D}function W3(i,o,h,d){return Pr(i,function(v,b,C){o(d,h(v),b,C)}),d}function Is(i,o,h){o=cn(o,i),i=p0(i,o);var d=i==null?i:i[Or(rr(o))];return d==null?r:Ge(d,i,h)}function Im(i){return ae(i)&&Oe(i)==Pt}function q3(i){return ae(i)&&Oe(i)==_s}function Y3(i){return ae(i)&&Oe(i)==Zt}function Rs(i,o,h,d,v){return i===o?!0:i==null||o==null||!ae(i)&&!ae(o)?i!==i&&o!==o:K3(i,o,h,d,Rs,v)}function K3(i,o,h,d,v,b){var C=dt(i),E=dt(o),M=C?Ft:Ie(i),D=E?Ft:Ie(o);M=M==Pt?Me:M,D=D==Pt?Me:D;var U=M==Me,$=D==Me,Y=M==D;if(Y&&dn(i)){if(!dn(o))return!1;C=!0,U=!1}if(Y&&!U)return b||(b=new _r),C||Ui(i)?o0(i,o,h,d,v,b):wN(i,o,M,h,d,v,b);if(!(h&y)){var et=U&&zt.call(i,"__wrapped__"),ut=$&&zt.call(o,"__wrapped__");if(et||ut){var mt=et?i.value():i,lt=ut?o.value():o;return b||(b=new _r),v(mt,lt,h,d,b)}}return Y?(b||(b=new _r),SN(i,o,h,d,v,b)):!1}function Z3(i){return ae(i)&&Ie(i)==Et}function Th(i,o,h,d){var v=h.length,b=v,C=!d;if(i==null)return!b;for(i=Xt(i);v--;){var E=h[v];if(C&&E[2]?E[1]!==i[E[0]]:!(E[0]in i))return!1}for(;++v<b;){E=h[v];var M=E[0],D=i[M],U=E[1];if(C&&E[2]){if(D===r&&!(M in i))return!1}else{var $=new _r;if(d)var Y=d(D,U,M,i,o,$);if(!(Y===r?Rs(U,D,y|S,d,$):Y))return!1}}return!0}function Rm(i){if(!se(i)||FN(i))return!1;var o=Wr(i)?ZF:GO;return o.test(Gn(i))}function J3(i){return ae(i)&&Oe(i)==Ai}function Q3(i){return ae(i)&&Ie(i)==vr}function tN(i){return ae(i)&&ko(i.length)&&!!Qt[Oe(i)]}function Pm(i){return typeof i=="function"?i:i==null?De:typeof i=="object"?dt(i)?Fm(i[0],i[1]):Om(i):J0(i)}function wh(i){if(!Os(i))return n3(i);var o=[];for(var h in Xt(i))zt.call(i,h)&&h!="constructor"&&o.push(h);return o}function eN(i){if(!se(i))return BN(i);var o=Os(i),h=[];for(var d in i)d=="constructor"&&(o||!zt.call(i,d))||h.push(d);return h}function Sh(i,o){return i<o}function Mm(i,o){var h=-1,d=ke(i)?F(i.length):[];return ln(i,function(v,b,C){d[++h]=o(v,b,C)}),d}function Om(i){var o=Uh(i);return o.length==1&&o[0][2]?f0(o[0][0],o[0][1]):function(h){return h===i||Th(h,i,o)}}function Fm(i,o){return Gh(i)&&c0(o)?f0(Or(i),o):function(h){var d=Zh(h,i);return d===r&&d===o?Jh(h,i):Rs(o,d,y|S)}}function xo(i,o,h,d,v){i!==o&&yh(o,function(b,C){if(v||(v=new _r),se(b))rN(i,o,C,h,xo,d,v);else{var E=d?d(Hh(i,C),b,C+"",i,o,v):r;E===r&&(E=b),mh(i,C,E)}},Be)}function rN(i,o,h,d,v,b,C){var E=Hh(i,h),M=Hh(o,h),D=C.get(M);if(D){mh(i,h,D);return}var U=b?b(E,M,h+"",i,o,C):r,$=U===r;if($){var Y=dt(M),et=!Y&&dn(M),ut=!Y&&!et&&Ui(M);U=M,Y||et||ut?dt(E)?U=E:he(E)?U=Le(E):et?($=!1,U=jm(M,!0)):ut?($=!1,U=Xm(M,!0)):U=[]:Ns(M)||zn(M)?(U=E,zn(E)?U=z0(E):(!se(E)||Wr(E))&&(U=h0(M))):$=!1}$&&(C.set(M,U),v(U,M,d,b,C),C.delete(M)),mh(i,h,U)}function Nm(i,o){var h=i.length;if(h)return o+=o<0?h:0,Xr(o,h)?i[o]:r}function Lm(i,o,h){o.length?o=ee(o,function(b){return dt(b)?function(C){return Un(C,b.length===1?b[0]:b)}:b}):o=[De];var d=-1;o=ee(o,ze(ot()));var v=Mm(i,function(b,C,E){var M=ee(o,function(D){return D(b)});return{criteria:M,index:++d,value:b}});return RF(v,function(b,C){return gN(b,C,h)})}function nN(i,o){return km(i,o,function(h,d){return Jh(i,d)})}function km(i,o,h){for(var d=-1,v=o.length,b={};++d<v;){var C=o[d],E=Un(i,C);h(E,C)&&Ps(b,cn(C,i),E)}return b}function iN(i){return function(o){return Un(o,i)}}function Ah(i,o,h,d){var v=d?IF:Ii,b=-1,C=o.length,E=i;for(i===o&&(o=Le(o)),h&&(E=ee(i,ze(h)));++b<C;)for(var M=0,D=o[b],U=h?h(D):D;(M=v(E,U,M,d))>-1;)E!==i&&lo.call(E,M,1),lo.call(i,M,1);return i}function Bm(i,o){for(var h=i?o.length:0,d=h-1;h--;){var v=o[h];if(h==d||v!==b){var b=v;Xr(v)?lo.call(i,v,1):Rh(i,v)}}return i}function Ch(i,o){return i+fo(vm()*(o-i+1))}function sN(i,o,h,d){for(var v=-1,b=ge(co((o-i)/(h||1)),0),C=F(b);b--;)C[d?b:++v]=i,i+=h;return C}function Eh(i,o){var h="";if(!i||o<1||o>rt)return h;do o%2&&(h+=i),o=fo(o/2),o&&(i+=i);while(o);return h}function vt(i,o){return Vh(d0(i,o,De),i+"")}function aN(i){return xm($i(i))}function oN(i,o){var h=$i(i);return Po(h,Dn(o,0,h.length))}function Ps(i,o,h,d){if(!se(i))return i;o=cn(o,i);for(var v=-1,b=o.length,C=b-1,E=i;E!=null&&++v<b;){var M=Or(o[v]),D=h;if(M==="__proto__"||M==="constructor"||M==="prototype")return i;if(v!=C){var U=E[M];D=d?d(U,M,E):r,D===r&&(D=se(U)?U:Xr(o[v+1])?[]:{})}Cs(E,M,D),E=E[M]}return i}var Dm=po?function(i,o){return po.set(i,o),i}:De,uN=ho?function(i,o){return ho(i,"toString",{configurable:!0,enumerable:!1,value:tc(o),writable:!0})}:De;function lN(i){return Po($i(i))}function er(i,o,h){var d=-1,v=i.length;o<0&&(o=-o>v?0:v+o),h=h>v?v:h,h<0&&(h+=v),v=o>h?0:h-o>>>0,o>>>=0;for(var b=F(v);++d<v;)b[d]=i[d+o];return b}function hN(i,o){var h;return ln(i,function(d,v,b){return h=o(d,v,b),!h}),!!h}function bo(i,o,h){var d=0,v=i==null?d:i.length;if(typeof o=="number"&&o===o&&v<=yt){for(;d<v;){var b=d+v>>>1,C=i[b];C!==null&&!Ve(C)&&(h?C<=o:C<o)?d=b+1:v=b}return v}return Ih(i,o,De,h)}function Ih(i,o,h,d){var v=0,b=i==null?0:i.length;if(b===0)return 0;o=h(o);for(var C=o!==o,E=o===null,M=Ve(o),D=o===r;v<b;){var U=fo((v+b)/2),$=h(i[U]),Y=$!==r,et=$===null,ut=$===$,mt=Ve($);if(C)var lt=d||ut;else D?lt=ut&&(d||Y):E?lt=ut&&Y&&(d||!et):M?lt=ut&&Y&&!et&&(d||!mt):et||mt?lt=!1:lt=d?$<=o:$<o;lt?v=U+1:b=U}return Ee(b,ct)}function Um(i,o){for(var h=-1,d=i.length,v=0,b=[];++h<d;){var C=i[h],E=o?o(C):C;if(!h||!xr(E,M)){var M=E;b[v++]=C===0?0:C}}return b}function $m(i){return typeof i=="number"?i:Ve(i)?H:+i}function He(i){if(typeof i=="string")return i;if(dt(i))return ee(i,He)+"";if(Ve(i))return ym?ym.call(i):"";var o=i+"";return o=="0"&&1/i==-G?"-0":o}function hn(i,o,h){var d=-1,v=Qa,b=i.length,C=!0,E=[],M=E;if(h)C=!1,v=nh;else if(b>=s){var D=o?null:bN(i);if(D)return eo(D);C=!1,v=xs,M=new Bn}else M=o?[]:E;t:for(;++d<b;){var U=i[d],$=o?o(U):U;if(U=h||U!==0?U:0,C&&$===$){for(var Y=M.length;Y--;)if(M[Y]===$)continue t;o&&M.push($),E.push(U)}else v(M,$,h)||(M!==E&&M.push($),E.push(U))}return E}function Rh(i,o){return o=cn(o,i),i=p0(i,o),i==null||delete i[Or(rr(o))]}function Gm(i,o,h,d){return Ps(i,o,h(Un(i,o)),d)}function To(i,o,h,d){for(var v=i.length,b=d?v:-1;(d?b--:++b<v)&&o(i[b],b,i););return h?er(i,d?0:b,d?b+1:v):er(i,d?b+1:0,d?v:b)}function zm(i,o){var h=i;return h instanceof At&&(h=h.value()),ih(o,function(d,v){return v.func.apply(v.thisArg,an([d],v.args))},h)}function Ph(i,o,h){var d=i.length;if(d<2)return d?hn(i[0]):[];for(var v=-1,b=F(d);++v<d;)for(var C=i[v],E=-1;++E<d;)E!=v&&(b[v]=Es(b[v]||C,i[E],o,h));return hn(Te(b,1),o,h)}function Hm(i,o,h){for(var d=-1,v=i.length,b=o.length,C={};++d<v;){var E=d<b?o[d]:r;h(C,i[d],E)}return C}function Mh(i){return he(i)?i:[]}function Oh(i){return typeof i=="function"?i:De}function cn(i,o){return dt(i)?i:Gh(i,o)?[i]:y0($t(i))}var cN=vt;function fn(i,o,h){var d=i.length;return h=h===r?d:h,!o&&h>=d?i:er(i,o,h)}var Vm=JF||function(i){return be.clearTimeout(i)};function jm(i,o){if(o)return i.slice();var h=i.length,d=fm?fm(h):new i.constructor(h);return i.copy(d),d}function Fh(i){var o=new i.constructor(i.byteLength);return new oo(o).set(new oo(i)),o}function fN(i,o){var h=o?Fh(i.buffer):i.buffer;return new i.constructor(h,i.byteOffset,i.byteLength)}function dN(i){var o=new i.constructor(i.source,Ig.exec(i));return o.lastIndex=i.lastIndex,o}function pN(i){return As?Xt(As.call(i)):{}}function Xm(i,o){var h=o?Fh(i.buffer):i.buffer;return new i.constructor(h,i.byteOffset,i.length)}function Wm(i,o){if(i!==o){var h=i!==r,d=i===null,v=i===i,b=Ve(i),C=o!==r,E=o===null,M=o===o,D=Ve(o);if(!E&&!D&&!b&&i>o||b&&C&&M&&!E&&!D||d&&C&&M||!h&&M||!v)return 1;if(!d&&!b&&!D&&i<o||D&&h&&v&&!d&&!b||E&&h&&v||!C&&v||!M)return-1}return 0}function gN(i,o,h){for(var d=-1,v=i.criteria,b=o.criteria,C=v.length,E=h.length;++d<C;){var M=Wm(v[d],b[d]);if(M){if(d>=E)return M;var D=h[d];return M*(D=="desc"?-1:1)}}return i.index-o.index}function qm(i,o,h,d){for(var v=-1,b=i.length,C=h.length,E=-1,M=o.length,D=ge(b-C,0),U=F(M+D),$=!d;++E<M;)U[E]=o[E];for(;++v<C;)($||v<b)&&(U[h[v]]=i[v]);for(;D--;)U[E++]=i[v++];return U}function Ym(i,o,h,d){for(var v=-1,b=i.length,C=-1,E=h.length,M=-1,D=o.length,U=ge(b-E,0),$=F(U+D),Y=!d;++v<U;)$[v]=i[v];for(var et=v;++M<D;)$[et+M]=o[M];for(;++C<E;)(Y||v<b)&&($[et+h[C]]=i[v++]);return $}function Le(i,o){var h=-1,d=i.length;for(o||(o=F(d));++h<d;)o[h]=i[h];return o}function Mr(i,o,h,d){var v=!h;h||(h={});for(var b=-1,C=o.length;++b<C;){var E=o[b],M=d?d(h[E],i[E],E,h,i):r;M===r&&(M=i[E]),v?Hr(h,E,M):Cs(h,E,M)}return h}function mN(i,o){return Mr(i,$h(i),o)}function vN(i,o){return Mr(i,u0(i),o)}function wo(i,o){return function(h,d){var v=dt(h)?TF:U3,b=o?o():{};return v(h,i,ot(d,2),b)}}function ki(i){return vt(function(o,h){var d=-1,v=h.length,b=v>1?h[v-1]:r,C=v>2?h[2]:r;for(b=i.length>3&&typeof b=="function"?(v--,b):r,C&&Fe(h[0],h[1],C)&&(b=v<3?r:b,v=1),o=Xt(o);++d<v;){var E=h[d];E&&i(o,E,d,b)}return o})}function Km(i,o){return function(h,d){if(h==null)return h;if(!ke(h))return i(h,d);for(var v=h.length,b=o?v:-1,C=Xt(h);(o?b--:++b<v)&&d(C[b],b,C)!==!1;);return h}}function Zm(i){return function(o,h,d){for(var v=-1,b=Xt(o),C=d(o),E=C.length;E--;){var M=C[i?E:++v];if(h(b[M],M,b)===!1)break}return o}}function yN(i,o,h){var d=o&T,v=Ms(i);function b(){var C=this&&this!==be&&this instanceof b?v:i;return C.apply(d?h:this,arguments)}return b}function Jm(i){return function(o){o=$t(o);var h=Ri(o)?yr(o):r,d=h?h[0]:o.charAt(0),v=h?fn(h,1).join(""):o.slice(1);return d[i]()+v}}function Bi(i){return function(o){return ih(K0(Y0(o).replace(uF,"")),i,"")}}function Ms(i){return function(){var o=arguments;switch(o.length){case 0:return new i;case 1:return new i(o[0]);case 2:return new i(o[0],o[1]);case 3:return new i(o[0],o[1],o[2]);case 4:return new i(o[0],o[1],o[2],o[3]);case 5:return new i(o[0],o[1],o[2],o[3],o[4]);case 6:return new i(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new i(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var h=Li(i.prototype),d=i.apply(h,o);return se(d)?d:h}}function _N(i,o,h){var d=Ms(i);function v(){for(var b=arguments.length,C=F(b),E=b,M=Di(v);E--;)C[E]=arguments[E];var D=b<3&&C[0]!==M&&C[b-1]!==M?[]:on(C,M);if(b-=D.length,b<h)return n0(i,o,So,v.placeholder,r,C,D,r,r,h-b);var U=this&&this!==be&&this instanceof v?d:i;return Ge(U,this,C)}return v}function Qm(i){return function(o,h,d){var v=Xt(o);if(!ke(o)){var b=ot(h,3);o=_e(o),h=function(E){return b(v[E],E,v)}}var C=i(o,h,d);return C>-1?v[b?o[C]:C]:r}}function t0(i){return jr(function(o){var h=o.length,d=h,v=Qe.prototype.thru;for(i&&o.reverse();d--;){var b=o[d];if(typeof b!="function")throw new Je(u);if(v&&!C&&Io(b)=="wrapper")var C=new Qe([],!0)}for(d=C?d:h;++d<h;){b=o[d];var E=Io(b),M=E=="wrapper"?Dh(b):r;M&&zh(M[0])&&M[1]==(L|A|N|O)&&!M[4].length&&M[9]==1?C=C[Io(M[0])].apply(C,M[3]):C=b.length==1&&zh(b)?C[E]():C.thru(b)}return function(){var D=arguments,U=D[0];if(C&&D.length==1&&dt(U))return C.plant(U).value();for(var $=0,Y=h?o[$].apply(this,D):U;++$<h;)Y=o[$].call(this,Y);return Y}})}function So(i,o,h,d,v,b,C,E,M,D){var U=o&L,$=o&T,Y=o&w,et=o&(A|R),ut=o&z,mt=Y?r:Ms(i);function lt(){for(var bt=arguments.length,It=F(bt),je=bt;je--;)It[je]=arguments[je];if(et)var Ne=Di(lt),Xe=MF(It,Ne);if(d&&(It=qm(It,d,v,et)),b&&(It=Ym(It,b,C,et)),bt-=Xe,et&&bt<D){var ce=on(It,Ne);return n0(i,o,So,lt.placeholder,h,It,ce,E,M,D-bt)}var br=$?h:this,Yr=Y?br[i]:i;return bt=It.length,E?It=UN(It,E):ut&&bt>1&&It.reverse(),U&&M<bt&&(It.length=M),this&&this!==be&&this instanceof lt&&(Yr=mt||Ms(Yr)),Yr.apply(br,It)}return lt}function e0(i,o){return function(h,d){return W3(h,i,o(d),{})}}function Ao(i,o){return function(h,d){var v;if(h===r&&d===r)return o;if(h!==r&&(v=h),d!==r){if(v===r)return d;typeof h=="string"||typeof d=="string"?(h=He(h),d=He(d)):(h=$m(h),d=$m(d)),v=i(h,d)}return v}}function Nh(i){return jr(function(o){return o=ee(o,ze(ot())),vt(function(h){var d=this;return i(o,function(v){return Ge(v,d,h)})})})}function Co(i,o){o=o===r?" ":He(o);var h=o.length;if(h<2)return h?Eh(o,i):o;var d=Eh(o,co(i/Pi(o)));return Ri(o)?fn(yr(d),0,i).join(""):d.slice(0,i)}function xN(i,o,h,d){var v=o&T,b=Ms(i);function C(){for(var E=-1,M=arguments.length,D=-1,U=d.length,$=F(U+M),Y=this&&this!==be&&this instanceof C?b:i;++D<U;)$[D]=d[D];for(;M--;)$[D++]=arguments[++E];return Ge(Y,v?h:this,$)}return C}function r0(i){return function(o,h,d){return d&&typeof d!="number"&&Fe(o,h,d)&&(h=d=r),o=qr(o),h===r?(h=o,o=0):h=qr(h),d=d===r?o<h?1:-1:qr(d),sN(o,h,d,i)}}function Eo(i){return function(o,h){return typeof o=="string"&&typeof h=="string"||(o=nr(o),h=nr(h)),i(o,h)}}function n0(i,o,h,d,v,b,C,E,M,D){var U=o&A,$=U?C:r,Y=U?r:C,et=U?b:r,ut=U?r:b;o|=U?N:B,o&=~(U?B:N),o&I||(o&=~(T|w));var mt=[i,o,v,et,$,ut,Y,E,M,D],lt=h.apply(r,mt);return zh(i)&&g0(lt,mt),lt.placeholder=d,m0(lt,i,o)}function Lh(i){var o=pe[i];return function(h,d){if(h=nr(h),d=d==null?0:Ee(pt(d),292),d&&mm(h)){var v=($t(h)+"e").split("e"),b=o(v[0]+"e"+(+v[1]+d));return v=($t(b)+"e").split("e"),+(v[0]+"e"+(+v[1]-d))}return o(h)}}var bN=Fi&&1/eo(new Fi([,-0]))[1]==G?function(i){return new Fi(i)}:nc;function i0(i){return function(o){var h=Ie(o);return h==Et?ch(o):h==vr?DF(o):PF(o,i(o))}}function Vr(i,o,h,d,v,b,C,E){var M=o&w;if(!M&&typeof i!="function")throw new Je(u);var D=d?d.length:0;if(D||(o&=~(N|B),d=v=r),C=C===r?C:ge(pt(C),0),E=E===r?E:pt(E),D-=v?v.length:0,o&B){var U=d,$=v;d=v=r}var Y=M?r:Dh(i),et=[i,o,h,d,v,U,$,b,C,E];if(Y&&kN(et,Y),i=et[0],o=et[1],h=et[2],d=et[3],v=et[4],E=et[9]=et[9]===r?M?0:i.length:ge(et[9]-D,0),!E&&o&(A|R)&&(o&=~(A|R)),!o||o==T)var ut=yN(i,o,h);else o==A||o==R?ut=_N(i,o,E):(o==N||o==(T|N))&&!v.length?ut=xN(i,o,h,d):ut=So.apply(r,et);var mt=Y?Dm:g0;return m0(mt(ut,et),i,o)}function s0(i,o,h,d){return i===r||xr(i,Oi[h])&&!zt.call(d,h)?o:i}function a0(i,o,h,d,v,b){return se(i)&&se(o)&&(b.set(o,i),xo(i,o,r,a0,b),b.delete(o)),i}function TN(i){return Ns(i)?r:i}function o0(i,o,h,d,v,b){var C=h&y,E=i.length,M=o.length;if(E!=M&&!(C&&M>E))return!1;var D=b.get(i),U=b.get(o);if(D&&U)return D==o&&U==i;var $=-1,Y=!0,et=h&S?new Bn:r;for(b.set(i,o),b.set(o,i);++$<E;){var ut=i[$],mt=o[$];if(d)var lt=C?d(mt,ut,$,o,i,b):d(ut,mt,$,i,o,b);if(lt!==r){if(lt)continue;Y=!1;break}if(et){if(!sh(o,function(bt,It){if(!xs(et,It)&&(ut===bt||v(ut,bt,h,d,b)))return et.push(It)})){Y=!1;break}}else if(!(ut===mt||v(ut,mt,h,d,b))){Y=!1;break}}return b.delete(i),b.delete(o),Y}function wN(i,o,h,d,v,b,C){switch(h){case Ci:if(i.byteLength!=o.byteLength||i.byteOffset!=o.byteOffset)return!1;i=i.buffer,o=o.buffer;case _s:return!(i.byteLength!=o.byteLength||!b(new oo(i),new oo(o)));case Ut:case Zt:case Jt:return xr(+i,+o);case q:return i.name==o.name&&i.message==o.message;case Ai:case vs:return i==o+"";case Et:var E=ch;case vr:var M=d&y;if(E||(E=eo),i.size!=o.size&&!M)return!1;var D=C.get(i);if(D)return D==o;d|=S,C.set(i,o);var U=o0(E(i),E(o),d,v,b,C);return C.delete(i),U;case Ya:if(As)return As.call(i)==As.call(o)}return!1}function SN(i,o,h,d,v,b){var C=h&y,E=kh(i),M=E.length,D=kh(o),U=D.length;if(M!=U&&!C)return!1;for(var $=M;$--;){var Y=E[$];if(!(C?Y in o:zt.call(o,Y)))return!1}var et=b.get(i),ut=b.get(o);if(et&&ut)return et==o&&ut==i;var mt=!0;b.set(i,o),b.set(o,i);for(var lt=C;++$<M;){Y=E[$];var bt=i[Y],It=o[Y];if(d)var je=C?d(It,bt,Y,o,i,b):d(bt,It,Y,i,o,b);if(!(je===r?bt===It||v(bt,It,h,d,b):je)){mt=!1;break}lt||(lt=Y=="constructor")}if(mt&&!lt){var Ne=i.constructor,Xe=o.constructor;Ne!=Xe&&"constructor"in i&&"constructor"in o&&!(typeof Ne=="function"&&Ne instanceof Ne&&typeof Xe=="function"&&Xe instanceof Xe)&&(mt=!1)}return b.delete(i),b.delete(o),mt}function jr(i){return Vh(d0(i,r,T0),i+"")}function kh(i){return Em(i,_e,$h)}function Bh(i){return Em(i,Be,u0)}var Dh=po?function(i){return po.get(i)}:nc;function Io(i){for(var o=i.name+"",h=Ni[o],d=zt.call(Ni,o)?h.length:0;d--;){var v=h[d],b=v.func;if(b==null||b==i)return v.name}return o}function Di(i){var o=zt.call(_,"placeholder")?_:i;return o.placeholder}function ot(){var i=_.iteratee||ec;return i=i===ec?Pm:i,arguments.length?i(arguments[0],arguments[1]):i}function Ro(i,o){var h=i.__data__;return ON(o)?h[typeof o=="string"?"string":"hash"]:h.map}function Uh(i){for(var o=_e(i),h=o.length;h--;){var d=o[h],v=i[d];o[h]=[d,v,c0(v)]}return o}function $n(i,o){var h=LF(i,o);return Rm(h)?h:r}function AN(i){var o=zt.call(i,Ln),h=i[Ln];try{i[Ln]=r;var d=!0}catch{}var v=so.call(i);return d&&(o?i[Ln]=h:delete i[Ln]),v}var $h=dh?function(i){return i==null?[]:(i=Xt(i),sn(dh(i),function(o){return pm.call(i,o)}))}:ic,u0=dh?function(i){for(var o=[];i;)an(o,$h(i)),i=uo(i);return o}:ic,Ie=Oe;(ph&&Ie(new ph(new ArrayBuffer(1)))!=Ci||Ts&&Ie(new Ts)!=Et||gh&&Ie(gh.resolve())!=$r||Fi&&Ie(new Fi)!=vr||ws&&Ie(new ws)!=ys)&&(Ie=function(i){var o=Oe(i),h=o==Me?i.constructor:r,d=h?Gn(h):"";if(d)switch(d){case o3:return Ci;case u3:return Et;case l3:return $r;case h3:return vr;case c3:return ys}return o});function CN(i,o,h){for(var d=-1,v=h.length;++d<v;){var b=h[d],C=b.size;switch(b.type){case"drop":i+=C;break;case"dropRight":o-=C;break;case"take":o=Ee(o,i+C);break;case"takeRight":i=ge(i,o-C);break}}return{start:i,end:o}}function EN(i){var o=i.match(FO);return o?o[1].split(NO):[]}function l0(i,o,h){o=cn(o,i);for(var d=-1,v=o.length,b=!1;++d<v;){var C=Or(o[d]);if(!(b=i!=null&&h(i,C)))break;i=i[C]}return b||++d!=v?b:(v=i==null?0:i.length,!!v&&ko(v)&&Xr(C,v)&&(dt(i)||zn(i)))}function IN(i){var o=i.length,h=new i.constructor(o);return o&&typeof i[0]=="string"&&zt.call(i,"index")&&(h.index=i.index,h.input=i.input),h}function h0(i){return typeof i.constructor=="function"&&!Os(i)?Li(uo(i)):{}}function RN(i,o,h){var d=i.constructor;switch(o){case _s:return Fh(i);case Ut:case Zt:return new d(+i);case Ci:return fN(i,h);case Ul:case $l:case Gl:case zl:case Hl:case Vl:case jl:case Xl:case Wl:return Xm(i,h);case Et:return new d;case Jt:case vs:return new d(i);case Ai:return dN(i);case vr:return new d;case Ya:return pN(i)}}function PN(i,o){var h=o.length;if(!h)return i;var d=h-1;return o[d]=(h>1?"& ":"")+o[d],o=o.join(h>2?", ":" "),i.replace(OO,`{
1941
+ */qa.exports,function(e,t){(function(){var r,n="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",f=500,p="__lodash_placeholder__",m=1,g=2,x=4,y=1,S=2,T=1,w=2,I=4,A=8,R=16,N=32,B=64,L=128,O=256,z=512,X=30,tt="...",st=800,V=16,j=1,bt=2,kt=3,G=1/0,rt=9007199254740991,gt=17976931348623157e292,H=0/0,K=4294967295,ct=K-1,yt=K>>>1,_t=[["ary",L],["bind",T],["bindKey",w],["curry",A],["curryRight",R],["flip",z],["partial",N],["partialRight",B],["rearg",O]],Pt="[object Arguments]",Ot="[object Array]",Ht="[object AsyncFunction]",Vt="[object Boolean]",Kt="[object Date]",J="[object DOMException]",W="[object Error]",at="[object Function]",Ct="[object GeneratorFunction]",Et="[object Map]",Zt="[object Number]",gr="[object Null]",Me="[object Object]",$r="[object Promise]",mr="[object Proxy]",Ai="[object RegExp]",vr="[object Set]",vs="[object String]",Ya="[object Symbol]",yO="[object Undefined]",ys="[object WeakMap]",_O="[object WeakSet]",_s="[object ArrayBuffer]",Ci="[object DataView]",Ul="[object Float32Array]",$l="[object Float64Array]",Gl="[object Int8Array]",zl="[object Int16Array]",Hl="[object Int32Array]",Vl="[object Uint8Array]",jl="[object Uint8ClampedArray]",Xl="[object Uint16Array]",Wl="[object Uint32Array]",xO=/\b__p \+= '';/g,bO=/\b(__p \+=) '' \+/g,TO=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ag=/&(?:amp|lt|gt|quot|#39);/g,Cg=/[&<>"']/g,wO=RegExp(Ag.source),SO=RegExp(Cg.source),AO=/<%-([\s\S]+?)%>/g,CO=/<%([\s\S]+?)%>/g,Eg=/<%=([\s\S]+?)%>/g,EO=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,IO=/^\w*$/,RO=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ql=/[\\^$.*+?()[\]{}|]/g,PO=RegExp(ql.source),Yl=/^\s+/,MO=/\s/,OO=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,FO=/\{\n\/\* \[wrapped with (.+)\] \*/,NO=/,? & /,LO=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kO=/[()=,{}\[\]\/\s]/,BO=/\\(\\)?/g,DO=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ig=/\w*$/,UO=/^[-+]0x[0-9a-f]+$/i,$O=/^0b[01]+$/i,GO=/^\[object .+?Constructor\]$/,zO=/^0o[0-7]+$/i,HO=/^(?:0|[1-9]\d*)$/,VO=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ka=/($^)/,jO=/['\n\r\u2028\u2029\\]/g,Za="\\ud800-\\udfff",XO="\\u0300-\\u036f",WO="\\ufe20-\\ufe2f",qO="\\u20d0-\\u20ff",Rg=XO+WO+qO,Pg="\\u2700-\\u27bf",Mg="a-z\\xdf-\\xf6\\xf8-\\xff",YO="\\xac\\xb1\\xd7\\xf7",KO="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ZO="\\u2000-\\u206f",JO=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Og="A-Z\\xc0-\\xd6\\xd8-\\xde",Fg="\\ufe0e\\ufe0f",Ng=YO+KO+ZO+JO,Kl="['’]",QO="["+Za+"]",Lg="["+Ng+"]",Ja="["+Rg+"]",kg="\\d+",tF="["+Pg+"]",Bg="["+Mg+"]",Dg="[^"+Za+Ng+kg+Pg+Mg+Og+"]",Zl="\\ud83c[\\udffb-\\udfff]",eF="(?:"+Ja+"|"+Zl+")",Ug="[^"+Za+"]",Jl="(?:\\ud83c[\\udde6-\\uddff]){2}",Ql="[\\ud800-\\udbff][\\udc00-\\udfff]",Ei="["+Og+"]",$g="\\u200d",Gg="(?:"+Bg+"|"+Dg+")",rF="(?:"+Ei+"|"+Dg+")",zg="(?:"+Kl+"(?:d|ll|m|re|s|t|ve))?",Hg="(?:"+Kl+"(?:D|LL|M|RE|S|T|VE))?",Vg=eF+"?",jg="["+Fg+"]?",nF="(?:"+$g+"(?:"+[Ug,Jl,Ql].join("|")+")"+jg+Vg+")*",iF="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",sF="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xg=jg+Vg+nF,aF="(?:"+[tF,Jl,Ql].join("|")+")"+Xg,oF="(?:"+[Ug+Ja+"?",Ja,Jl,Ql,QO].join("|")+")",uF=RegExp(Kl,"g"),lF=RegExp(Ja,"g"),th=RegExp(Zl+"(?="+Zl+")|"+oF+Xg,"g"),hF=RegExp([Ei+"?"+Bg+"+"+zg+"(?="+[Lg,Ei,"$"].join("|")+")",rF+"+"+Hg+"(?="+[Lg,Ei+Gg,"$"].join("|")+")",Ei+"?"+Gg+"+"+zg,Ei+"+"+Hg,sF,iF,kg,aF].join("|"),"g"),cF=RegExp("["+$g+Za+Rg+Fg+"]"),fF=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,dF=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],pF=-1,Jt={};Jt[Ul]=Jt[$l]=Jt[Gl]=Jt[zl]=Jt[Hl]=Jt[Vl]=Jt[jl]=Jt[Xl]=Jt[Wl]=!0,Jt[Pt]=Jt[Ot]=Jt[_s]=Jt[Vt]=Jt[Ci]=Jt[Kt]=Jt[W]=Jt[at]=Jt[Et]=Jt[Zt]=Jt[Me]=Jt[Ai]=Jt[vr]=Jt[vs]=Jt[ys]=!1;var qt={};qt[Pt]=qt[Ot]=qt[_s]=qt[Ci]=qt[Vt]=qt[Kt]=qt[Ul]=qt[$l]=qt[Gl]=qt[zl]=qt[Hl]=qt[Et]=qt[Zt]=qt[Me]=qt[Ai]=qt[vr]=qt[vs]=qt[Ya]=qt[Vl]=qt[jl]=qt[Xl]=qt[Wl]=!0,qt[W]=qt[at]=qt[ys]=!1;var gF={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},mF={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vF={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},yF={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_F=parseFloat,xF=parseInt,Wg=typeof We=="object"&&We&&We.Object===Object&&We,bF=typeof self=="object"&&self&&self.Object===Object&&self,be=Wg||bF||Function("return this")(),eh=t&&!t.nodeType&&t,Nn=eh&&!0&&e&&!e.nodeType&&e,qg=Nn&&Nn.exports===eh,rh=qg&&Wg.process,Ke=function(){try{var P=Nn&&Nn.require&&Nn.require("util").types;return P||rh&&rh.binding&&rh.binding("util")}catch{}}(),Yg=Ke&&Ke.isArrayBuffer,Kg=Ke&&Ke.isDate,Zg=Ke&&Ke.isMap,Jg=Ke&&Ke.isRegExp,Qg=Ke&&Ke.isSet,tm=Ke&&Ke.isTypedArray;function Ge(P,k,F){switch(F.length){case 0:return P.call(k);case 1:return P.call(k,F[0]);case 2:return P.call(k,F[0],F[1]);case 3:return P.call(k,F[0],F[1],F[2])}return P.apply(k,F)}function TF(P,k,F,Q){for(var ft=-1,Bt=P==null?0:P.length;++ft<Bt;){var pe=P[ft];k(Q,pe,F(pe),P)}return Q}function Ze(P,k){for(var F=-1,Q=P==null?0:P.length;++F<Q&&k(P[F],F,P)!==!1;);return P}function wF(P,k){for(var F=P==null?0:P.length;F--&&k(P[F],F,P)!==!1;);return P}function em(P,k){for(var F=-1,Q=P==null?0:P.length;++F<Q;)if(!k(P[F],F,P))return!1;return!0}function sn(P,k){for(var F=-1,Q=P==null?0:P.length,ft=0,Bt=[];++F<Q;){var pe=P[F];k(pe,F,P)&&(Bt[ft++]=pe)}return Bt}function Qa(P,k){var F=P==null?0:P.length;return!!F&&Ii(P,k,0)>-1}function nh(P,k,F){for(var Q=-1,ft=P==null?0:P.length;++Q<ft;)if(F(k,P[Q]))return!0;return!1}function ee(P,k){for(var F=-1,Q=P==null?0:P.length,ft=Array(Q);++F<Q;)ft[F]=k(P[F],F,P);return ft}function an(P,k){for(var F=-1,Q=k.length,ft=P.length;++F<Q;)P[ft+F]=k[F];return P}function ih(P,k,F,Q){var ft=-1,Bt=P==null?0:P.length;for(Q&&Bt&&(F=P[++ft]);++ft<Bt;)F=k(F,P[ft],ft,P);return F}function SF(P,k,F,Q){var ft=P==null?0:P.length;for(Q&&ft&&(F=P[--ft]);ft--;)F=k(F,P[ft],ft,P);return F}function sh(P,k){for(var F=-1,Q=P==null?0:P.length;++F<Q;)if(k(P[F],F,P))return!0;return!1}var AF=ah("length");function CF(P){return P.split("")}function EF(P){return P.match(LO)||[]}function rm(P,k,F){var Q;return F(P,function(ft,Bt,pe){if(k(ft,Bt,pe))return Q=Bt,!1}),Q}function to(P,k,F,Q){for(var ft=P.length,Bt=F+(Q?1:-1);Q?Bt--:++Bt<ft;)if(k(P[Bt],Bt,P))return Bt;return-1}function Ii(P,k,F){return k===k?UF(P,k,F):to(P,nm,F)}function IF(P,k,F,Q){for(var ft=F-1,Bt=P.length;++ft<Bt;)if(Q(P[ft],k))return ft;return-1}function nm(P){return P!==P}function im(P,k){var F=P==null?0:P.length;return F?uh(P,k)/F:H}function ah(P){return function(k){return k==null?r:k[P]}}function oh(P){return function(k){return P==null?r:P[k]}}function sm(P,k,F,Q,ft){return ft(P,function(Bt,pe,Xt){F=Q?(Q=!1,Bt):k(F,Bt,pe,Xt)}),F}function RF(P,k){var F=P.length;for(P.sort(k);F--;)P[F]=P[F].value;return P}function uh(P,k){for(var F,Q=-1,ft=P.length;++Q<ft;){var Bt=k(P[Q]);Bt!==r&&(F=F===r?Bt:F+Bt)}return F}function lh(P,k){for(var F=-1,Q=Array(P);++F<P;)Q[F]=k(F);return Q}function PF(P,k){return ee(k,function(F){return[F,P[F]]})}function am(P){return P&&P.slice(0,hm(P)+1).replace(Yl,"")}function ze(P){return function(k){return P(k)}}function hh(P,k){return ee(k,function(F){return P[F]})}function xs(P,k){return P.has(k)}function om(P,k){for(var F=-1,Q=P.length;++F<Q&&Ii(k,P[F],0)>-1;);return F}function um(P,k){for(var F=P.length;F--&&Ii(k,P[F],0)>-1;);return F}function MF(P,k){for(var F=P.length,Q=0;F--;)P[F]===k&&++Q;return Q}var OF=oh(gF),FF=oh(mF);function NF(P){return"\\"+yF[P]}function LF(P,k){return P==null?r:P[k]}function Ri(P){return cF.test(P)}function kF(P){return fF.test(P)}function BF(P){for(var k,F=[];!(k=P.next()).done;)F.push(k.value);return F}function ch(P){var k=-1,F=Array(P.size);return P.forEach(function(Q,ft){F[++k]=[ft,Q]}),F}function lm(P,k){return function(F){return P(k(F))}}function on(P,k){for(var F=-1,Q=P.length,ft=0,Bt=[];++F<Q;){var pe=P[F];(pe===k||pe===p)&&(P[F]=p,Bt[ft++]=F)}return Bt}function eo(P){var k=-1,F=Array(P.size);return P.forEach(function(Q){F[++k]=Q}),F}function DF(P){var k=-1,F=Array(P.size);return P.forEach(function(Q){F[++k]=[Q,Q]}),F}function UF(P,k,F){for(var Q=F-1,ft=P.length;++Q<ft;)if(P[Q]===k)return Q;return-1}function $F(P,k,F){for(var Q=F+1;Q--;)if(P[Q]===k)return Q;return Q}function Pi(P){return Ri(P)?zF(P):AF(P)}function yr(P){return Ri(P)?HF(P):CF(P)}function hm(P){for(var k=P.length;k--&&MO.test(P.charAt(k)););return k}var GF=oh(vF);function zF(P){for(var k=th.lastIndex=0;th.test(P);)++k;return k}function HF(P){return P.match(th)||[]}function VF(P){return P.match(hF)||[]}var jF=function P(k){k=k==null?be:Mi.defaults(be.Object(),k,Mi.pick(be,dF));var F=k.Array,Q=k.Date,ft=k.Error,Bt=k.Function,pe=k.Math,Xt=k.Object,fh=k.RegExp,XF=k.String,Je=k.TypeError,ro=F.prototype,WF=Bt.prototype,Oi=Xt.prototype,no=k["__core-js_shared__"],io=WF.toString,Gt=Oi.hasOwnProperty,qF=0,cm=function(){var i=/[^.]+$/.exec(no&&no.keys&&no.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),so=Oi.toString,YF=io.call(Xt),KF=be._,ZF=fh("^"+io.call(Gt).replace(ql,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ao=qg?k.Buffer:r,un=k.Symbol,oo=k.Uint8Array,fm=ao?ao.allocUnsafe:r,uo=lm(Xt.getPrototypeOf,Xt),dm=Xt.create,pm=Oi.propertyIsEnumerable,lo=ro.splice,gm=un?un.isConcatSpreadable:r,bs=un?un.iterator:r,Ln=un?un.toStringTag:r,ho=function(){try{var i=$n(Xt,"defineProperty");return i({},"",{}),i}catch{}}(),JF=k.clearTimeout!==be.clearTimeout&&k.clearTimeout,QF=Q&&Q.now!==be.Date.now&&Q.now,t3=k.setTimeout!==be.setTimeout&&k.setTimeout,co=pe.ceil,fo=pe.floor,dh=Xt.getOwnPropertySymbols,e3=ao?ao.isBuffer:r,mm=k.isFinite,r3=ro.join,n3=lm(Xt.keys,Xt),ge=pe.max,Ee=pe.min,i3=Q.now,s3=k.parseInt,vm=pe.random,a3=ro.reverse,ph=$n(k,"DataView"),Ts=$n(k,"Map"),gh=$n(k,"Promise"),Fi=$n(k,"Set"),ws=$n(k,"WeakMap"),Ss=$n(Xt,"create"),po=ws&&new ws,Ni={},o3=Gn(ph),u3=Gn(Ts),l3=Gn(gh),h3=Gn(Fi),c3=Gn(ws),go=un?un.prototype:r,As=go?go.valueOf:r,ym=go?go.toString:r;function _(i){if(ae(i)&&!dt(i)&&!(i instanceof St)){if(i instanceof Qe)return i;if(Gt.call(i,"__wrapped__"))return _0(i)}return new Qe(i)}var Li=function(){function i(){}return function(o){if(!se(o))return{};if(dm)return dm(o);i.prototype=o;var h=new i;return i.prototype=r,h}}();function mo(){}function Qe(i,o){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=r}_.templateSettings={escape:AO,evaluate:CO,interpolate:Eg,variable:"",imports:{_}},_.prototype=mo.prototype,_.prototype.constructor=_,Qe.prototype=Li(mo.prototype),Qe.prototype.constructor=Qe;function St(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=K,this.__views__=[]}function f3(){var i=new St(this.__wrapped__);return i.__actions__=Le(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Le(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Le(this.__views__),i}function d3(){if(this.__filtered__){var i=new St(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function p3(){var i=this.__wrapped__.value(),o=this.__dir__,h=dt(i),d=o<0,v=h?i.length:0,b=CN(0,v,this.__views__),C=b.start,E=b.end,M=E-C,D=d?E:C-1,U=this.__iteratees__,$=U.length,Y=0,et=Ee(M,this.__takeCount__);if(!h||!d&&v==M&&et==M)return zm(i,this.__actions__);var ut=[];t:for(;M--&&Y<et;){D+=o;for(var mt=-1,lt=i[D];++mt<$;){var Tt=U[mt],It=Tt.iteratee,je=Tt.type,Ne=It(lt);if(je==bt)lt=Ne;else if(!Ne){if(je==j)continue t;break t}}ut[Y++]=lt}return ut}St.prototype=Li(mo.prototype),St.prototype.constructor=St;function kn(i){var o=-1,h=i==null?0:i.length;for(this.clear();++o<h;){var d=i[o];this.set(d[0],d[1])}}function g3(){this.__data__=Ss?Ss(null):{},this.size=0}function m3(i){var o=this.has(i)&&delete this.__data__[i];return this.size-=o?1:0,o}function v3(i){var o=this.__data__;if(Ss){var h=o[i];return h===c?r:h}return Gt.call(o,i)?o[i]:r}function y3(i){var o=this.__data__;return Ss?o[i]!==r:Gt.call(o,i)}function _3(i,o){var h=this.__data__;return this.size+=this.has(i)?0:1,h[i]=Ss&&o===r?c:o,this}kn.prototype.clear=g3,kn.prototype.delete=m3,kn.prototype.get=v3,kn.prototype.has=y3,kn.prototype.set=_3;function Gr(i){var o=-1,h=i==null?0:i.length;for(this.clear();++o<h;){var d=i[o];this.set(d[0],d[1])}}function x3(){this.__data__=[],this.size=0}function b3(i){var o=this.__data__,h=vo(o,i);if(h<0)return!1;var d=o.length-1;return h==d?o.pop():lo.call(o,h,1),--this.size,!0}function T3(i){var o=this.__data__,h=vo(o,i);return h<0?r:o[h][1]}function w3(i){return vo(this.__data__,i)>-1}function S3(i,o){var h=this.__data__,d=vo(h,i);return d<0?(++this.size,h.push([i,o])):h[d][1]=o,this}Gr.prototype.clear=x3,Gr.prototype.delete=b3,Gr.prototype.get=T3,Gr.prototype.has=w3,Gr.prototype.set=S3;function zr(i){var o=-1,h=i==null?0:i.length;for(this.clear();++o<h;){var d=i[o];this.set(d[0],d[1])}}function A3(){this.size=0,this.__data__={hash:new kn,map:new(Ts||Gr),string:new kn}}function C3(i){var o=Ro(this,i).delete(i);return this.size-=o?1:0,o}function E3(i){return Ro(this,i).get(i)}function I3(i){return Ro(this,i).has(i)}function R3(i,o){var h=Ro(this,i),d=h.size;return h.set(i,o),this.size+=h.size==d?0:1,this}zr.prototype.clear=A3,zr.prototype.delete=C3,zr.prototype.get=E3,zr.prototype.has=I3,zr.prototype.set=R3;function Bn(i){var o=-1,h=i==null?0:i.length;for(this.__data__=new zr;++o<h;)this.add(i[o])}function P3(i){return this.__data__.set(i,c),this}function M3(i){return this.__data__.has(i)}Bn.prototype.add=Bn.prototype.push=P3,Bn.prototype.has=M3;function _r(i){var o=this.__data__=new Gr(i);this.size=o.size}function O3(){this.__data__=new Gr,this.size=0}function F3(i){var o=this.__data__,h=o.delete(i);return this.size=o.size,h}function N3(i){return this.__data__.get(i)}function L3(i){return this.__data__.has(i)}function k3(i,o){var h=this.__data__;if(h instanceof Gr){var d=h.__data__;if(!Ts||d.length<s-1)return d.push([i,o]),this.size=++h.size,this;h=this.__data__=new zr(d)}return h.set(i,o),this.size=h.size,this}_r.prototype.clear=O3,_r.prototype.delete=F3,_r.prototype.get=N3,_r.prototype.has=L3,_r.prototype.set=k3;function _m(i,o){var h=dt(i),d=!h&&zn(i),v=!h&&!d&&dn(i),b=!h&&!d&&!v&&Ui(i),C=h||d||v||b,E=C?lh(i.length,XF):[],M=E.length;for(var D in i)(o||Gt.call(i,D))&&!(C&&(D=="length"||v&&(D=="offset"||D=="parent")||b&&(D=="buffer"||D=="byteLength"||D=="byteOffset")||Xr(D,M)))&&E.push(D);return E}function xm(i){var o=i.length;return o?i[Ch(0,o-1)]:r}function B3(i,o){return Po(Le(i),Dn(o,0,i.length))}function D3(i){return Po(Le(i))}function mh(i,o,h){(h!==r&&!xr(i[o],h)||h===r&&!(o in i))&&Hr(i,o,h)}function Cs(i,o,h){var d=i[o];(!(Gt.call(i,o)&&xr(d,h))||h===r&&!(o in i))&&Hr(i,o,h)}function vo(i,o){for(var h=i.length;h--;)if(xr(i[h][0],o))return h;return-1}function U3(i,o,h,d){return ln(i,function(v,b,C){o(d,v,h(v),C)}),d}function bm(i,o){return i&&Mr(o,_e(o),i)}function $3(i,o){return i&&Mr(o,Be(o),i)}function Hr(i,o,h){o=="__proto__"&&ho?ho(i,o,{configurable:!0,enumerable:!0,value:h,writable:!0}):i[o]=h}function vh(i,o){for(var h=-1,d=o.length,v=F(d),b=i==null;++h<d;)v[h]=b?r:Zh(i,o[h]);return v}function Dn(i,o,h){return i===i&&(h!==r&&(i=i<=h?i:h),o!==r&&(i=i>=o?i:o)),i}function tr(i,o,h,d,v,b){var C,E=o&m,M=o&g,D=o&x;if(h&&(C=v?h(i,d,v,b):h(i)),C!==r)return C;if(!se(i))return i;var U=dt(i);if(U){if(C=IN(i),!E)return Le(i,C)}else{var $=Ie(i),Y=$==at||$==Ct;if(dn(i))return jm(i,E);if($==Me||$==Pt||Y&&!v){if(C=M||Y?{}:h0(i),!E)return M?vN(i,$3(C,i)):mN(i,bm(C,i))}else{if(!qt[$])return v?i:{};C=RN(i,$,E)}}b||(b=new _r);var et=b.get(i);if(et)return et;b.set(i,C),U0(i)?i.forEach(function(lt){C.add(tr(lt,o,h,lt,i,b))}):B0(i)&&i.forEach(function(lt,Tt){C.set(Tt,tr(lt,o,h,Tt,i,b))});var ut=D?M?Bh:kh:M?Be:_e,mt=U?r:ut(i);return Ze(mt||i,function(lt,Tt){mt&&(Tt=lt,lt=i[Tt]),Cs(C,Tt,tr(lt,o,h,Tt,i,b))}),C}function G3(i){var o=_e(i);return function(h){return Tm(h,i,o)}}function Tm(i,o,h){var d=h.length;if(i==null)return!d;for(i=Xt(i);d--;){var v=h[d],b=o[v],C=i[v];if(C===r&&!(v in i)||!b(C))return!1}return!0}function wm(i,o,h){if(typeof i!="function")throw new Je(u);return Fs(function(){i.apply(r,h)},o)}function Es(i,o,h,d){var v=-1,b=Qa,C=!0,E=i.length,M=[],D=o.length;if(!E)return M;h&&(o=ee(o,ze(h))),d?(b=nh,C=!1):o.length>=s&&(b=xs,C=!1,o=new Bn(o));t:for(;++v<E;){var U=i[v],$=h==null?U:h(U);if(U=d||U!==0?U:0,C&&$===$){for(var Y=D;Y--;)if(o[Y]===$)continue t;M.push(U)}else b(o,$,d)||M.push(U)}return M}var ln=Km(Pr),Sm=Km(_h,!0);function z3(i,o){var h=!0;return ln(i,function(d,v,b){return h=!!o(d,v,b),h}),h}function yo(i,o,h){for(var d=-1,v=i.length;++d<v;){var b=i[d],C=o(b);if(C!=null&&(E===r?C===C&&!Ve(C):h(C,E)))var E=C,M=b}return M}function H3(i,o,h,d){var v=i.length;for(h=pt(h),h<0&&(h=-h>v?0:v+h),d=d===r||d>v?v:pt(d),d<0&&(d+=v),d=h>d?0:G0(d);h<d;)i[h++]=o;return i}function Am(i,o){var h=[];return ln(i,function(d,v,b){o(d,v,b)&&h.push(d)}),h}function Te(i,o,h,d,v){var b=-1,C=i.length;for(h||(h=MN),v||(v=[]);++b<C;){var E=i[b];o>0&&h(E)?o>1?Te(E,o-1,h,d,v):an(v,E):d||(v[v.length]=E)}return v}var yh=Zm(),Cm=Zm(!0);function Pr(i,o){return i&&yh(i,o,_e)}function _h(i,o){return i&&Cm(i,o,_e)}function _o(i,o){return sn(o,function(h){return Wr(i[h])})}function Un(i,o){o=cn(o,i);for(var h=0,d=o.length;i!=null&&h<d;)i=i[Or(o[h++])];return h&&h==d?i:r}function Em(i,o,h){var d=o(i);return dt(i)?d:an(d,h(i))}function Oe(i){return i==null?i===r?yO:gr:Ln&&Ln in Xt(i)?AN(i):DN(i)}function xh(i,o){return i>o}function V3(i,o){return i!=null&&Gt.call(i,o)}function j3(i,o){return i!=null&&o in Xt(i)}function X3(i,o,h){return i>=Ee(o,h)&&i<ge(o,h)}function bh(i,o,h){for(var d=h?nh:Qa,v=i[0].length,b=i.length,C=b,E=F(b),M=1/0,D=[];C--;){var U=i[C];C&&o&&(U=ee(U,ze(o))),M=Ee(U.length,M),E[C]=!h&&(o||v>=120&&U.length>=120)?new Bn(C&&U):r}U=i[0];var $=-1,Y=E[0];t:for(;++$<v&&D.length<M;){var et=U[$],ut=o?o(et):et;if(et=h||et!==0?et:0,!(Y?xs(Y,ut):d(D,ut,h))){for(C=b;--C;){var mt=E[C];if(!(mt?xs(mt,ut):d(i[C],ut,h)))continue t}Y&&Y.push(ut),D.push(et)}}return D}function W3(i,o,h,d){return Pr(i,function(v,b,C){o(d,h(v),b,C)}),d}function Is(i,o,h){o=cn(o,i),i=p0(i,o);var d=i==null?i:i[Or(rr(o))];return d==null?r:Ge(d,i,h)}function Im(i){return ae(i)&&Oe(i)==Pt}function q3(i){return ae(i)&&Oe(i)==_s}function Y3(i){return ae(i)&&Oe(i)==Kt}function Rs(i,o,h,d,v){return i===o?!0:i==null||o==null||!ae(i)&&!ae(o)?i!==i&&o!==o:K3(i,o,h,d,Rs,v)}function K3(i,o,h,d,v,b){var C=dt(i),E=dt(o),M=C?Ot:Ie(i),D=E?Ot:Ie(o);M=M==Pt?Me:M,D=D==Pt?Me:D;var U=M==Me,$=D==Me,Y=M==D;if(Y&&dn(i)){if(!dn(o))return!1;C=!0,U=!1}if(Y&&!U)return b||(b=new _r),C||Ui(i)?o0(i,o,h,d,v,b):wN(i,o,M,h,d,v,b);if(!(h&y)){var et=U&&Gt.call(i,"__wrapped__"),ut=$&&Gt.call(o,"__wrapped__");if(et||ut){var mt=et?i.value():i,lt=ut?o.value():o;return b||(b=new _r),v(mt,lt,h,d,b)}}return Y?(b||(b=new _r),SN(i,o,h,d,v,b)):!1}function Z3(i){return ae(i)&&Ie(i)==Et}function Th(i,o,h,d){var v=h.length,b=v,C=!d;if(i==null)return!b;for(i=Xt(i);v--;){var E=h[v];if(C&&E[2]?E[1]!==i[E[0]]:!(E[0]in i))return!1}for(;++v<b;){E=h[v];var M=E[0],D=i[M],U=E[1];if(C&&E[2]){if(D===r&&!(M in i))return!1}else{var $=new _r;if(d)var Y=d(D,U,M,i,o,$);if(!(Y===r?Rs(U,D,y|S,d,$):Y))return!1}}return!0}function Rm(i){if(!se(i)||FN(i))return!1;var o=Wr(i)?ZF:GO;return o.test(Gn(i))}function J3(i){return ae(i)&&Oe(i)==Ai}function Q3(i){return ae(i)&&Ie(i)==vr}function tN(i){return ae(i)&&ko(i.length)&&!!Jt[Oe(i)]}function Pm(i){return typeof i=="function"?i:i==null?De:typeof i=="object"?dt(i)?Fm(i[0],i[1]):Om(i):J0(i)}function wh(i){if(!Os(i))return n3(i);var o=[];for(var h in Xt(i))Gt.call(i,h)&&h!="constructor"&&o.push(h);return o}function eN(i){if(!se(i))return BN(i);var o=Os(i),h=[];for(var d in i)d=="constructor"&&(o||!Gt.call(i,d))||h.push(d);return h}function Sh(i,o){return i<o}function Mm(i,o){var h=-1,d=ke(i)?F(i.length):[];return ln(i,function(v,b,C){d[++h]=o(v,b,C)}),d}function Om(i){var o=Uh(i);return o.length==1&&o[0][2]?f0(o[0][0],o[0][1]):function(h){return h===i||Th(h,i,o)}}function Fm(i,o){return Gh(i)&&c0(o)?f0(Or(i),o):function(h){var d=Zh(h,i);return d===r&&d===o?Jh(h,i):Rs(o,d,y|S)}}function xo(i,o,h,d,v){i!==o&&yh(o,function(b,C){if(v||(v=new _r),se(b))rN(i,o,C,h,xo,d,v);else{var E=d?d(Hh(i,C),b,C+"",i,o,v):r;E===r&&(E=b),mh(i,C,E)}},Be)}function rN(i,o,h,d,v,b,C){var E=Hh(i,h),M=Hh(o,h),D=C.get(M);if(D){mh(i,h,D);return}var U=b?b(E,M,h+"",i,o,C):r,$=U===r;if($){var Y=dt(M),et=!Y&&dn(M),ut=!Y&&!et&&Ui(M);U=M,Y||et||ut?dt(E)?U=E:he(E)?U=Le(E):et?($=!1,U=jm(M,!0)):ut?($=!1,U=Xm(M,!0)):U=[]:Ns(M)||zn(M)?(U=E,zn(E)?U=z0(E):(!se(E)||Wr(E))&&(U=h0(M))):$=!1}$&&(C.set(M,U),v(U,M,d,b,C),C.delete(M)),mh(i,h,U)}function Nm(i,o){var h=i.length;if(h)return o+=o<0?h:0,Xr(o,h)?i[o]:r}function Lm(i,o,h){o.length?o=ee(o,function(b){return dt(b)?function(C){return Un(C,b.length===1?b[0]:b)}:b}):o=[De];var d=-1;o=ee(o,ze(ot()));var v=Mm(i,function(b,C,E){var M=ee(o,function(D){return D(b)});return{criteria:M,index:++d,value:b}});return RF(v,function(b,C){return gN(b,C,h)})}function nN(i,o){return km(i,o,function(h,d){return Jh(i,d)})}function km(i,o,h){for(var d=-1,v=o.length,b={};++d<v;){var C=o[d],E=Un(i,C);h(E,C)&&Ps(b,cn(C,i),E)}return b}function iN(i){return function(o){return Un(o,i)}}function Ah(i,o,h,d){var v=d?IF:Ii,b=-1,C=o.length,E=i;for(i===o&&(o=Le(o)),h&&(E=ee(i,ze(h)));++b<C;)for(var M=0,D=o[b],U=h?h(D):D;(M=v(E,U,M,d))>-1;)E!==i&&lo.call(E,M,1),lo.call(i,M,1);return i}function Bm(i,o){for(var h=i?o.length:0,d=h-1;h--;){var v=o[h];if(h==d||v!==b){var b=v;Xr(v)?lo.call(i,v,1):Rh(i,v)}}return i}function Ch(i,o){return i+fo(vm()*(o-i+1))}function sN(i,o,h,d){for(var v=-1,b=ge(co((o-i)/(h||1)),0),C=F(b);b--;)C[d?b:++v]=i,i+=h;return C}function Eh(i,o){var h="";if(!i||o<1||o>rt)return h;do o%2&&(h+=i),o=fo(o/2),o&&(i+=i);while(o);return h}function vt(i,o){return Vh(d0(i,o,De),i+"")}function aN(i){return xm($i(i))}function oN(i,o){var h=$i(i);return Po(h,Dn(o,0,h.length))}function Ps(i,o,h,d){if(!se(i))return i;o=cn(o,i);for(var v=-1,b=o.length,C=b-1,E=i;E!=null&&++v<b;){var M=Or(o[v]),D=h;if(M==="__proto__"||M==="constructor"||M==="prototype")return i;if(v!=C){var U=E[M];D=d?d(U,M,E):r,D===r&&(D=se(U)?U:Xr(o[v+1])?[]:{})}Cs(E,M,D),E=E[M]}return i}var Dm=po?function(i,o){return po.set(i,o),i}:De,uN=ho?function(i,o){return ho(i,"toString",{configurable:!0,enumerable:!1,value:tc(o),writable:!0})}:De;function lN(i){return Po($i(i))}function er(i,o,h){var d=-1,v=i.length;o<0&&(o=-o>v?0:v+o),h=h>v?v:h,h<0&&(h+=v),v=o>h?0:h-o>>>0,o>>>=0;for(var b=F(v);++d<v;)b[d]=i[d+o];return b}function hN(i,o){var h;return ln(i,function(d,v,b){return h=o(d,v,b),!h}),!!h}function bo(i,o,h){var d=0,v=i==null?d:i.length;if(typeof o=="number"&&o===o&&v<=yt){for(;d<v;){var b=d+v>>>1,C=i[b];C!==null&&!Ve(C)&&(h?C<=o:C<o)?d=b+1:v=b}return v}return Ih(i,o,De,h)}function Ih(i,o,h,d){var v=0,b=i==null?0:i.length;if(b===0)return 0;o=h(o);for(var C=o!==o,E=o===null,M=Ve(o),D=o===r;v<b;){var U=fo((v+b)/2),$=h(i[U]),Y=$!==r,et=$===null,ut=$===$,mt=Ve($);if(C)var lt=d||ut;else D?lt=ut&&(d||Y):E?lt=ut&&Y&&(d||!et):M?lt=ut&&Y&&!et&&(d||!mt):et||mt?lt=!1:lt=d?$<=o:$<o;lt?v=U+1:b=U}return Ee(b,ct)}function Um(i,o){for(var h=-1,d=i.length,v=0,b=[];++h<d;){var C=i[h],E=o?o(C):C;if(!h||!xr(E,M)){var M=E;b[v++]=C===0?0:C}}return b}function $m(i){return typeof i=="number"?i:Ve(i)?H:+i}function He(i){if(typeof i=="string")return i;if(dt(i))return ee(i,He)+"";if(Ve(i))return ym?ym.call(i):"";var o=i+"";return o=="0"&&1/i==-G?"-0":o}function hn(i,o,h){var d=-1,v=Qa,b=i.length,C=!0,E=[],M=E;if(h)C=!1,v=nh;else if(b>=s){var D=o?null:bN(i);if(D)return eo(D);C=!1,v=xs,M=new Bn}else M=o?[]:E;t:for(;++d<b;){var U=i[d],$=o?o(U):U;if(U=h||U!==0?U:0,C&&$===$){for(var Y=M.length;Y--;)if(M[Y]===$)continue t;o&&M.push($),E.push(U)}else v(M,$,h)||(M!==E&&M.push($),E.push(U))}return E}function Rh(i,o){return o=cn(o,i),i=p0(i,o),i==null||delete i[Or(rr(o))]}function Gm(i,o,h,d){return Ps(i,o,h(Un(i,o)),d)}function To(i,o,h,d){for(var v=i.length,b=d?v:-1;(d?b--:++b<v)&&o(i[b],b,i););return h?er(i,d?0:b,d?b+1:v):er(i,d?b+1:0,d?v:b)}function zm(i,o){var h=i;return h instanceof St&&(h=h.value()),ih(o,function(d,v){return v.func.apply(v.thisArg,an([d],v.args))},h)}function Ph(i,o,h){var d=i.length;if(d<2)return d?hn(i[0]):[];for(var v=-1,b=F(d);++v<d;)for(var C=i[v],E=-1;++E<d;)E!=v&&(b[v]=Es(b[v]||C,i[E],o,h));return hn(Te(b,1),o,h)}function Hm(i,o,h){for(var d=-1,v=i.length,b=o.length,C={};++d<v;){var E=d<b?o[d]:r;h(C,i[d],E)}return C}function Mh(i){return he(i)?i:[]}function Oh(i){return typeof i=="function"?i:De}function cn(i,o){return dt(i)?i:Gh(i,o)?[i]:y0(Ut(i))}var cN=vt;function fn(i,o,h){var d=i.length;return h=h===r?d:h,!o&&h>=d?i:er(i,o,h)}var Vm=JF||function(i){return be.clearTimeout(i)};function jm(i,o){if(o)return i.slice();var h=i.length,d=fm?fm(h):new i.constructor(h);return i.copy(d),d}function Fh(i){var o=new i.constructor(i.byteLength);return new oo(o).set(new oo(i)),o}function fN(i,o){var h=o?Fh(i.buffer):i.buffer;return new i.constructor(h,i.byteOffset,i.byteLength)}function dN(i){var o=new i.constructor(i.source,Ig.exec(i));return o.lastIndex=i.lastIndex,o}function pN(i){return As?Xt(As.call(i)):{}}function Xm(i,o){var h=o?Fh(i.buffer):i.buffer;return new i.constructor(h,i.byteOffset,i.length)}function Wm(i,o){if(i!==o){var h=i!==r,d=i===null,v=i===i,b=Ve(i),C=o!==r,E=o===null,M=o===o,D=Ve(o);if(!E&&!D&&!b&&i>o||b&&C&&M&&!E&&!D||d&&C&&M||!h&&M||!v)return 1;if(!d&&!b&&!D&&i<o||D&&h&&v&&!d&&!b||E&&h&&v||!C&&v||!M)return-1}return 0}function gN(i,o,h){for(var d=-1,v=i.criteria,b=o.criteria,C=v.length,E=h.length;++d<C;){var M=Wm(v[d],b[d]);if(M){if(d>=E)return M;var D=h[d];return M*(D=="desc"?-1:1)}}return i.index-o.index}function qm(i,o,h,d){for(var v=-1,b=i.length,C=h.length,E=-1,M=o.length,D=ge(b-C,0),U=F(M+D),$=!d;++E<M;)U[E]=o[E];for(;++v<C;)($||v<b)&&(U[h[v]]=i[v]);for(;D--;)U[E++]=i[v++];return U}function Ym(i,o,h,d){for(var v=-1,b=i.length,C=-1,E=h.length,M=-1,D=o.length,U=ge(b-E,0),$=F(U+D),Y=!d;++v<U;)$[v]=i[v];for(var et=v;++M<D;)$[et+M]=o[M];for(;++C<E;)(Y||v<b)&&($[et+h[C]]=i[v++]);return $}function Le(i,o){var h=-1,d=i.length;for(o||(o=F(d));++h<d;)o[h]=i[h];return o}function Mr(i,o,h,d){var v=!h;h||(h={});for(var b=-1,C=o.length;++b<C;){var E=o[b],M=d?d(h[E],i[E],E,h,i):r;M===r&&(M=i[E]),v?Hr(h,E,M):Cs(h,E,M)}return h}function mN(i,o){return Mr(i,$h(i),o)}function vN(i,o){return Mr(i,u0(i),o)}function wo(i,o){return function(h,d){var v=dt(h)?TF:U3,b=o?o():{};return v(h,i,ot(d,2),b)}}function ki(i){return vt(function(o,h){var d=-1,v=h.length,b=v>1?h[v-1]:r,C=v>2?h[2]:r;for(b=i.length>3&&typeof b=="function"?(v--,b):r,C&&Fe(h[0],h[1],C)&&(b=v<3?r:b,v=1),o=Xt(o);++d<v;){var E=h[d];E&&i(o,E,d,b)}return o})}function Km(i,o){return function(h,d){if(h==null)return h;if(!ke(h))return i(h,d);for(var v=h.length,b=o?v:-1,C=Xt(h);(o?b--:++b<v)&&d(C[b],b,C)!==!1;);return h}}function Zm(i){return function(o,h,d){for(var v=-1,b=Xt(o),C=d(o),E=C.length;E--;){var M=C[i?E:++v];if(h(b[M],M,b)===!1)break}return o}}function yN(i,o,h){var d=o&T,v=Ms(i);function b(){var C=this&&this!==be&&this instanceof b?v:i;return C.apply(d?h:this,arguments)}return b}function Jm(i){return function(o){o=Ut(o);var h=Ri(o)?yr(o):r,d=h?h[0]:o.charAt(0),v=h?fn(h,1).join(""):o.slice(1);return d[i]()+v}}function Bi(i){return function(o){return ih(K0(Y0(o).replace(uF,"")),i,"")}}function Ms(i){return function(){var o=arguments;switch(o.length){case 0:return new i;case 1:return new i(o[0]);case 2:return new i(o[0],o[1]);case 3:return new i(o[0],o[1],o[2]);case 4:return new i(o[0],o[1],o[2],o[3]);case 5:return new i(o[0],o[1],o[2],o[3],o[4]);case 6:return new i(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new i(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var h=Li(i.prototype),d=i.apply(h,o);return se(d)?d:h}}function _N(i,o,h){var d=Ms(i);function v(){for(var b=arguments.length,C=F(b),E=b,M=Di(v);E--;)C[E]=arguments[E];var D=b<3&&C[0]!==M&&C[b-1]!==M?[]:on(C,M);if(b-=D.length,b<h)return n0(i,o,So,v.placeholder,r,C,D,r,r,h-b);var U=this&&this!==be&&this instanceof v?d:i;return Ge(U,this,C)}return v}function Qm(i){return function(o,h,d){var v=Xt(o);if(!ke(o)){var b=ot(h,3);o=_e(o),h=function(E){return b(v[E],E,v)}}var C=i(o,h,d);return C>-1?v[b?o[C]:C]:r}}function t0(i){return jr(function(o){var h=o.length,d=h,v=Qe.prototype.thru;for(i&&o.reverse();d--;){var b=o[d];if(typeof b!="function")throw new Je(u);if(v&&!C&&Io(b)=="wrapper")var C=new Qe([],!0)}for(d=C?d:h;++d<h;){b=o[d];var E=Io(b),M=E=="wrapper"?Dh(b):r;M&&zh(M[0])&&M[1]==(L|A|N|O)&&!M[4].length&&M[9]==1?C=C[Io(M[0])].apply(C,M[3]):C=b.length==1&&zh(b)?C[E]():C.thru(b)}return function(){var D=arguments,U=D[0];if(C&&D.length==1&&dt(U))return C.plant(U).value();for(var $=0,Y=h?o[$].apply(this,D):U;++$<h;)Y=o[$].call(this,Y);return Y}})}function So(i,o,h,d,v,b,C,E,M,D){var U=o&L,$=o&T,Y=o&w,et=o&(A|R),ut=o&z,mt=Y?r:Ms(i);function lt(){for(var Tt=arguments.length,It=F(Tt),je=Tt;je--;)It[je]=arguments[je];if(et)var Ne=Di(lt),Xe=MF(It,Ne);if(d&&(It=qm(It,d,v,et)),b&&(It=Ym(It,b,C,et)),Tt-=Xe,et&&Tt<D){var ce=on(It,Ne);return n0(i,o,So,lt.placeholder,h,It,ce,E,M,D-Tt)}var br=$?h:this,Yr=Y?br[i]:i;return Tt=It.length,E?It=UN(It,E):ut&&Tt>1&&It.reverse(),U&&M<Tt&&(It.length=M),this&&this!==be&&this instanceof lt&&(Yr=mt||Ms(Yr)),Yr.apply(br,It)}return lt}function e0(i,o){return function(h,d){return W3(h,i,o(d),{})}}function Ao(i,o){return function(h,d){var v;if(h===r&&d===r)return o;if(h!==r&&(v=h),d!==r){if(v===r)return d;typeof h=="string"||typeof d=="string"?(h=He(h),d=He(d)):(h=$m(h),d=$m(d)),v=i(h,d)}return v}}function Nh(i){return jr(function(o){return o=ee(o,ze(ot())),vt(function(h){var d=this;return i(o,function(v){return Ge(v,d,h)})})})}function Co(i,o){o=o===r?" ":He(o);var h=o.length;if(h<2)return h?Eh(o,i):o;var d=Eh(o,co(i/Pi(o)));return Ri(o)?fn(yr(d),0,i).join(""):d.slice(0,i)}function xN(i,o,h,d){var v=o&T,b=Ms(i);function C(){for(var E=-1,M=arguments.length,D=-1,U=d.length,$=F(U+M),Y=this&&this!==be&&this instanceof C?b:i;++D<U;)$[D]=d[D];for(;M--;)$[D++]=arguments[++E];return Ge(Y,v?h:this,$)}return C}function r0(i){return function(o,h,d){return d&&typeof d!="number"&&Fe(o,h,d)&&(h=d=r),o=qr(o),h===r?(h=o,o=0):h=qr(h),d=d===r?o<h?1:-1:qr(d),sN(o,h,d,i)}}function Eo(i){return function(o,h){return typeof o=="string"&&typeof h=="string"||(o=nr(o),h=nr(h)),i(o,h)}}function n0(i,o,h,d,v,b,C,E,M,D){var U=o&A,$=U?C:r,Y=U?r:C,et=U?b:r,ut=U?r:b;o|=U?N:B,o&=~(U?B:N),o&I||(o&=~(T|w));var mt=[i,o,v,et,$,ut,Y,E,M,D],lt=h.apply(r,mt);return zh(i)&&g0(lt,mt),lt.placeholder=d,m0(lt,i,o)}function Lh(i){var o=pe[i];return function(h,d){if(h=nr(h),d=d==null?0:Ee(pt(d),292),d&&mm(h)){var v=(Ut(h)+"e").split("e"),b=o(v[0]+"e"+(+v[1]+d));return v=(Ut(b)+"e").split("e"),+(v[0]+"e"+(+v[1]-d))}return o(h)}}var bN=Fi&&1/eo(new Fi([,-0]))[1]==G?function(i){return new Fi(i)}:nc;function i0(i){return function(o){var h=Ie(o);return h==Et?ch(o):h==vr?DF(o):PF(o,i(o))}}function Vr(i,o,h,d,v,b,C,E){var M=o&w;if(!M&&typeof i!="function")throw new Je(u);var D=d?d.length:0;if(D||(o&=~(N|B),d=v=r),C=C===r?C:ge(pt(C),0),E=E===r?E:pt(E),D-=v?v.length:0,o&B){var U=d,$=v;d=v=r}var Y=M?r:Dh(i),et=[i,o,h,d,v,U,$,b,C,E];if(Y&&kN(et,Y),i=et[0],o=et[1],h=et[2],d=et[3],v=et[4],E=et[9]=et[9]===r?M?0:i.length:ge(et[9]-D,0),!E&&o&(A|R)&&(o&=~(A|R)),!o||o==T)var ut=yN(i,o,h);else o==A||o==R?ut=_N(i,o,E):(o==N||o==(T|N))&&!v.length?ut=xN(i,o,h,d):ut=So.apply(r,et);var mt=Y?Dm:g0;return m0(mt(ut,et),i,o)}function s0(i,o,h,d){return i===r||xr(i,Oi[h])&&!Gt.call(d,h)?o:i}function a0(i,o,h,d,v,b){return se(i)&&se(o)&&(b.set(o,i),xo(i,o,r,a0,b),b.delete(o)),i}function TN(i){return Ns(i)?r:i}function o0(i,o,h,d,v,b){var C=h&y,E=i.length,M=o.length;if(E!=M&&!(C&&M>E))return!1;var D=b.get(i),U=b.get(o);if(D&&U)return D==o&&U==i;var $=-1,Y=!0,et=h&S?new Bn:r;for(b.set(i,o),b.set(o,i);++$<E;){var ut=i[$],mt=o[$];if(d)var lt=C?d(mt,ut,$,o,i,b):d(ut,mt,$,i,o,b);if(lt!==r){if(lt)continue;Y=!1;break}if(et){if(!sh(o,function(Tt,It){if(!xs(et,It)&&(ut===Tt||v(ut,Tt,h,d,b)))return et.push(It)})){Y=!1;break}}else if(!(ut===mt||v(ut,mt,h,d,b))){Y=!1;break}}return b.delete(i),b.delete(o),Y}function wN(i,o,h,d,v,b,C){switch(h){case Ci:if(i.byteLength!=o.byteLength||i.byteOffset!=o.byteOffset)return!1;i=i.buffer,o=o.buffer;case _s:return!(i.byteLength!=o.byteLength||!b(new oo(i),new oo(o)));case Vt:case Kt:case Zt:return xr(+i,+o);case W:return i.name==o.name&&i.message==o.message;case Ai:case vs:return i==o+"";case Et:var E=ch;case vr:var M=d&y;if(E||(E=eo),i.size!=o.size&&!M)return!1;var D=C.get(i);if(D)return D==o;d|=S,C.set(i,o);var U=o0(E(i),E(o),d,v,b,C);return C.delete(i),U;case Ya:if(As)return As.call(i)==As.call(o)}return!1}function SN(i,o,h,d,v,b){var C=h&y,E=kh(i),M=E.length,D=kh(o),U=D.length;if(M!=U&&!C)return!1;for(var $=M;$--;){var Y=E[$];if(!(C?Y in o:Gt.call(o,Y)))return!1}var et=b.get(i),ut=b.get(o);if(et&&ut)return et==o&&ut==i;var mt=!0;b.set(i,o),b.set(o,i);for(var lt=C;++$<M;){Y=E[$];var Tt=i[Y],It=o[Y];if(d)var je=C?d(It,Tt,Y,o,i,b):d(Tt,It,Y,i,o,b);if(!(je===r?Tt===It||v(Tt,It,h,d,b):je)){mt=!1;break}lt||(lt=Y=="constructor")}if(mt&&!lt){var Ne=i.constructor,Xe=o.constructor;Ne!=Xe&&"constructor"in i&&"constructor"in o&&!(typeof Ne=="function"&&Ne instanceof Ne&&typeof Xe=="function"&&Xe instanceof Xe)&&(mt=!1)}return b.delete(i),b.delete(o),mt}function jr(i){return Vh(d0(i,r,T0),i+"")}function kh(i){return Em(i,_e,$h)}function Bh(i){return Em(i,Be,u0)}var Dh=po?function(i){return po.get(i)}:nc;function Io(i){for(var o=i.name+"",h=Ni[o],d=Gt.call(Ni,o)?h.length:0;d--;){var v=h[d],b=v.func;if(b==null||b==i)return v.name}return o}function Di(i){var o=Gt.call(_,"placeholder")?_:i;return o.placeholder}function ot(){var i=_.iteratee||ec;return i=i===ec?Pm:i,arguments.length?i(arguments[0],arguments[1]):i}function Ro(i,o){var h=i.__data__;return ON(o)?h[typeof o=="string"?"string":"hash"]:h.map}function Uh(i){for(var o=_e(i),h=o.length;h--;){var d=o[h],v=i[d];o[h]=[d,v,c0(v)]}return o}function $n(i,o){var h=LF(i,o);return Rm(h)?h:r}function AN(i){var o=Gt.call(i,Ln),h=i[Ln];try{i[Ln]=r;var d=!0}catch{}var v=so.call(i);return d&&(o?i[Ln]=h:delete i[Ln]),v}var $h=dh?function(i){return i==null?[]:(i=Xt(i),sn(dh(i),function(o){return pm.call(i,o)}))}:ic,u0=dh?function(i){for(var o=[];i;)an(o,$h(i)),i=uo(i);return o}:ic,Ie=Oe;(ph&&Ie(new ph(new ArrayBuffer(1)))!=Ci||Ts&&Ie(new Ts)!=Et||gh&&Ie(gh.resolve())!=$r||Fi&&Ie(new Fi)!=vr||ws&&Ie(new ws)!=ys)&&(Ie=function(i){var o=Oe(i),h=o==Me?i.constructor:r,d=h?Gn(h):"";if(d)switch(d){case o3:return Ci;case u3:return Et;case l3:return $r;case h3:return vr;case c3:return ys}return o});function CN(i,o,h){for(var d=-1,v=h.length;++d<v;){var b=h[d],C=b.size;switch(b.type){case"drop":i+=C;break;case"dropRight":o-=C;break;case"take":o=Ee(o,i+C);break;case"takeRight":i=ge(i,o-C);break}}return{start:i,end:o}}function EN(i){var o=i.match(FO);return o?o[1].split(NO):[]}function l0(i,o,h){o=cn(o,i);for(var d=-1,v=o.length,b=!1;++d<v;){var C=Or(o[d]);if(!(b=i!=null&&h(i,C)))break;i=i[C]}return b||++d!=v?b:(v=i==null?0:i.length,!!v&&ko(v)&&Xr(C,v)&&(dt(i)||zn(i)))}function IN(i){var o=i.length,h=new i.constructor(o);return o&&typeof i[0]=="string"&&Gt.call(i,"index")&&(h.index=i.index,h.input=i.input),h}function h0(i){return typeof i.constructor=="function"&&!Os(i)?Li(uo(i)):{}}function RN(i,o,h){var d=i.constructor;switch(o){case _s:return Fh(i);case Vt:case Kt:return new d(+i);case Ci:return fN(i,h);case Ul:case $l:case Gl:case zl:case Hl:case Vl:case jl:case Xl:case Wl:return Xm(i,h);case Et:return new d;case Zt:case vs:return new d(i);case Ai:return dN(i);case vr:return new d;case Ya:return pN(i)}}function PN(i,o){var h=o.length;if(!h)return i;var d=h-1;return o[d]=(h>1?"& ":"")+o[d],o=o.join(h>2?", ":" "),i.replace(OO,`{
1942
1942
  /* [wrapped with `+o+`] */
1943
- `)}function MN(i){return dt(i)||zn(i)||!!(gm&&i&&i[gm])}function Xr(i,o){var h=typeof i;return o=o??rt,!!o&&(h=="number"||h!="symbol"&&HO.test(i))&&i>-1&&i%1==0&&i<o}function Fe(i,o,h){if(!se(h))return!1;var d=typeof o;return(d=="number"?ke(h)&&Xr(o,h.length):d=="string"&&o in h)?xr(h[o],i):!1}function Gh(i,o){if(dt(i))return!1;var h=typeof i;return h=="number"||h=="symbol"||h=="boolean"||i==null||Ve(i)?!0:IO.test(i)||!EO.test(i)||o!=null&&i in Xt(o)}function ON(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}function zh(i){var o=Io(i),h=_[o];if(typeof h!="function"||!(o in At.prototype))return!1;if(i===h)return!0;var d=Dh(h);return!!d&&i===d[0]}function FN(i){return!!cm&&cm in i}var NN=no?Wr:sc;function Os(i){var o=i&&i.constructor,h=typeof o=="function"&&o.prototype||Oi;return i===h}function c0(i){return i===i&&!se(i)}function f0(i,o){return function(h){return h==null?!1:h[i]===o&&(o!==r||i in Xt(h))}}function LN(i){var o=No(i,function(d){return h.size===f&&h.clear(),d}),h=o.cache;return o}function kN(i,o){var h=i[1],d=o[1],v=h|d,b=v<(T|w|L),C=d==L&&h==A||d==L&&h==O&&i[7].length<=o[8]||d==(L|O)&&o[7].length<=o[8]&&h==A;if(!(b||C))return i;d&T&&(i[2]=o[2],v|=h&T?0:I);var E=o[3];if(E){var M=i[3];i[3]=M?qm(M,E,o[4]):E,i[4]=M?on(i[3],p):o[4]}return E=o[5],E&&(M=i[5],i[5]=M?Ym(M,E,o[6]):E,i[6]=M?on(i[5],p):o[6]),E=o[7],E&&(i[7]=E),d&L&&(i[8]=i[8]==null?o[8]:Ee(i[8],o[8])),i[9]==null&&(i[9]=o[9]),i[0]=o[0],i[1]=v,i}function BN(i){var o=[];if(i!=null)for(var h in Xt(i))o.push(h);return o}function DN(i){return so.call(i)}function d0(i,o,h){return o=ge(o===r?i.length-1:o,0),function(){for(var d=arguments,v=-1,b=ge(d.length-o,0),C=F(b);++v<b;)C[v]=d[o+v];v=-1;for(var E=F(o+1);++v<o;)E[v]=d[v];return E[o]=h(C),Ge(i,this,E)}}function p0(i,o){return o.length<2?i:Un(i,er(o,0,-1))}function UN(i,o){for(var h=i.length,d=Ee(o.length,h),v=Le(i);d--;){var b=o[d];i[d]=Xr(b,h)?v[b]:r}return i}function Hh(i,o){if(!(o==="constructor"&&typeof i[o]=="function")&&o!="__proto__")return i[o]}var g0=v0(Dm),Fs=t3||function(i,o){return be.setTimeout(i,o)},Vh=v0(uN);function m0(i,o,h){var d=o+"";return Vh(i,PN(d,$N(EN(d),h)))}function v0(i){var o=0,h=0;return function(){var d=i3(),v=V-(d-h);if(h=d,v>0){if(++o>=it)return arguments[0]}else o=0;return i.apply(r,arguments)}}function Po(i,o){var h=-1,d=i.length,v=d-1;for(o=o===r?d:o;++h<o;){var b=Ch(h,v),C=i[b];i[b]=i[h],i[h]=C}return i.length=o,i}var y0=LN(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(RO,function(h,d,v,b){o.push(v?b.replace(BO,"$1"):d||h)}),o});function Or(i){if(typeof i=="string"||Ve(i))return i;var o=i+"";return o=="0"&&1/i==-G?"-0":o}function Gn(i){if(i!=null){try{return io.call(i)}catch{}try{return i+""}catch{}}return""}function $N(i,o){return Ze(wt,function(h){var d="_."+h[0];o&h[1]&&!Qa(i,d)&&i.push(d)}),i.sort()}function _0(i){if(i instanceof At)return i.clone();var o=new Qe(i.__wrapped__,i.__chain__);return o.__actions__=Le(i.__actions__),o.__index__=i.__index__,o.__values__=i.__values__,o}function GN(i,o,h){(h?Fe(i,o,h):o===r)?o=1:o=ge(pt(o),0);var d=i==null?0:i.length;if(!d||o<1)return[];for(var v=0,b=0,C=F(co(d/o));v<d;)C[b++]=er(i,v,v+=o);return C}function zN(i){for(var o=-1,h=i==null?0:i.length,d=0,v=[];++o<h;){var b=i[o];b&&(v[d++]=b)}return v}function HN(){var i=arguments.length;if(!i)return[];for(var o=F(i-1),h=arguments[0],d=i;d--;)o[d-1]=arguments[d];return an(dt(h)?Le(h):[h],Te(o,1))}var VN=vt(function(i,o){return he(i)?Es(i,Te(o,1,he,!0)):[]}),jN=vt(function(i,o){var h=rr(o);return he(h)&&(h=r),he(i)?Es(i,Te(o,1,he,!0),ot(h,2)):[]}),XN=vt(function(i,o){var h=rr(o);return he(h)&&(h=r),he(i)?Es(i,Te(o,1,he,!0),r,h):[]});function WN(i,o,h){var d=i==null?0:i.length;return d?(o=h||o===r?1:pt(o),er(i,o<0?0:o,d)):[]}function qN(i,o,h){var d=i==null?0:i.length;return d?(o=h||o===r?1:pt(o),o=d-o,er(i,0,o<0?0:o)):[]}function YN(i,o){return i&&i.length?To(i,ot(o,3),!0,!0):[]}function KN(i,o){return i&&i.length?To(i,ot(o,3),!0):[]}function ZN(i,o,h,d){var v=i==null?0:i.length;return v?(h&&typeof h!="number"&&Fe(i,o,h)&&(h=0,d=v),H3(i,o,h,d)):[]}function x0(i,o,h){var d=i==null?0:i.length;if(!d)return-1;var v=h==null?0:pt(h);return v<0&&(v=ge(d+v,0)),to(i,ot(o,3),v)}function b0(i,o,h){var d=i==null?0:i.length;if(!d)return-1;var v=d-1;return h!==r&&(v=pt(h),v=h<0?ge(d+v,0):Ee(v,d-1)),to(i,ot(o,3),v,!0)}function T0(i){var o=i==null?0:i.length;return o?Te(i,1):[]}function JN(i){var o=i==null?0:i.length;return o?Te(i,G):[]}function QN(i,o){var h=i==null?0:i.length;return h?(o=o===r?1:pt(o),Te(i,o)):[]}function tL(i){for(var o=-1,h=i==null?0:i.length,d={};++o<h;){var v=i[o];d[v[0]]=v[1]}return d}function w0(i){return i&&i.length?i[0]:r}function eL(i,o,h){var d=i==null?0:i.length;if(!d)return-1;var v=h==null?0:pt(h);return v<0&&(v=ge(d+v,0)),Ii(i,o,v)}function rL(i){var o=i==null?0:i.length;return o?er(i,0,-1):[]}var nL=vt(function(i){var o=ee(i,Mh);return o.length&&o[0]===i[0]?bh(o):[]}),iL=vt(function(i){var o=rr(i),h=ee(i,Mh);return o===rr(h)?o=r:h.pop(),h.length&&h[0]===i[0]?bh(h,ot(o,2)):[]}),sL=vt(function(i){var o=rr(i),h=ee(i,Mh);return o=typeof o=="function"?o:r,o&&h.pop(),h.length&&h[0]===i[0]?bh(h,r,o):[]});function aL(i,o){return i==null?"":r3.call(i,o)}function rr(i){var o=i==null?0:i.length;return o?i[o-1]:r}function oL(i,o,h){var d=i==null?0:i.length;if(!d)return-1;var v=d;return h!==r&&(v=pt(h),v=v<0?ge(d+v,0):Ee(v,d-1)),o===o?$F(i,o,v):to(i,nm,v,!0)}function uL(i,o){return i&&i.length?Nm(i,pt(o)):r}var lL=vt(S0);function S0(i,o){return i&&i.length&&o&&o.length?Ah(i,o):i}function hL(i,o,h){return i&&i.length&&o&&o.length?Ah(i,o,ot(h,2)):i}function cL(i,o,h){return i&&i.length&&o&&o.length?Ah(i,o,r,h):i}var fL=jr(function(i,o){var h=i==null?0:i.length,d=vh(i,o);return Bm(i,ee(o,function(v){return Xr(v,h)?+v:v}).sort(Wm)),d});function dL(i,o){var h=[];if(!(i&&i.length))return h;var d=-1,v=[],b=i.length;for(o=ot(o,3);++d<b;){var C=i[d];o(C,d,i)&&(h.push(C),v.push(d))}return Bm(i,v),h}function jh(i){return i==null?i:a3.call(i)}function pL(i,o,h){var d=i==null?0:i.length;return d?(h&&typeof h!="number"&&Fe(i,o,h)?(o=0,h=d):(o=o==null?0:pt(o),h=h===r?d:pt(h)),er(i,o,h)):[]}function gL(i,o){return bo(i,o)}function mL(i,o,h){return Ih(i,o,ot(h,2))}function vL(i,o){var h=i==null?0:i.length;if(h){var d=bo(i,o);if(d<h&&xr(i[d],o))return d}return-1}function yL(i,o){return bo(i,o,!0)}function _L(i,o,h){return Ih(i,o,ot(h,2),!0)}function xL(i,o){var h=i==null?0:i.length;if(h){var d=bo(i,o,!0)-1;if(xr(i[d],o))return d}return-1}function bL(i){return i&&i.length?Um(i):[]}function TL(i,o){return i&&i.length?Um(i,ot(o,2)):[]}function wL(i){var o=i==null?0:i.length;return o?er(i,1,o):[]}function SL(i,o,h){return i&&i.length?(o=h||o===r?1:pt(o),er(i,0,o<0?0:o)):[]}function AL(i,o,h){var d=i==null?0:i.length;return d?(o=h||o===r?1:pt(o),o=d-o,er(i,o<0?0:o,d)):[]}function CL(i,o){return i&&i.length?To(i,ot(o,3),!1,!0):[]}function EL(i,o){return i&&i.length?To(i,ot(o,3)):[]}var IL=vt(function(i){return hn(Te(i,1,he,!0))}),RL=vt(function(i){var o=rr(i);return he(o)&&(o=r),hn(Te(i,1,he,!0),ot(o,2))}),PL=vt(function(i){var o=rr(i);return o=typeof o=="function"?o:r,hn(Te(i,1,he,!0),r,o)});function ML(i){return i&&i.length?hn(i):[]}function OL(i,o){return i&&i.length?hn(i,ot(o,2)):[]}function FL(i,o){return o=typeof o=="function"?o:r,i&&i.length?hn(i,r,o):[]}function Xh(i){if(!(i&&i.length))return[];var o=0;return i=sn(i,function(h){if(he(h))return o=ge(h.length,o),!0}),lh(o,function(h){return ee(i,ah(h))})}function A0(i,o){if(!(i&&i.length))return[];var h=Xh(i);return o==null?h:ee(h,function(d){return Ge(o,r,d)})}var NL=vt(function(i,o){return he(i)?Es(i,o):[]}),LL=vt(function(i){return Ph(sn(i,he))}),kL=vt(function(i){var o=rr(i);return he(o)&&(o=r),Ph(sn(i,he),ot(o,2))}),BL=vt(function(i){var o=rr(i);return o=typeof o=="function"?o:r,Ph(sn(i,he),r,o)}),DL=vt(Xh);function UL(i,o){return Hm(i||[],o||[],Cs)}function $L(i,o){return Hm(i||[],o||[],Ps)}var GL=vt(function(i){var o=i.length,h=o>1?i[o-1]:r;return h=typeof h=="function"?(i.pop(),h):r,A0(i,h)});function C0(i){var o=_(i);return o.__chain__=!0,o}function zL(i,o){return o(i),i}function Mo(i,o){return o(i)}var HL=jr(function(i){var o=i.length,h=o?i[0]:0,d=this.__wrapped__,v=function(b){return vh(b,i)};return o>1||this.__actions__.length||!(d instanceof At)||!Xr(h)?this.thru(v):(d=d.slice(h,+h+(o?1:0)),d.__actions__.push({func:Mo,args:[v],thisArg:r}),new Qe(d,this.__chain__).thru(function(b){return o&&!b.length&&b.push(r),b}))});function VL(){return C0(this)}function jL(){return new Qe(this.value(),this.__chain__)}function XL(){this.__values__===r&&(this.__values__=$0(this.value()));var i=this.__index__>=this.__values__.length,o=i?r:this.__values__[this.__index__++];return{done:i,value:o}}function WL(){return this}function qL(i){for(var o,h=this;h instanceof mo;){var d=_0(h);d.__index__=0,d.__values__=r,o?v.__wrapped__=d:o=d;var v=d;h=h.__wrapped__}return v.__wrapped__=i,o}function YL(){var i=this.__wrapped__;if(i instanceof At){var o=i;return this.__actions__.length&&(o=new At(this)),o=o.reverse(),o.__actions__.push({func:Mo,args:[jh],thisArg:r}),new Qe(o,this.__chain__)}return this.thru(jh)}function KL(){return zm(this.__wrapped__,this.__actions__)}var ZL=wo(function(i,o,h){zt.call(i,h)?++i[h]:Hr(i,h,1)});function JL(i,o,h){var d=dt(i)?em:z3;return h&&Fe(i,o,h)&&(o=r),d(i,ot(o,3))}function QL(i,o){var h=dt(i)?sn:Am;return h(i,ot(o,3))}var tk=Qm(x0),ek=Qm(b0);function rk(i,o){return Te(Oo(i,o),1)}function nk(i,o){return Te(Oo(i,o),G)}function ik(i,o,h){return h=h===r?1:pt(h),Te(Oo(i,o),h)}function E0(i,o){var h=dt(i)?Ze:ln;return h(i,ot(o,3))}function I0(i,o){var h=dt(i)?wF:Sm;return h(i,ot(o,3))}var sk=wo(function(i,o,h){zt.call(i,h)?i[h].push(o):Hr(i,h,[o])});function ak(i,o,h,d){i=ke(i)?i:$i(i),h=h&&!d?pt(h):0;var v=i.length;return h<0&&(h=ge(v+h,0)),Bo(i)?h<=v&&i.indexOf(o,h)>-1:!!v&&Ii(i,o,h)>-1}var ok=vt(function(i,o,h){var d=-1,v=typeof o=="function",b=ke(i)?F(i.length):[];return ln(i,function(C){b[++d]=v?Ge(o,C,h):Is(C,o,h)}),b}),uk=wo(function(i,o,h){Hr(i,h,o)});function Oo(i,o){var h=dt(i)?ee:Mm;return h(i,ot(o,3))}function lk(i,o,h,d){return i==null?[]:(dt(o)||(o=o==null?[]:[o]),h=d?r:h,dt(h)||(h=h==null?[]:[h]),Lm(i,o,h))}var hk=wo(function(i,o,h){i[h?0:1].push(o)},function(){return[[],[]]});function ck(i,o,h){var d=dt(i)?ih:sm,v=arguments.length<3;return d(i,ot(o,4),h,v,ln)}function fk(i,o,h){var d=dt(i)?SF:sm,v=arguments.length<3;return d(i,ot(o,4),h,v,Sm)}function dk(i,o){var h=dt(i)?sn:Am;return h(i,Lo(ot(o,3)))}function pk(i){var o=dt(i)?xm:aN;return o(i)}function gk(i,o,h){(h?Fe(i,o,h):o===r)?o=1:o=pt(o);var d=dt(i)?B3:oN;return d(i,o)}function mk(i){var o=dt(i)?D3:lN;return o(i)}function vk(i){if(i==null)return 0;if(ke(i))return Bo(i)?Pi(i):i.length;var o=Ie(i);return o==Et||o==vr?i.size:wh(i).length}function yk(i,o,h){var d=dt(i)?sh:hN;return h&&Fe(i,o,h)&&(o=r),d(i,ot(o,3))}var _k=vt(function(i,o){if(i==null)return[];var h=o.length;return h>1&&Fe(i,o[0],o[1])?o=[]:h>2&&Fe(o[0],o[1],o[2])&&(o=[o[0]]),Lm(i,Te(o,1),[])}),Fo=QF||function(){return be.Date.now()};function xk(i,o){if(typeof o!="function")throw new Je(u);return i=pt(i),function(){if(--i<1)return o.apply(this,arguments)}}function R0(i,o,h){return o=h?r:o,o=i&&o==null?i.length:o,Vr(i,L,r,r,r,r,o)}function P0(i,o){var h;if(typeof o!="function")throw new Je(u);return i=pt(i),function(){return--i>0&&(h=o.apply(this,arguments)),i<=1&&(o=r),h}}var Wh=vt(function(i,o,h){var d=T;if(h.length){var v=on(h,Di(Wh));d|=N}return Vr(i,d,o,h,v)}),M0=vt(function(i,o,h){var d=T|w;if(h.length){var v=on(h,Di(M0));d|=N}return Vr(o,d,i,h,v)});function O0(i,o,h){o=h?r:o;var d=Vr(i,A,r,r,r,r,r,o);return d.placeholder=O0.placeholder,d}function F0(i,o,h){o=h?r:o;var d=Vr(i,R,r,r,r,r,r,o);return d.placeholder=F0.placeholder,d}function N0(i,o,h){var d,v,b,C,E,M,D=0,U=!1,$=!1,Y=!0;if(typeof i!="function")throw new Je(u);o=nr(o)||0,se(h)&&(U=!!h.leading,$="maxWait"in h,b=$?ge(nr(h.maxWait)||0,o):b,Y="trailing"in h?!!h.trailing:Y);function et(ce){var br=d,Yr=v;return d=v=r,D=ce,C=i.apply(Yr,br),C}function ut(ce){return D=ce,E=Fs(bt,o),U?et(ce):C}function mt(ce){var br=ce-M,Yr=ce-D,Q0=o-br;return $?Ee(Q0,b-Yr):Q0}function lt(ce){var br=ce-M,Yr=ce-D;return M===r||br>=o||br<0||$&&Yr>=b}function bt(){var ce=Fo();if(lt(ce))return It(ce);E=Fs(bt,mt(ce))}function It(ce){return E=r,Y&&d?et(ce):(d=v=r,C)}function je(){E!==r&&Vm(E),D=0,d=M=v=E=r}function Ne(){return E===r?C:It(Fo())}function Xe(){var ce=Fo(),br=lt(ce);if(d=arguments,v=this,M=ce,br){if(E===r)return ut(M);if($)return Vm(E),E=Fs(bt,o),et(M)}return E===r&&(E=Fs(bt,o)),C}return Xe.cancel=je,Xe.flush=Ne,Xe}var bk=vt(function(i,o){return wm(i,1,o)}),Tk=vt(function(i,o,h){return wm(i,nr(o)||0,h)});function wk(i){return Vr(i,z)}function No(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new Je(u);var h=function(){var d=arguments,v=o?o.apply(this,d):d[0],b=h.cache;if(b.has(v))return b.get(v);var C=i.apply(this,d);return h.cache=b.set(v,C)||b,C};return h.cache=new(No.Cache||zr),h}No.Cache=zr;function Lo(i){if(typeof i!="function")throw new Je(u);return function(){var o=arguments;switch(o.length){case 0:return!i.call(this);case 1:return!i.call(this,o[0]);case 2:return!i.call(this,o[0],o[1]);case 3:return!i.call(this,o[0],o[1],o[2])}return!i.apply(this,o)}}function Sk(i){return P0(2,i)}var Ak=cN(function(i,o){o=o.length==1&&dt(o[0])?ee(o[0],ze(ot())):ee(Te(o,1),ze(ot()));var h=o.length;return vt(function(d){for(var v=-1,b=Ee(d.length,h);++v<b;)d[v]=o[v].call(this,d[v]);return Ge(i,this,d)})}),qh=vt(function(i,o){var h=on(o,Di(qh));return Vr(i,N,r,o,h)}),L0=vt(function(i,o){var h=on(o,Di(L0));return Vr(i,B,r,o,h)}),Ck=jr(function(i,o){return Vr(i,O,r,r,r,o)});function Ek(i,o){if(typeof i!="function")throw new Je(u);return o=o===r?o:pt(o),vt(i,o)}function Ik(i,o){if(typeof i!="function")throw new Je(u);return o=o==null?0:ge(pt(o),0),vt(function(h){var d=h[o],v=fn(h,0,o);return d&&an(v,d),Ge(i,this,v)})}function Rk(i,o,h){var d=!0,v=!0;if(typeof i!="function")throw new Je(u);return se(h)&&(d="leading"in h?!!h.leading:d,v="trailing"in h?!!h.trailing:v),N0(i,o,{leading:d,maxWait:o,trailing:v})}function Pk(i){return R0(i,1)}function Mk(i,o){return qh(Oh(o),i)}function Ok(){if(!arguments.length)return[];var i=arguments[0];return dt(i)?i:[i]}function Fk(i){return tr(i,x)}function Nk(i,o){return o=typeof o=="function"?o:r,tr(i,x,o)}function Lk(i){return tr(i,m|x)}function kk(i,o){return o=typeof o=="function"?o:r,tr(i,m|x,o)}function Bk(i,o){return o==null||Tm(i,o,_e(o))}function xr(i,o){return i===o||i!==i&&o!==o}var Dk=Eo(xh),Uk=Eo(function(i,o){return i>=o}),zn=Im(function(){return arguments}())?Im:function(i){return ae(i)&&zt.call(i,"callee")&&!pm.call(i,"callee")},dt=F.isArray,$k=Yg?ze(Yg):q3;function ke(i){return i!=null&&ko(i.length)&&!Wr(i)}function he(i){return ae(i)&&ke(i)}function Gk(i){return i===!0||i===!1||ae(i)&&Oe(i)==Ut}var dn=e3||sc,zk=Kg?ze(Kg):Y3;function Hk(i){return ae(i)&&i.nodeType===1&&!Ns(i)}function Vk(i){if(i==null)return!0;if(ke(i)&&(dt(i)||typeof i=="string"||typeof i.splice=="function"||dn(i)||Ui(i)||zn(i)))return!i.length;var o=Ie(i);if(o==Et||o==vr)return!i.size;if(Os(i))return!wh(i).length;for(var h in i)if(zt.call(i,h))return!1;return!0}function jk(i,o){return Rs(i,o)}function Xk(i,o,h){h=typeof h=="function"?h:r;var d=h?h(i,o):r;return d===r?Rs(i,o,r,h):!!d}function Yh(i){if(!ae(i))return!1;var o=Oe(i);return o==q||o==J||typeof i.message=="string"&&typeof i.name=="string"&&!Ns(i)}function Wk(i){return typeof i=="number"&&mm(i)}function Wr(i){if(!se(i))return!1;var o=Oe(i);return o==at||o==St||o==Vt||o==mr}function k0(i){return typeof i=="number"&&i==pt(i)}function ko(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=rt}function se(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}function ae(i){return i!=null&&typeof i=="object"}var B0=Zg?ze(Zg):Z3;function qk(i,o){return i===o||Th(i,o,Uh(o))}function Yk(i,o,h){return h=typeof h=="function"?h:r,Th(i,o,Uh(o),h)}function Kk(i){return D0(i)&&i!=+i}function Zk(i){if(NN(i))throw new ft(a);return Rm(i)}function Jk(i){return i===null}function Qk(i){return i==null}function D0(i){return typeof i=="number"||ae(i)&&Oe(i)==Jt}function Ns(i){if(!ae(i)||Oe(i)!=Me)return!1;var o=uo(i);if(o===null)return!0;var h=zt.call(o,"constructor")&&o.constructor;return typeof h=="function"&&h instanceof h&&io.call(h)==YF}var Kh=Jg?ze(Jg):J3;function t5(i){return k0(i)&&i>=-rt&&i<=rt}var U0=Qg?ze(Qg):Q3;function Bo(i){return typeof i=="string"||!dt(i)&&ae(i)&&Oe(i)==vs}function Ve(i){return typeof i=="symbol"||ae(i)&&Oe(i)==Ya}var Ui=tm?ze(tm):tN;function e5(i){return i===r}function r5(i){return ae(i)&&Ie(i)==ys}function n5(i){return ae(i)&&Oe(i)==_O}var i5=Eo(Sh),s5=Eo(function(i,o){return i<=o});function $0(i){if(!i)return[];if(ke(i))return Bo(i)?yr(i):Le(i);if(bs&&i[bs])return BF(i[bs]());var o=Ie(i),h=o==Et?ch:o==vr?eo:$i;return h(i)}function qr(i){if(!i)return i===0?i:0;if(i=nr(i),i===G||i===-G){var o=i<0?-1:1;return o*gt}return i===i?i:0}function pt(i){var o=qr(i),h=o%1;return o===o?h?o-h:o:0}function G0(i){return i?Dn(pt(i),0,K):0}function nr(i){if(typeof i=="number")return i;if(Ve(i))return H;if(se(i)){var o=typeof i.valueOf=="function"?i.valueOf():i;i=se(o)?o+"":o}if(typeof i!="string")return i===0?i:+i;i=am(i);var h=$O.test(i);return h||zO.test(i)?xF(i.slice(2),h?2:8):UO.test(i)?H:+i}function z0(i){return Mr(i,Be(i))}function a5(i){return i?Dn(pt(i),-rt,rt):i===0?i:0}function $t(i){return i==null?"":He(i)}var o5=ki(function(i,o){if(Os(o)||ke(o)){Mr(o,_e(o),i);return}for(var h in o)zt.call(o,h)&&Cs(i,h,o[h])}),H0=ki(function(i,o){Mr(o,Be(o),i)}),Do=ki(function(i,o,h,d){Mr(o,Be(o),i,d)}),u5=ki(function(i,o,h,d){Mr(o,_e(o),i,d)}),l5=jr(vh);function h5(i,o){var h=Li(i);return o==null?h:bm(h,o)}var c5=vt(function(i,o){i=Xt(i);var h=-1,d=o.length,v=d>2?o[2]:r;for(v&&Fe(o[0],o[1],v)&&(d=1);++h<d;)for(var b=o[h],C=Be(b),E=-1,M=C.length;++E<M;){var D=C[E],U=i[D];(U===r||xr(U,Oi[D])&&!zt.call(i,D))&&(i[D]=b[D])}return i}),f5=vt(function(i){return i.push(r,a0),Ge(V0,r,i)});function d5(i,o){return rm(i,ot(o,3),Pr)}function p5(i,o){return rm(i,ot(o,3),_h)}function g5(i,o){return i==null?i:yh(i,ot(o,3),Be)}function m5(i,o){return i==null?i:Cm(i,ot(o,3),Be)}function v5(i,o){return i&&Pr(i,ot(o,3))}function y5(i,o){return i&&_h(i,ot(o,3))}function _5(i){return i==null?[]:_o(i,_e(i))}function x5(i){return i==null?[]:_o(i,Be(i))}function Zh(i,o,h){var d=i==null?r:Un(i,o);return d===r?h:d}function b5(i,o){return i!=null&&l0(i,o,V3)}function Jh(i,o){return i!=null&&l0(i,o,j3)}var T5=e0(function(i,o,h){o!=null&&typeof o.toString!="function"&&(o=so.call(o)),i[o]=h},tc(De)),w5=e0(function(i,o,h){o!=null&&typeof o.toString!="function"&&(o=so.call(o)),zt.call(i,o)?i[o].push(h):i[o]=[h]},ot),S5=vt(Is);function _e(i){return ke(i)?_m(i):wh(i)}function Be(i){return ke(i)?_m(i,!0):eN(i)}function A5(i,o){var h={};return o=ot(o,3),Pr(i,function(d,v,b){Hr(h,o(d,v,b),d)}),h}function C5(i,o){var h={};return o=ot(o,3),Pr(i,function(d,v,b){Hr(h,v,o(d,v,b))}),h}var E5=ki(function(i,o,h){xo(i,o,h)}),V0=ki(function(i,o,h,d){xo(i,o,h,d)}),I5=jr(function(i,o){var h={};if(i==null)return h;var d=!1;o=ee(o,function(b){return b=cn(b,i),d||(d=b.length>1),b}),Mr(i,Bh(i),h),d&&(h=tr(h,m|g|x,TN));for(var v=o.length;v--;)Rh(h,o[v]);return h});function R5(i,o){return j0(i,Lo(ot(o)))}var P5=jr(function(i,o){return i==null?{}:nN(i,o)});function j0(i,o){if(i==null)return{};var h=ee(Bh(i),function(d){return[d]});return o=ot(o),km(i,h,function(d,v){return o(d,v[0])})}function M5(i,o,h){o=cn(o,i);var d=-1,v=o.length;for(v||(v=1,i=r);++d<v;){var b=i==null?r:i[Or(o[d])];b===r&&(d=v,b=h),i=Wr(b)?b.call(i):b}return i}function O5(i,o,h){return i==null?i:Ps(i,o,h)}function F5(i,o,h,d){return d=typeof d=="function"?d:r,i==null?i:Ps(i,o,h,d)}var X0=i0(_e),W0=i0(Be);function N5(i,o,h){var d=dt(i),v=d||dn(i)||Ui(i);if(o=ot(o,4),h==null){var b=i&&i.constructor;v?h=d?new b:[]:se(i)?h=Wr(b)?Li(uo(i)):{}:h={}}return(v?Ze:Pr)(i,function(C,E,M){return o(h,C,E,M)}),h}function L5(i,o){return i==null?!0:Rh(i,o)}function k5(i,o,h){return i==null?i:Gm(i,o,Oh(h))}function B5(i,o,h,d){return d=typeof d=="function"?d:r,i==null?i:Gm(i,o,Oh(h),d)}function $i(i){return i==null?[]:hh(i,_e(i))}function D5(i){return i==null?[]:hh(i,Be(i))}function U5(i,o,h){return h===r&&(h=o,o=r),h!==r&&(h=nr(h),h=h===h?h:0),o!==r&&(o=nr(o),o=o===o?o:0),Dn(nr(i),o,h)}function $5(i,o,h){return o=qr(o),h===r?(h=o,o=0):h=qr(h),i=nr(i),X3(i,o,h)}function G5(i,o,h){if(h&&typeof h!="boolean"&&Fe(i,o,h)&&(o=h=r),h===r&&(typeof o=="boolean"?(h=o,o=r):typeof i=="boolean"&&(h=i,i=r)),i===r&&o===r?(i=0,o=1):(i=qr(i),o===r?(o=i,i=0):o=qr(o)),i>o){var d=i;i=o,o=d}if(h||i%1||o%1){var v=vm();return Ee(i+v*(o-i+_F("1e-"+((v+"").length-1))),o)}return Ch(i,o)}var z5=Bi(function(i,o,h){return o=o.toLowerCase(),i+(h?q0(o):o)});function q0(i){return Qh($t(i).toLowerCase())}function Y0(i){return i=$t(i),i&&i.replace(VO,OF).replace(lF,"")}function H5(i,o,h){i=$t(i),o=He(o);var d=i.length;h=h===r?d:Dn(pt(h),0,d);var v=h;return h-=o.length,h>=0&&i.slice(h,v)==o}function V5(i){return i=$t(i),i&&SO.test(i)?i.replace(Cg,FF):i}function j5(i){return i=$t(i),i&&PO.test(i)?i.replace(ql,"\\$&"):i}var X5=Bi(function(i,o,h){return i+(h?"-":"")+o.toLowerCase()}),W5=Bi(function(i,o,h){return i+(h?" ":"")+o.toLowerCase()}),q5=Jm("toLowerCase");function Y5(i,o,h){i=$t(i),o=pt(o);var d=o?Pi(i):0;if(!o||d>=o)return i;var v=(o-d)/2;return Co(fo(v),h)+i+Co(co(v),h)}function K5(i,o,h){i=$t(i),o=pt(o);var d=o?Pi(i):0;return o&&d<o?i+Co(o-d,h):i}function Z5(i,o,h){i=$t(i),o=pt(o);var d=o?Pi(i):0;return o&&d<o?Co(o-d,h)+i:i}function J5(i,o,h){return h||o==null?o=0:o&&(o=+o),s3($t(i).replace(Yl,""),o||0)}function Q5(i,o,h){return(h?Fe(i,o,h):o===r)?o=1:o=pt(o),Eh($t(i),o)}function tB(){var i=arguments,o=$t(i[0]);return i.length<3?o:o.replace(i[1],i[2])}var eB=Bi(function(i,o,h){return i+(h?"_":"")+o.toLowerCase()});function rB(i,o,h){return h&&typeof h!="number"&&Fe(i,o,h)&&(o=h=r),h=h===r?K:h>>>0,h?(i=$t(i),i&&(typeof o=="string"||o!=null&&!Kh(o))&&(o=He(o),!o&&Ri(i))?fn(yr(i),0,h):i.split(o,h)):[]}var nB=Bi(function(i,o,h){return i+(h?" ":"")+Qh(o)});function iB(i,o,h){return i=$t(i),h=h==null?0:Dn(pt(h),0,i.length),o=He(o),i.slice(h,h+o.length)==o}function sB(i,o,h){var d=_.templateSettings;h&&Fe(i,o,h)&&(o=r),i=$t(i),o=Do({},o,d,s0);var v=Do({},o.imports,d.imports,s0),b=_e(v),C=hh(v,b),E,M,D=0,U=o.interpolate||Ka,$="__p += '",Y=fh((o.escape||Ka).source+"|"+U.source+"|"+(U===Eg?DO:Ka).source+"|"+(o.evaluate||Ka).source+"|$","g"),et="//# sourceURL="+(zt.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++pF+"]")+`
1944
- `;i.replace(Y,function(lt,bt,It,je,Ne,Xe){return It||(It=je),$+=i.slice(D,Xe).replace(jO,NF),bt&&(E=!0,$+=`' +
1945
- __e(`+bt+`) +
1943
+ `)}function MN(i){return dt(i)||zn(i)||!!(gm&&i&&i[gm])}function Xr(i,o){var h=typeof i;return o=o??rt,!!o&&(h=="number"||h!="symbol"&&HO.test(i))&&i>-1&&i%1==0&&i<o}function Fe(i,o,h){if(!se(h))return!1;var d=typeof o;return(d=="number"?ke(h)&&Xr(o,h.length):d=="string"&&o in h)?xr(h[o],i):!1}function Gh(i,o){if(dt(i))return!1;var h=typeof i;return h=="number"||h=="symbol"||h=="boolean"||i==null||Ve(i)?!0:IO.test(i)||!EO.test(i)||o!=null&&i in Xt(o)}function ON(i){var o=typeof i;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?i!=="__proto__":i===null}function zh(i){var o=Io(i),h=_[o];if(typeof h!="function"||!(o in St.prototype))return!1;if(i===h)return!0;var d=Dh(h);return!!d&&i===d[0]}function FN(i){return!!cm&&cm in i}var NN=no?Wr:sc;function Os(i){var o=i&&i.constructor,h=typeof o=="function"&&o.prototype||Oi;return i===h}function c0(i){return i===i&&!se(i)}function f0(i,o){return function(h){return h==null?!1:h[i]===o&&(o!==r||i in Xt(h))}}function LN(i){var o=No(i,function(d){return h.size===f&&h.clear(),d}),h=o.cache;return o}function kN(i,o){var h=i[1],d=o[1],v=h|d,b=v<(T|w|L),C=d==L&&h==A||d==L&&h==O&&i[7].length<=o[8]||d==(L|O)&&o[7].length<=o[8]&&h==A;if(!(b||C))return i;d&T&&(i[2]=o[2],v|=h&T?0:I);var E=o[3];if(E){var M=i[3];i[3]=M?qm(M,E,o[4]):E,i[4]=M?on(i[3],p):o[4]}return E=o[5],E&&(M=i[5],i[5]=M?Ym(M,E,o[6]):E,i[6]=M?on(i[5],p):o[6]),E=o[7],E&&(i[7]=E),d&L&&(i[8]=i[8]==null?o[8]:Ee(i[8],o[8])),i[9]==null&&(i[9]=o[9]),i[0]=o[0],i[1]=v,i}function BN(i){var o=[];if(i!=null)for(var h in Xt(i))o.push(h);return o}function DN(i){return so.call(i)}function d0(i,o,h){return o=ge(o===r?i.length-1:o,0),function(){for(var d=arguments,v=-1,b=ge(d.length-o,0),C=F(b);++v<b;)C[v]=d[o+v];v=-1;for(var E=F(o+1);++v<o;)E[v]=d[v];return E[o]=h(C),Ge(i,this,E)}}function p0(i,o){return o.length<2?i:Un(i,er(o,0,-1))}function UN(i,o){for(var h=i.length,d=Ee(o.length,h),v=Le(i);d--;){var b=o[d];i[d]=Xr(b,h)?v[b]:r}return i}function Hh(i,o){if(!(o==="constructor"&&typeof i[o]=="function")&&o!="__proto__")return i[o]}var g0=v0(Dm),Fs=t3||function(i,o){return be.setTimeout(i,o)},Vh=v0(uN);function m0(i,o,h){var d=o+"";return Vh(i,PN(d,$N(EN(d),h)))}function v0(i){var o=0,h=0;return function(){var d=i3(),v=V-(d-h);if(h=d,v>0){if(++o>=st)return arguments[0]}else o=0;return i.apply(r,arguments)}}function Po(i,o){var h=-1,d=i.length,v=d-1;for(o=o===r?d:o;++h<o;){var b=Ch(h,v),C=i[b];i[b]=i[h],i[h]=C}return i.length=o,i}var y0=LN(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(RO,function(h,d,v,b){o.push(v?b.replace(BO,"$1"):d||h)}),o});function Or(i){if(typeof i=="string"||Ve(i))return i;var o=i+"";return o=="0"&&1/i==-G?"-0":o}function Gn(i){if(i!=null){try{return io.call(i)}catch{}try{return i+""}catch{}}return""}function $N(i,o){return Ze(_t,function(h){var d="_."+h[0];o&h[1]&&!Qa(i,d)&&i.push(d)}),i.sort()}function _0(i){if(i instanceof St)return i.clone();var o=new Qe(i.__wrapped__,i.__chain__);return o.__actions__=Le(i.__actions__),o.__index__=i.__index__,o.__values__=i.__values__,o}function GN(i,o,h){(h?Fe(i,o,h):o===r)?o=1:o=ge(pt(o),0);var d=i==null?0:i.length;if(!d||o<1)return[];for(var v=0,b=0,C=F(co(d/o));v<d;)C[b++]=er(i,v,v+=o);return C}function zN(i){for(var o=-1,h=i==null?0:i.length,d=0,v=[];++o<h;){var b=i[o];b&&(v[d++]=b)}return v}function HN(){var i=arguments.length;if(!i)return[];for(var o=F(i-1),h=arguments[0],d=i;d--;)o[d-1]=arguments[d];return an(dt(h)?Le(h):[h],Te(o,1))}var VN=vt(function(i,o){return he(i)?Es(i,Te(o,1,he,!0)):[]}),jN=vt(function(i,o){var h=rr(o);return he(h)&&(h=r),he(i)?Es(i,Te(o,1,he,!0),ot(h,2)):[]}),XN=vt(function(i,o){var h=rr(o);return he(h)&&(h=r),he(i)?Es(i,Te(o,1,he,!0),r,h):[]});function WN(i,o,h){var d=i==null?0:i.length;return d?(o=h||o===r?1:pt(o),er(i,o<0?0:o,d)):[]}function qN(i,o,h){var d=i==null?0:i.length;return d?(o=h||o===r?1:pt(o),o=d-o,er(i,0,o<0?0:o)):[]}function YN(i,o){return i&&i.length?To(i,ot(o,3),!0,!0):[]}function KN(i,o){return i&&i.length?To(i,ot(o,3),!0):[]}function ZN(i,o,h,d){var v=i==null?0:i.length;return v?(h&&typeof h!="number"&&Fe(i,o,h)&&(h=0,d=v),H3(i,o,h,d)):[]}function x0(i,o,h){var d=i==null?0:i.length;if(!d)return-1;var v=h==null?0:pt(h);return v<0&&(v=ge(d+v,0)),to(i,ot(o,3),v)}function b0(i,o,h){var d=i==null?0:i.length;if(!d)return-1;var v=d-1;return h!==r&&(v=pt(h),v=h<0?ge(d+v,0):Ee(v,d-1)),to(i,ot(o,3),v,!0)}function T0(i){var o=i==null?0:i.length;return o?Te(i,1):[]}function JN(i){var o=i==null?0:i.length;return o?Te(i,G):[]}function QN(i,o){var h=i==null?0:i.length;return h?(o=o===r?1:pt(o),Te(i,o)):[]}function tL(i){for(var o=-1,h=i==null?0:i.length,d={};++o<h;){var v=i[o];d[v[0]]=v[1]}return d}function w0(i){return i&&i.length?i[0]:r}function eL(i,o,h){var d=i==null?0:i.length;if(!d)return-1;var v=h==null?0:pt(h);return v<0&&(v=ge(d+v,0)),Ii(i,o,v)}function rL(i){var o=i==null?0:i.length;return o?er(i,0,-1):[]}var nL=vt(function(i){var o=ee(i,Mh);return o.length&&o[0]===i[0]?bh(o):[]}),iL=vt(function(i){var o=rr(i),h=ee(i,Mh);return o===rr(h)?o=r:h.pop(),h.length&&h[0]===i[0]?bh(h,ot(o,2)):[]}),sL=vt(function(i){var o=rr(i),h=ee(i,Mh);return o=typeof o=="function"?o:r,o&&h.pop(),h.length&&h[0]===i[0]?bh(h,r,o):[]});function aL(i,o){return i==null?"":r3.call(i,o)}function rr(i){var o=i==null?0:i.length;return o?i[o-1]:r}function oL(i,o,h){var d=i==null?0:i.length;if(!d)return-1;var v=d;return h!==r&&(v=pt(h),v=v<0?ge(d+v,0):Ee(v,d-1)),o===o?$F(i,o,v):to(i,nm,v,!0)}function uL(i,o){return i&&i.length?Nm(i,pt(o)):r}var lL=vt(S0);function S0(i,o){return i&&i.length&&o&&o.length?Ah(i,o):i}function hL(i,o,h){return i&&i.length&&o&&o.length?Ah(i,o,ot(h,2)):i}function cL(i,o,h){return i&&i.length&&o&&o.length?Ah(i,o,r,h):i}var fL=jr(function(i,o){var h=i==null?0:i.length,d=vh(i,o);return Bm(i,ee(o,function(v){return Xr(v,h)?+v:v}).sort(Wm)),d});function dL(i,o){var h=[];if(!(i&&i.length))return h;var d=-1,v=[],b=i.length;for(o=ot(o,3);++d<b;){var C=i[d];o(C,d,i)&&(h.push(C),v.push(d))}return Bm(i,v),h}function jh(i){return i==null?i:a3.call(i)}function pL(i,o,h){var d=i==null?0:i.length;return d?(h&&typeof h!="number"&&Fe(i,o,h)?(o=0,h=d):(o=o==null?0:pt(o),h=h===r?d:pt(h)),er(i,o,h)):[]}function gL(i,o){return bo(i,o)}function mL(i,o,h){return Ih(i,o,ot(h,2))}function vL(i,o){var h=i==null?0:i.length;if(h){var d=bo(i,o);if(d<h&&xr(i[d],o))return d}return-1}function yL(i,o){return bo(i,o,!0)}function _L(i,o,h){return Ih(i,o,ot(h,2),!0)}function xL(i,o){var h=i==null?0:i.length;if(h){var d=bo(i,o,!0)-1;if(xr(i[d],o))return d}return-1}function bL(i){return i&&i.length?Um(i):[]}function TL(i,o){return i&&i.length?Um(i,ot(o,2)):[]}function wL(i){var o=i==null?0:i.length;return o?er(i,1,o):[]}function SL(i,o,h){return i&&i.length?(o=h||o===r?1:pt(o),er(i,0,o<0?0:o)):[]}function AL(i,o,h){var d=i==null?0:i.length;return d?(o=h||o===r?1:pt(o),o=d-o,er(i,o<0?0:o,d)):[]}function CL(i,o){return i&&i.length?To(i,ot(o,3),!1,!0):[]}function EL(i,o){return i&&i.length?To(i,ot(o,3)):[]}var IL=vt(function(i){return hn(Te(i,1,he,!0))}),RL=vt(function(i){var o=rr(i);return he(o)&&(o=r),hn(Te(i,1,he,!0),ot(o,2))}),PL=vt(function(i){var o=rr(i);return o=typeof o=="function"?o:r,hn(Te(i,1,he,!0),r,o)});function ML(i){return i&&i.length?hn(i):[]}function OL(i,o){return i&&i.length?hn(i,ot(o,2)):[]}function FL(i,o){return o=typeof o=="function"?o:r,i&&i.length?hn(i,r,o):[]}function Xh(i){if(!(i&&i.length))return[];var o=0;return i=sn(i,function(h){if(he(h))return o=ge(h.length,o),!0}),lh(o,function(h){return ee(i,ah(h))})}function A0(i,o){if(!(i&&i.length))return[];var h=Xh(i);return o==null?h:ee(h,function(d){return Ge(o,r,d)})}var NL=vt(function(i,o){return he(i)?Es(i,o):[]}),LL=vt(function(i){return Ph(sn(i,he))}),kL=vt(function(i){var o=rr(i);return he(o)&&(o=r),Ph(sn(i,he),ot(o,2))}),BL=vt(function(i){var o=rr(i);return o=typeof o=="function"?o:r,Ph(sn(i,he),r,o)}),DL=vt(Xh);function UL(i,o){return Hm(i||[],o||[],Cs)}function $L(i,o){return Hm(i||[],o||[],Ps)}var GL=vt(function(i){var o=i.length,h=o>1?i[o-1]:r;return h=typeof h=="function"?(i.pop(),h):r,A0(i,h)});function C0(i){var o=_(i);return o.__chain__=!0,o}function zL(i,o){return o(i),i}function Mo(i,o){return o(i)}var HL=jr(function(i){var o=i.length,h=o?i[0]:0,d=this.__wrapped__,v=function(b){return vh(b,i)};return o>1||this.__actions__.length||!(d instanceof St)||!Xr(h)?this.thru(v):(d=d.slice(h,+h+(o?1:0)),d.__actions__.push({func:Mo,args:[v],thisArg:r}),new Qe(d,this.__chain__).thru(function(b){return o&&!b.length&&b.push(r),b}))});function VL(){return C0(this)}function jL(){return new Qe(this.value(),this.__chain__)}function XL(){this.__values__===r&&(this.__values__=$0(this.value()));var i=this.__index__>=this.__values__.length,o=i?r:this.__values__[this.__index__++];return{done:i,value:o}}function WL(){return this}function qL(i){for(var o,h=this;h instanceof mo;){var d=_0(h);d.__index__=0,d.__values__=r,o?v.__wrapped__=d:o=d;var v=d;h=h.__wrapped__}return v.__wrapped__=i,o}function YL(){var i=this.__wrapped__;if(i instanceof St){var o=i;return this.__actions__.length&&(o=new St(this)),o=o.reverse(),o.__actions__.push({func:Mo,args:[jh],thisArg:r}),new Qe(o,this.__chain__)}return this.thru(jh)}function KL(){return zm(this.__wrapped__,this.__actions__)}var ZL=wo(function(i,o,h){Gt.call(i,h)?++i[h]:Hr(i,h,1)});function JL(i,o,h){var d=dt(i)?em:z3;return h&&Fe(i,o,h)&&(o=r),d(i,ot(o,3))}function QL(i,o){var h=dt(i)?sn:Am;return h(i,ot(o,3))}var tk=Qm(x0),ek=Qm(b0);function rk(i,o){return Te(Oo(i,o),1)}function nk(i,o){return Te(Oo(i,o),G)}function ik(i,o,h){return h=h===r?1:pt(h),Te(Oo(i,o),h)}function E0(i,o){var h=dt(i)?Ze:ln;return h(i,ot(o,3))}function I0(i,o){var h=dt(i)?wF:Sm;return h(i,ot(o,3))}var sk=wo(function(i,o,h){Gt.call(i,h)?i[h].push(o):Hr(i,h,[o])});function ak(i,o,h,d){i=ke(i)?i:$i(i),h=h&&!d?pt(h):0;var v=i.length;return h<0&&(h=ge(v+h,0)),Bo(i)?h<=v&&i.indexOf(o,h)>-1:!!v&&Ii(i,o,h)>-1}var ok=vt(function(i,o,h){var d=-1,v=typeof o=="function",b=ke(i)?F(i.length):[];return ln(i,function(C){b[++d]=v?Ge(o,C,h):Is(C,o,h)}),b}),uk=wo(function(i,o,h){Hr(i,h,o)});function Oo(i,o){var h=dt(i)?ee:Mm;return h(i,ot(o,3))}function lk(i,o,h,d){return i==null?[]:(dt(o)||(o=o==null?[]:[o]),h=d?r:h,dt(h)||(h=h==null?[]:[h]),Lm(i,o,h))}var hk=wo(function(i,o,h){i[h?0:1].push(o)},function(){return[[],[]]});function ck(i,o,h){var d=dt(i)?ih:sm,v=arguments.length<3;return d(i,ot(o,4),h,v,ln)}function fk(i,o,h){var d=dt(i)?SF:sm,v=arguments.length<3;return d(i,ot(o,4),h,v,Sm)}function dk(i,o){var h=dt(i)?sn:Am;return h(i,Lo(ot(o,3)))}function pk(i){var o=dt(i)?xm:aN;return o(i)}function gk(i,o,h){(h?Fe(i,o,h):o===r)?o=1:o=pt(o);var d=dt(i)?B3:oN;return d(i,o)}function mk(i){var o=dt(i)?D3:lN;return o(i)}function vk(i){if(i==null)return 0;if(ke(i))return Bo(i)?Pi(i):i.length;var o=Ie(i);return o==Et||o==vr?i.size:wh(i).length}function yk(i,o,h){var d=dt(i)?sh:hN;return h&&Fe(i,o,h)&&(o=r),d(i,ot(o,3))}var _k=vt(function(i,o){if(i==null)return[];var h=o.length;return h>1&&Fe(i,o[0],o[1])?o=[]:h>2&&Fe(o[0],o[1],o[2])&&(o=[o[0]]),Lm(i,Te(o,1),[])}),Fo=QF||function(){return be.Date.now()};function xk(i,o){if(typeof o!="function")throw new Je(u);return i=pt(i),function(){if(--i<1)return o.apply(this,arguments)}}function R0(i,o,h){return o=h?r:o,o=i&&o==null?i.length:o,Vr(i,L,r,r,r,r,o)}function P0(i,o){var h;if(typeof o!="function")throw new Je(u);return i=pt(i),function(){return--i>0&&(h=o.apply(this,arguments)),i<=1&&(o=r),h}}var Wh=vt(function(i,o,h){var d=T;if(h.length){var v=on(h,Di(Wh));d|=N}return Vr(i,d,o,h,v)}),M0=vt(function(i,o,h){var d=T|w;if(h.length){var v=on(h,Di(M0));d|=N}return Vr(o,d,i,h,v)});function O0(i,o,h){o=h?r:o;var d=Vr(i,A,r,r,r,r,r,o);return d.placeholder=O0.placeholder,d}function F0(i,o,h){o=h?r:o;var d=Vr(i,R,r,r,r,r,r,o);return d.placeholder=F0.placeholder,d}function N0(i,o,h){var d,v,b,C,E,M,D=0,U=!1,$=!1,Y=!0;if(typeof i!="function")throw new Je(u);o=nr(o)||0,se(h)&&(U=!!h.leading,$="maxWait"in h,b=$?ge(nr(h.maxWait)||0,o):b,Y="trailing"in h?!!h.trailing:Y);function et(ce){var br=d,Yr=v;return d=v=r,D=ce,C=i.apply(Yr,br),C}function ut(ce){return D=ce,E=Fs(Tt,o),U?et(ce):C}function mt(ce){var br=ce-M,Yr=ce-D,Q0=o-br;return $?Ee(Q0,b-Yr):Q0}function lt(ce){var br=ce-M,Yr=ce-D;return M===r||br>=o||br<0||$&&Yr>=b}function Tt(){var ce=Fo();if(lt(ce))return It(ce);E=Fs(Tt,mt(ce))}function It(ce){return E=r,Y&&d?et(ce):(d=v=r,C)}function je(){E!==r&&Vm(E),D=0,d=M=v=E=r}function Ne(){return E===r?C:It(Fo())}function Xe(){var ce=Fo(),br=lt(ce);if(d=arguments,v=this,M=ce,br){if(E===r)return ut(M);if($)return Vm(E),E=Fs(Tt,o),et(M)}return E===r&&(E=Fs(Tt,o)),C}return Xe.cancel=je,Xe.flush=Ne,Xe}var bk=vt(function(i,o){return wm(i,1,o)}),Tk=vt(function(i,o,h){return wm(i,nr(o)||0,h)});function wk(i){return Vr(i,z)}function No(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new Je(u);var h=function(){var d=arguments,v=o?o.apply(this,d):d[0],b=h.cache;if(b.has(v))return b.get(v);var C=i.apply(this,d);return h.cache=b.set(v,C)||b,C};return h.cache=new(No.Cache||zr),h}No.Cache=zr;function Lo(i){if(typeof i!="function")throw new Je(u);return function(){var o=arguments;switch(o.length){case 0:return!i.call(this);case 1:return!i.call(this,o[0]);case 2:return!i.call(this,o[0],o[1]);case 3:return!i.call(this,o[0],o[1],o[2])}return!i.apply(this,o)}}function Sk(i){return P0(2,i)}var Ak=cN(function(i,o){o=o.length==1&&dt(o[0])?ee(o[0],ze(ot())):ee(Te(o,1),ze(ot()));var h=o.length;return vt(function(d){for(var v=-1,b=Ee(d.length,h);++v<b;)d[v]=o[v].call(this,d[v]);return Ge(i,this,d)})}),qh=vt(function(i,o){var h=on(o,Di(qh));return Vr(i,N,r,o,h)}),L0=vt(function(i,o){var h=on(o,Di(L0));return Vr(i,B,r,o,h)}),Ck=jr(function(i,o){return Vr(i,O,r,r,r,o)});function Ek(i,o){if(typeof i!="function")throw new Je(u);return o=o===r?o:pt(o),vt(i,o)}function Ik(i,o){if(typeof i!="function")throw new Je(u);return o=o==null?0:ge(pt(o),0),vt(function(h){var d=h[o],v=fn(h,0,o);return d&&an(v,d),Ge(i,this,v)})}function Rk(i,o,h){var d=!0,v=!0;if(typeof i!="function")throw new Je(u);return se(h)&&(d="leading"in h?!!h.leading:d,v="trailing"in h?!!h.trailing:v),N0(i,o,{leading:d,maxWait:o,trailing:v})}function Pk(i){return R0(i,1)}function Mk(i,o){return qh(Oh(o),i)}function Ok(){if(!arguments.length)return[];var i=arguments[0];return dt(i)?i:[i]}function Fk(i){return tr(i,x)}function Nk(i,o){return o=typeof o=="function"?o:r,tr(i,x,o)}function Lk(i){return tr(i,m|x)}function kk(i,o){return o=typeof o=="function"?o:r,tr(i,m|x,o)}function Bk(i,o){return o==null||Tm(i,o,_e(o))}function xr(i,o){return i===o||i!==i&&o!==o}var Dk=Eo(xh),Uk=Eo(function(i,o){return i>=o}),zn=Im(function(){return arguments}())?Im:function(i){return ae(i)&&Gt.call(i,"callee")&&!pm.call(i,"callee")},dt=F.isArray,$k=Yg?ze(Yg):q3;function ke(i){return i!=null&&ko(i.length)&&!Wr(i)}function he(i){return ae(i)&&ke(i)}function Gk(i){return i===!0||i===!1||ae(i)&&Oe(i)==Vt}var dn=e3||sc,zk=Kg?ze(Kg):Y3;function Hk(i){return ae(i)&&i.nodeType===1&&!Ns(i)}function Vk(i){if(i==null)return!0;if(ke(i)&&(dt(i)||typeof i=="string"||typeof i.splice=="function"||dn(i)||Ui(i)||zn(i)))return!i.length;var o=Ie(i);if(o==Et||o==vr)return!i.size;if(Os(i))return!wh(i).length;for(var h in i)if(Gt.call(i,h))return!1;return!0}function jk(i,o){return Rs(i,o)}function Xk(i,o,h){h=typeof h=="function"?h:r;var d=h?h(i,o):r;return d===r?Rs(i,o,r,h):!!d}function Yh(i){if(!ae(i))return!1;var o=Oe(i);return o==W||o==J||typeof i.message=="string"&&typeof i.name=="string"&&!Ns(i)}function Wk(i){return typeof i=="number"&&mm(i)}function Wr(i){if(!se(i))return!1;var o=Oe(i);return o==at||o==Ct||o==Ht||o==mr}function k0(i){return typeof i=="number"&&i==pt(i)}function ko(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=rt}function se(i){var o=typeof i;return i!=null&&(o=="object"||o=="function")}function ae(i){return i!=null&&typeof i=="object"}var B0=Zg?ze(Zg):Z3;function qk(i,o){return i===o||Th(i,o,Uh(o))}function Yk(i,o,h){return h=typeof h=="function"?h:r,Th(i,o,Uh(o),h)}function Kk(i){return D0(i)&&i!=+i}function Zk(i){if(NN(i))throw new ft(a);return Rm(i)}function Jk(i){return i===null}function Qk(i){return i==null}function D0(i){return typeof i=="number"||ae(i)&&Oe(i)==Zt}function Ns(i){if(!ae(i)||Oe(i)!=Me)return!1;var o=uo(i);if(o===null)return!0;var h=Gt.call(o,"constructor")&&o.constructor;return typeof h=="function"&&h instanceof h&&io.call(h)==YF}var Kh=Jg?ze(Jg):J3;function t5(i){return k0(i)&&i>=-rt&&i<=rt}var U0=Qg?ze(Qg):Q3;function Bo(i){return typeof i=="string"||!dt(i)&&ae(i)&&Oe(i)==vs}function Ve(i){return typeof i=="symbol"||ae(i)&&Oe(i)==Ya}var Ui=tm?ze(tm):tN;function e5(i){return i===r}function r5(i){return ae(i)&&Ie(i)==ys}function n5(i){return ae(i)&&Oe(i)==_O}var i5=Eo(Sh),s5=Eo(function(i,o){return i<=o});function $0(i){if(!i)return[];if(ke(i))return Bo(i)?yr(i):Le(i);if(bs&&i[bs])return BF(i[bs]());var o=Ie(i),h=o==Et?ch:o==vr?eo:$i;return h(i)}function qr(i){if(!i)return i===0?i:0;if(i=nr(i),i===G||i===-G){var o=i<0?-1:1;return o*gt}return i===i?i:0}function pt(i){var o=qr(i),h=o%1;return o===o?h?o-h:o:0}function G0(i){return i?Dn(pt(i),0,K):0}function nr(i){if(typeof i=="number")return i;if(Ve(i))return H;if(se(i)){var o=typeof i.valueOf=="function"?i.valueOf():i;i=se(o)?o+"":o}if(typeof i!="string")return i===0?i:+i;i=am(i);var h=$O.test(i);return h||zO.test(i)?xF(i.slice(2),h?2:8):UO.test(i)?H:+i}function z0(i){return Mr(i,Be(i))}function a5(i){return i?Dn(pt(i),-rt,rt):i===0?i:0}function Ut(i){return i==null?"":He(i)}var o5=ki(function(i,o){if(Os(o)||ke(o)){Mr(o,_e(o),i);return}for(var h in o)Gt.call(o,h)&&Cs(i,h,o[h])}),H0=ki(function(i,o){Mr(o,Be(o),i)}),Do=ki(function(i,o,h,d){Mr(o,Be(o),i,d)}),u5=ki(function(i,o,h,d){Mr(o,_e(o),i,d)}),l5=jr(vh);function h5(i,o){var h=Li(i);return o==null?h:bm(h,o)}var c5=vt(function(i,o){i=Xt(i);var h=-1,d=o.length,v=d>2?o[2]:r;for(v&&Fe(o[0],o[1],v)&&(d=1);++h<d;)for(var b=o[h],C=Be(b),E=-1,M=C.length;++E<M;){var D=C[E],U=i[D];(U===r||xr(U,Oi[D])&&!Gt.call(i,D))&&(i[D]=b[D])}return i}),f5=vt(function(i){return i.push(r,a0),Ge(V0,r,i)});function d5(i,o){return rm(i,ot(o,3),Pr)}function p5(i,o){return rm(i,ot(o,3),_h)}function g5(i,o){return i==null?i:yh(i,ot(o,3),Be)}function m5(i,o){return i==null?i:Cm(i,ot(o,3),Be)}function v5(i,o){return i&&Pr(i,ot(o,3))}function y5(i,o){return i&&_h(i,ot(o,3))}function _5(i){return i==null?[]:_o(i,_e(i))}function x5(i){return i==null?[]:_o(i,Be(i))}function Zh(i,o,h){var d=i==null?r:Un(i,o);return d===r?h:d}function b5(i,o){return i!=null&&l0(i,o,V3)}function Jh(i,o){return i!=null&&l0(i,o,j3)}var T5=e0(function(i,o,h){o!=null&&typeof o.toString!="function"&&(o=so.call(o)),i[o]=h},tc(De)),w5=e0(function(i,o,h){o!=null&&typeof o.toString!="function"&&(o=so.call(o)),Gt.call(i,o)?i[o].push(h):i[o]=[h]},ot),S5=vt(Is);function _e(i){return ke(i)?_m(i):wh(i)}function Be(i){return ke(i)?_m(i,!0):eN(i)}function A5(i,o){var h={};return o=ot(o,3),Pr(i,function(d,v,b){Hr(h,o(d,v,b),d)}),h}function C5(i,o){var h={};return o=ot(o,3),Pr(i,function(d,v,b){Hr(h,v,o(d,v,b))}),h}var E5=ki(function(i,o,h){xo(i,o,h)}),V0=ki(function(i,o,h,d){xo(i,o,h,d)}),I5=jr(function(i,o){var h={};if(i==null)return h;var d=!1;o=ee(o,function(b){return b=cn(b,i),d||(d=b.length>1),b}),Mr(i,Bh(i),h),d&&(h=tr(h,m|g|x,TN));for(var v=o.length;v--;)Rh(h,o[v]);return h});function R5(i,o){return j0(i,Lo(ot(o)))}var P5=jr(function(i,o){return i==null?{}:nN(i,o)});function j0(i,o){if(i==null)return{};var h=ee(Bh(i),function(d){return[d]});return o=ot(o),km(i,h,function(d,v){return o(d,v[0])})}function M5(i,o,h){o=cn(o,i);var d=-1,v=o.length;for(v||(v=1,i=r);++d<v;){var b=i==null?r:i[Or(o[d])];b===r&&(d=v,b=h),i=Wr(b)?b.call(i):b}return i}function O5(i,o,h){return i==null?i:Ps(i,o,h)}function F5(i,o,h,d){return d=typeof d=="function"?d:r,i==null?i:Ps(i,o,h,d)}var X0=i0(_e),W0=i0(Be);function N5(i,o,h){var d=dt(i),v=d||dn(i)||Ui(i);if(o=ot(o,4),h==null){var b=i&&i.constructor;v?h=d?new b:[]:se(i)?h=Wr(b)?Li(uo(i)):{}:h={}}return(v?Ze:Pr)(i,function(C,E,M){return o(h,C,E,M)}),h}function L5(i,o){return i==null?!0:Rh(i,o)}function k5(i,o,h){return i==null?i:Gm(i,o,Oh(h))}function B5(i,o,h,d){return d=typeof d=="function"?d:r,i==null?i:Gm(i,o,Oh(h),d)}function $i(i){return i==null?[]:hh(i,_e(i))}function D5(i){return i==null?[]:hh(i,Be(i))}function U5(i,o,h){return h===r&&(h=o,o=r),h!==r&&(h=nr(h),h=h===h?h:0),o!==r&&(o=nr(o),o=o===o?o:0),Dn(nr(i),o,h)}function $5(i,o,h){return o=qr(o),h===r?(h=o,o=0):h=qr(h),i=nr(i),X3(i,o,h)}function G5(i,o,h){if(h&&typeof h!="boolean"&&Fe(i,o,h)&&(o=h=r),h===r&&(typeof o=="boolean"?(h=o,o=r):typeof i=="boolean"&&(h=i,i=r)),i===r&&o===r?(i=0,o=1):(i=qr(i),o===r?(o=i,i=0):o=qr(o)),i>o){var d=i;i=o,o=d}if(h||i%1||o%1){var v=vm();return Ee(i+v*(o-i+_F("1e-"+((v+"").length-1))),o)}return Ch(i,o)}var z5=Bi(function(i,o,h){return o=o.toLowerCase(),i+(h?q0(o):o)});function q0(i){return Qh(Ut(i).toLowerCase())}function Y0(i){return i=Ut(i),i&&i.replace(VO,OF).replace(lF,"")}function H5(i,o,h){i=Ut(i),o=He(o);var d=i.length;h=h===r?d:Dn(pt(h),0,d);var v=h;return h-=o.length,h>=0&&i.slice(h,v)==o}function V5(i){return i=Ut(i),i&&SO.test(i)?i.replace(Cg,FF):i}function j5(i){return i=Ut(i),i&&PO.test(i)?i.replace(ql,"\\$&"):i}var X5=Bi(function(i,o,h){return i+(h?"-":"")+o.toLowerCase()}),W5=Bi(function(i,o,h){return i+(h?" ":"")+o.toLowerCase()}),q5=Jm("toLowerCase");function Y5(i,o,h){i=Ut(i),o=pt(o);var d=o?Pi(i):0;if(!o||d>=o)return i;var v=(o-d)/2;return Co(fo(v),h)+i+Co(co(v),h)}function K5(i,o,h){i=Ut(i),o=pt(o);var d=o?Pi(i):0;return o&&d<o?i+Co(o-d,h):i}function Z5(i,o,h){i=Ut(i),o=pt(o);var d=o?Pi(i):0;return o&&d<o?Co(o-d,h)+i:i}function J5(i,o,h){return h||o==null?o=0:o&&(o=+o),s3(Ut(i).replace(Yl,""),o||0)}function Q5(i,o,h){return(h?Fe(i,o,h):o===r)?o=1:o=pt(o),Eh(Ut(i),o)}function tB(){var i=arguments,o=Ut(i[0]);return i.length<3?o:o.replace(i[1],i[2])}var eB=Bi(function(i,o,h){return i+(h?"_":"")+o.toLowerCase()});function rB(i,o,h){return h&&typeof h!="number"&&Fe(i,o,h)&&(o=h=r),h=h===r?K:h>>>0,h?(i=Ut(i),i&&(typeof o=="string"||o!=null&&!Kh(o))&&(o=He(o),!o&&Ri(i))?fn(yr(i),0,h):i.split(o,h)):[]}var nB=Bi(function(i,o,h){return i+(h?" ":"")+Qh(o)});function iB(i,o,h){return i=Ut(i),h=h==null?0:Dn(pt(h),0,i.length),o=He(o),i.slice(h,h+o.length)==o}function sB(i,o,h){var d=_.templateSettings;h&&Fe(i,o,h)&&(o=r),i=Ut(i),o=Do({},o,d,s0);var v=Do({},o.imports,d.imports,s0),b=_e(v),C=hh(v,b),E,M,D=0,U=o.interpolate||Ka,$="__p += '",Y=fh((o.escape||Ka).source+"|"+U.source+"|"+(U===Eg?DO:Ka).source+"|"+(o.evaluate||Ka).source+"|$","g"),et="//# sourceURL="+(Gt.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++pF+"]")+`
1944
+ `;i.replace(Y,function(lt,Tt,It,je,Ne,Xe){return It||(It=je),$+=i.slice(D,Xe).replace(jO,NF),Tt&&(E=!0,$+=`' +
1945
+ __e(`+Tt+`) +
1946
1946
  '`),Ne&&(M=!0,$+=`';
1947
1947
  `+Ne+`;
1948
1948
  __p += '`),It&&($+=`' +
1949
1949
  ((__t = (`+It+`)) == null ? '' : __t) +
1950
1950
  '`),D=Xe+lt.length,lt}),$+=`';
1951
- `;var ut=zt.call(o,"variable")&&o.variable;if(!ut)$=`with (obj) {
1951
+ `;var ut=Gt.call(o,"variable")&&o.variable;if(!ut)$=`with (obj) {
1952
1952
  `+$+`
1953
1953
  }
1954
1954
  `;else if(kO.test(ut))throw new ft(l);$=(M?$.replace(xO,""):$).replace(bO,"$1").replace(TO,"$1;"),$="function("+(ut||"obj")+`) {
@@ -1957,4 +1957,4 @@ __p += '`),It&&($+=`' +
1957
1957
  function print() { __p += __j.call(arguments, '') }
1958
1958
  `:`;
1959
1959
  `)+$+`return __p
1960
- }`;var mt=Z0(function(){return Bt(b,et+"return "+$).apply(r,C)});if(mt.source=$,Yh(mt))throw mt;return mt}function aB(i){return $t(i).toLowerCase()}function oB(i){return $t(i).toUpperCase()}function uB(i,o,h){if(i=$t(i),i&&(h||o===r))return am(i);if(!i||!(o=He(o)))return i;var d=yr(i),v=yr(o),b=om(d,v),C=um(d,v)+1;return fn(d,b,C).join("")}function lB(i,o,h){if(i=$t(i),i&&(h||o===r))return i.slice(0,hm(i)+1);if(!i||!(o=He(o)))return i;var d=yr(i),v=um(d,yr(o))+1;return fn(d,0,v).join("")}function hB(i,o,h){if(i=$t(i),i&&(h||o===r))return i.replace(Yl,"");if(!i||!(o=He(o)))return i;var d=yr(i),v=om(d,yr(o));return fn(d,v).join("")}function cB(i,o){var h=X,d=tt;if(se(o)){var v="separator"in o?o.separator:v;h="length"in o?pt(o.length):h,d="omission"in o?He(o.omission):d}i=$t(i);var b=i.length;if(Ri(i)){var C=yr(i);b=C.length}if(h>=b)return i;var E=h-Pi(d);if(E<1)return d;var M=C?fn(C,0,E).join(""):i.slice(0,E);if(v===r)return M+d;if(C&&(E+=M.length-E),Kh(v)){if(i.slice(E).search(v)){var D,U=M;for(v.global||(v=fh(v.source,$t(Ig.exec(v))+"g")),v.lastIndex=0;D=v.exec(U);)var $=D.index;M=M.slice(0,$===r?E:$)}}else if(i.indexOf(He(v),E)!=E){var Y=M.lastIndexOf(v);Y>-1&&(M=M.slice(0,Y))}return M+d}function fB(i){return i=$t(i),i&&wO.test(i)?i.replace(Ag,GF):i}var dB=Bi(function(i,o,h){return i+(h?" ":"")+o.toUpperCase()}),Qh=Jm("toUpperCase");function K0(i,o,h){return i=$t(i),o=h?r:o,o===r?kF(i)?VF(i):EF(i):i.match(o)||[]}var Z0=vt(function(i,o){try{return Ge(i,r,o)}catch(h){return Yh(h)?h:new ft(h)}}),pB=jr(function(i,o){return Ze(o,function(h){h=Or(h),Hr(i,h,Wh(i[h],i))}),i});function gB(i){var o=i==null?0:i.length,h=ot();return i=o?ee(i,function(d){if(typeof d[1]!="function")throw new Je(u);return[h(d[0]),d[1]]}):[],vt(function(d){for(var v=-1;++v<o;){var b=i[v];if(Ge(b[0],this,d))return Ge(b[1],this,d)}})}function mB(i){return G3(tr(i,m))}function tc(i){return function(){return i}}function vB(i,o){return i==null||i!==i?o:i}var yB=t0(),_B=t0(!0);function De(i){return i}function ec(i){return Pm(typeof i=="function"?i:tr(i,m))}function xB(i){return Om(tr(i,m))}function bB(i,o){return Fm(i,tr(o,m))}var TB=vt(function(i,o){return function(h){return Is(h,i,o)}}),wB=vt(function(i,o){return function(h){return Is(i,h,o)}});function rc(i,o,h){var d=_e(o),v=_o(o,d);h==null&&!(se(o)&&(v.length||!d.length))&&(h=o,o=i,i=this,v=_o(o,_e(o)));var b=!(se(h)&&"chain"in h)||!!h.chain,C=Wr(i);return Ze(v,function(E){var M=o[E];i[E]=M,C&&(i.prototype[E]=function(){var D=this.__chain__;if(b||D){var U=i(this.__wrapped__),$=U.__actions__=Le(this.__actions__);return $.push({func:M,args:arguments,thisArg:i}),U.__chain__=D,U}return M.apply(i,an([this.value()],arguments))})}),i}function SB(){return be._===this&&(be._=KF),this}function nc(){}function AB(i){return i=pt(i),vt(function(o){return Nm(o,i)})}var CB=Nh(ee),EB=Nh(em),IB=Nh(sh);function J0(i){return Gh(i)?ah(Or(i)):iN(i)}function RB(i){return function(o){return i==null?r:Un(i,o)}}var PB=r0(),MB=r0(!0);function ic(){return[]}function sc(){return!1}function OB(){return{}}function FB(){return""}function NB(){return!0}function LB(i,o){if(i=pt(i),i<1||i>rt)return[];var h=K,d=Ee(i,K);o=ot(o),i-=K;for(var v=lh(d,o);++h<i;)o(h);return v}function kB(i){return dt(i)?ee(i,Or):Ve(i)?[i]:Le(y0($t(i)))}function BB(i){var o=++qF;return $t(i)+o}var DB=Ao(function(i,o){return i+o},0),UB=Lh("ceil"),$B=Ao(function(i,o){return i/o},1),GB=Lh("floor");function zB(i){return i&&i.length?yo(i,De,xh):r}function HB(i,o){return i&&i.length?yo(i,ot(o,2),xh):r}function VB(i){return im(i,De)}function jB(i,o){return im(i,ot(o,2))}function XB(i){return i&&i.length?yo(i,De,Sh):r}function WB(i,o){return i&&i.length?yo(i,ot(o,2),Sh):r}var qB=Ao(function(i,o){return i*o},1),YB=Lh("round"),KB=Ao(function(i,o){return i-o},0);function ZB(i){return i&&i.length?uh(i,De):0}function JB(i,o){return i&&i.length?uh(i,ot(o,2)):0}return _.after=xk,_.ary=R0,_.assign=o5,_.assignIn=H0,_.assignInWith=Do,_.assignWith=u5,_.at=l5,_.before=P0,_.bind=Wh,_.bindAll=pB,_.bindKey=M0,_.castArray=Ok,_.chain=C0,_.chunk=GN,_.compact=zN,_.concat=HN,_.cond=gB,_.conforms=mB,_.constant=tc,_.countBy=ZL,_.create=h5,_.curry=O0,_.curryRight=F0,_.debounce=N0,_.defaults=c5,_.defaultsDeep=f5,_.defer=bk,_.delay=Tk,_.difference=VN,_.differenceBy=jN,_.differenceWith=XN,_.drop=WN,_.dropRight=qN,_.dropRightWhile=YN,_.dropWhile=KN,_.fill=ZN,_.filter=QL,_.flatMap=rk,_.flatMapDeep=nk,_.flatMapDepth=ik,_.flatten=T0,_.flattenDeep=JN,_.flattenDepth=QN,_.flip=wk,_.flow=yB,_.flowRight=_B,_.fromPairs=tL,_.functions=_5,_.functionsIn=x5,_.groupBy=sk,_.initial=rL,_.intersection=nL,_.intersectionBy=iL,_.intersectionWith=sL,_.invert=T5,_.invertBy=w5,_.invokeMap=ok,_.iteratee=ec,_.keyBy=uk,_.keys=_e,_.keysIn=Be,_.map=Oo,_.mapKeys=A5,_.mapValues=C5,_.matches=xB,_.matchesProperty=bB,_.memoize=No,_.merge=E5,_.mergeWith=V0,_.method=TB,_.methodOf=wB,_.mixin=rc,_.negate=Lo,_.nthArg=AB,_.omit=I5,_.omitBy=R5,_.once=Sk,_.orderBy=lk,_.over=CB,_.overArgs=Ak,_.overEvery=EB,_.overSome=IB,_.partial=qh,_.partialRight=L0,_.partition=hk,_.pick=P5,_.pickBy=j0,_.property=J0,_.propertyOf=RB,_.pull=lL,_.pullAll=S0,_.pullAllBy=hL,_.pullAllWith=cL,_.pullAt=fL,_.range=PB,_.rangeRight=MB,_.rearg=Ck,_.reject=dk,_.remove=dL,_.rest=Ek,_.reverse=jh,_.sampleSize=gk,_.set=O5,_.setWith=F5,_.shuffle=mk,_.slice=pL,_.sortBy=_k,_.sortedUniq=bL,_.sortedUniqBy=TL,_.split=rB,_.spread=Ik,_.tail=wL,_.take=SL,_.takeRight=AL,_.takeRightWhile=CL,_.takeWhile=EL,_.tap=zL,_.throttle=Rk,_.thru=Mo,_.toArray=$0,_.toPairs=X0,_.toPairsIn=W0,_.toPath=kB,_.toPlainObject=z0,_.transform=N5,_.unary=Pk,_.union=IL,_.unionBy=RL,_.unionWith=PL,_.uniq=ML,_.uniqBy=OL,_.uniqWith=FL,_.unset=L5,_.unzip=Xh,_.unzipWith=A0,_.update=k5,_.updateWith=B5,_.values=$i,_.valuesIn=D5,_.without=NL,_.words=K0,_.wrap=Mk,_.xor=LL,_.xorBy=kL,_.xorWith=BL,_.zip=DL,_.zipObject=UL,_.zipObjectDeep=$L,_.zipWith=GL,_.entries=X0,_.entriesIn=W0,_.extend=H0,_.extendWith=Do,rc(_,_),_.add=DB,_.attempt=Z0,_.camelCase=z5,_.capitalize=q0,_.ceil=UB,_.clamp=U5,_.clone=Fk,_.cloneDeep=Lk,_.cloneDeepWith=kk,_.cloneWith=Nk,_.conformsTo=Bk,_.deburr=Y0,_.defaultTo=vB,_.divide=$B,_.endsWith=H5,_.eq=xr,_.escape=V5,_.escapeRegExp=j5,_.every=JL,_.find=tk,_.findIndex=x0,_.findKey=d5,_.findLast=ek,_.findLastIndex=b0,_.findLastKey=p5,_.floor=GB,_.forEach=E0,_.forEachRight=I0,_.forIn=g5,_.forInRight=m5,_.forOwn=v5,_.forOwnRight=y5,_.get=Zh,_.gt=Dk,_.gte=Uk,_.has=b5,_.hasIn=Jh,_.head=w0,_.identity=De,_.includes=ak,_.indexOf=eL,_.inRange=$5,_.invoke=S5,_.isArguments=zn,_.isArray=dt,_.isArrayBuffer=$k,_.isArrayLike=ke,_.isArrayLikeObject=he,_.isBoolean=Gk,_.isBuffer=dn,_.isDate=zk,_.isElement=Hk,_.isEmpty=Vk,_.isEqual=jk,_.isEqualWith=Xk,_.isError=Yh,_.isFinite=Wk,_.isFunction=Wr,_.isInteger=k0,_.isLength=ko,_.isMap=B0,_.isMatch=qk,_.isMatchWith=Yk,_.isNaN=Kk,_.isNative=Zk,_.isNil=Qk,_.isNull=Jk,_.isNumber=D0,_.isObject=se,_.isObjectLike=ae,_.isPlainObject=Ns,_.isRegExp=Kh,_.isSafeInteger=t5,_.isSet=U0,_.isString=Bo,_.isSymbol=Ve,_.isTypedArray=Ui,_.isUndefined=e5,_.isWeakMap=r5,_.isWeakSet=n5,_.join=aL,_.kebabCase=X5,_.last=rr,_.lastIndexOf=oL,_.lowerCase=W5,_.lowerFirst=q5,_.lt=i5,_.lte=s5,_.max=zB,_.maxBy=HB,_.mean=VB,_.meanBy=jB,_.min=XB,_.minBy=WB,_.stubArray=ic,_.stubFalse=sc,_.stubObject=OB,_.stubString=FB,_.stubTrue=NB,_.multiply=qB,_.nth=uL,_.noConflict=SB,_.noop=nc,_.now=Fo,_.pad=Y5,_.padEnd=K5,_.padStart=Z5,_.parseInt=J5,_.random=G5,_.reduce=ck,_.reduceRight=fk,_.repeat=Q5,_.replace=tB,_.result=M5,_.round=YB,_.runInContext=P,_.sample=pk,_.size=vk,_.snakeCase=eB,_.some=yk,_.sortedIndex=gL,_.sortedIndexBy=mL,_.sortedIndexOf=vL,_.sortedLastIndex=yL,_.sortedLastIndexBy=_L,_.sortedLastIndexOf=xL,_.startCase=nB,_.startsWith=iB,_.subtract=KB,_.sum=ZB,_.sumBy=JB,_.template=sB,_.times=LB,_.toFinite=qr,_.toInteger=pt,_.toLength=G0,_.toLower=aB,_.toNumber=nr,_.toSafeInteger=a5,_.toString=$t,_.toUpper=oB,_.trim=uB,_.trimEnd=lB,_.trimStart=hB,_.truncate=cB,_.unescape=fB,_.uniqueId=BB,_.upperCase=dB,_.upperFirst=Qh,_.each=E0,_.eachRight=I0,_.first=w0,rc(_,function(){var i={};return Pr(_,function(o,h){zt.call(_.prototype,h)||(i[h]=o)}),i}(),{chain:!1}),_.VERSION=n,Ze(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){_[i].placeholder=_}),Ze(["drop","take"],function(i,o){At.prototype[i]=function(h){h=h===r?1:ge(pt(h),0);var d=this.__filtered__&&!o?new At(this):this.clone();return d.__filtered__?d.__takeCount__=Ee(h,d.__takeCount__):d.__views__.push({size:Ee(h,K),type:i+(d.__dir__<0?"Right":"")}),d},At.prototype[i+"Right"]=function(h){return this.reverse()[i](h).reverse()}}),Ze(["filter","map","takeWhile"],function(i,o){var h=o+1,d=h==j||h==kt;At.prototype[i]=function(v){var b=this.clone();return b.__iteratees__.push({iteratee:ot(v,3),type:h}),b.__filtered__=b.__filtered__||d,b}}),Ze(["head","last"],function(i,o){var h="take"+(o?"Right":"");At.prototype[i]=function(){return this[h](1).value()[0]}}),Ze(["initial","tail"],function(i,o){var h="drop"+(o?"":"Right");At.prototype[i]=function(){return this.__filtered__?new At(this):this[h](1)}}),At.prototype.compact=function(){return this.filter(De)},At.prototype.find=function(i){return this.filter(i).head()},At.prototype.findLast=function(i){return this.reverse().find(i)},At.prototype.invokeMap=vt(function(i,o){return typeof i=="function"?new At(this):this.map(function(h){return Is(h,i,o)})}),At.prototype.reject=function(i){return this.filter(Lo(ot(i)))},At.prototype.slice=function(i,o){i=pt(i);var h=this;return h.__filtered__&&(i>0||o<0)?new At(h):(i<0?h=h.takeRight(-i):i&&(h=h.drop(i)),o!==r&&(o=pt(o),h=o<0?h.dropRight(-o):h.take(o-i)),h)},At.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},At.prototype.toArray=function(){return this.take(K)},Pr(At.prototype,function(i,o){var h=/^(?:filter|find|map|reject)|While$/.test(o),d=/^(?:head|last)$/.test(o),v=_[d?"take"+(o=="last"?"Right":""):o],b=d||/^find/.test(o);v&&(_.prototype[o]=function(){var C=this.__wrapped__,E=d?[1]:arguments,M=C instanceof At,D=E[0],U=M||dt(C),$=function(bt){var It=v.apply(_,an([bt],E));return d&&Y?It[0]:It};U&&h&&typeof D=="function"&&D.length!=1&&(M=U=!1);var Y=this.__chain__,et=!!this.__actions__.length,ut=b&&!Y,mt=M&&!et;if(!b&&U){C=mt?C:new At(this);var lt=i.apply(C,E);return lt.__actions__.push({func:Mo,args:[$],thisArg:r}),new Qe(lt,Y)}return ut&&mt?i.apply(this,E):(lt=this.thru($),ut?d?lt.value()[0]:lt.value():lt)})}),Ze(["pop","push","shift","sort","splice","unshift"],function(i){var o=ro[i],h=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",d=/^(?:pop|shift)$/.test(i);_.prototype[i]=function(){var v=arguments;if(d&&!this.__chain__){var b=this.value();return o.apply(dt(b)?b:[],v)}return this[h](function(C){return o.apply(dt(C)?C:[],v)})}}),Pr(At.prototype,function(i,o){var h=_[o];if(h){var d=h.name+"";zt.call(Ni,d)||(Ni[d]=[]),Ni[d].push({name:o,func:h})}}),Ni[So(r,w).name]=[{name:"wrapper",func:r}],At.prototype.clone=f3,At.prototype.reverse=d3,At.prototype.value=p3,_.prototype.at=HL,_.prototype.chain=VL,_.prototype.commit=jL,_.prototype.next=XL,_.prototype.plant=qL,_.prototype.reverse=YL,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=KL,_.prototype.first=_.prototype.head,bs&&(_.prototype[bs]=WL),_},Mi=jF();Nn?((Nn.exports=Mi)._=Mi,eh._=Mi):be._=Mi}).call(We)}(qa,qa.exports);var xg=qa.exports;const fO={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},bg=st.forwardRef((e,t)=>{const[r,n]=st.useState([]),[,s]=st.useState(0),[a,u]=st.useState([]),[,l]=W.useState(!1),[c,f]=rO({autoPlay:!1}),p=W.useRef(null),m=W.useRef(null),g=W.useRef(fO),x=W.useRef(),{tl:y,dragModeRef:S}=W.useContext(gn),{frames:T,delays:w}=c,{src:I,startAt:A,endAt:R,frameStartAt:N,frameEndAt:B,loop:L,visible:O,transformation:{width:z=0,height:X=0,x:tt,y:it,animation:V,colorCorrection:j={}},pointerdown:xt}=e,{temperatureFilter:kt,sharpnessFilter:G,hueFilter:rt,blurFilter:gt,adjustmentFilter:H}=cs(j),{blurRadius:K=0}=j,ct=.1;hO(I,f),we(ue.PAUSE,()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)}),we(ue.SEEK_END,()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)}),we(ue.SCRUBBER_CLICKED,()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)}),st.useEffect(()=>{g.current&&p.current&&(S.current?(p.current.stop(),g.current.isPlaying=!1,g.current.isDragging=!0):g.current.isDragging=!1)},[S]),st.useEffect(()=>{if(!Zo(T)){const J=OM(T,St=>{const{data:Et,width:Jt,height:gr}=St,Me=new Uint8Array(Et);return Fr.Texture.fromBuffer(Me,Jt,gr)}),q=J.map((St,Et)=>({texture:St,time:w[Et]}));n(J),u(q);let at=0;w.forEach(St=>{at+=St*10}),s(at),g.current.totalDuration=at,g.current.totalFrames=T.length}},[T,w]);const yt=xg.debounce(J=>{if(p.current){let q=J===0?0:J/ct;q=isNaN(q)?0:q;const at=g.current.totalFrames;q=q>at?at:q,q>=at?(p.current.gotoAndStop(0),g.current.isPlaying=!1):(p.current.gotoAndPlay(q||0),g.current.isPlaying=!0)}},20),wt=xg.debounce(()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)},50),Pt=J=>{if(p.current){let q=J===0?0:J/ct;q=isNaN(q)?0:q;const at=g.current.totalFrames;q=q>at?at:q,q>=at?(p.current.gotoAndStop(0),g.current.isPlaying=!1):(p.current.gotoAndPlay(q||0),g.current.isPlaying=!0)}},Ft=()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)},Vt=()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)},Ut=J=>{var at;const q=J+((at=x.current)==null?void 0:at.time());p.current&&S.current?(yt(q),wt(),g.current.isPlaying=!1):x.current&&p.current&&!g.current.isPlaying&&x.current.isActive()&&y.current.isActive()&&(yt(q),g.current.isPlaying=!0)},Zt=()=>{l(!0)};return W.useEffect(()=>{let J=oe.context(()=>{});if(m.current&&y.current){const q={duration:Number(B)-Number(N),onStart:Pt,onComplete:Ft,onStartParams:[N,B],onCompleteParams:[],onInterrupt:Vt,onUpdate:Ut,onUpdateParams:[N,B]};x.current&&x.current.kill(),J=oe.context(()=>{x.current=oe.from(m.current,q,N),y.current.add(x.current,A)})}return()=>{x.current&&(x.current.kill(),oe.killTweensOf(x.current)),J.revert()}},[V,A,R,N,B]),Mt.jsx(Wn,{...e,ref:t,ignoreTlForVideo:!0,isGif:!0,children:Mt.jsx(Yt.Container,{ref:m,children:r&&r.length>0&&Mt.jsx(_g,{x:tt,y:it,width:z,height:X,animationSpeed:1,alpha:O?1:0,loop:L,textures:a,onComplete:Zt,anchor:.5,forwardRef:p,...O&&{interactive:!0,pointerdown:xt},filters:[kt,G,rt,H,...K>0?[gt]:[]]})})})});bg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiGifSprite"};const dO=st.forwardRef((e,t)=>{const n=W.useRef(null),s=W.useRef(0),a=W.useRef(null),u=W.useRef(null),l=W.useRef(null),c=W.useRef(16),f=W.useRef(null),{visible:p,text:m,disabled:g,transformation:x,pointerdown:y,onDobuleClick:S}=e,{x:T,y:w,fontFamily:I="Arial",fontWeight:A="normal",fontStyle:R="normal",fontSize:N=16,fontVariant:B="normal",fill:L="black",stroke:O,strokeThickness:z=0,blurRadius:X=0,blurEnabled:tt=!1,dropShadowColor:it=null,dropShadow:V=!1,dropShadowBlur:j=0,wordWrapWidth:xt=5e7,leading:kt=0,letterSpacing:G,colorCorrection:rt={}}=x,{temperatureFilter:gt,sharpnessFilter:H,hueFilter:K,blurFilter:ct,adjustmentFilter:yt}=cs(rt),{blurRadius:wt=0}=rt;st.useEffect(()=>{c.current=Number(N)},[N]);const Pt=["italic","oblique"].includes(R)?R:void 0,Ft=["small-caps"].includes(B),Vt=["bold","bolder","lighter","100","200","300"].includes(A)?A:void 0,Ut=Number(G)>0?G:void 0,Zt=st.useMemo(()=>new Fr.TextStyle({fontFamily:I,fontSize:N,fill:L||"white",...O&&z>0&&{stroke:O,strokeThickness:z},...Pt&&{fontStyle:Pt},...Ft&&{fontVariant:Ft},...Vt&&{fontWeight:Vt},...Ut&&{letterSpacing:Ut},...tt&&{dropShadow:!0,dropShadowBlur:Number(X),dropShadowColor:(it==null?void 0:it.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...V&&{dropShadow:!0,dropShadowBlur:Number(j),dropShadowColor:(it==null?void 0:it.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:xt||500,leading:kt||0}),[tt,X,L,I,N,R,kt,Pt,Vt,Ft,Ut,it,O,z,xt,V,j]);st.useEffect(()=>{f.current={...x}},[x]);const J=()=>{const at=new Date().getTime();at-s.current<300&&S?S():y&&y(),s.current=at},q=()=>{S&&S()};return Mt.jsx(Wn,{...e,ref:t,isText:!0,onDoubleClick:q,children:Mt.jsxs(Yt.Container,{ref:n,children:[isEditing&&p&&Mt.jsx(Yt.Container,{ref:u}),Mt.jsx(Yt.Container,{alpha:isEditing?0:1,ref:l,children:Mt.jsx(Yt.Text,{style:Zt,x:T,y:w,anchor:.5,text:m,alpha:p?1:0,...p&&!g&&{interactive:!0,buttonMode:!0,pointerdown:J},ref:a,filters:[gt,H,K,yt,...wt>0?[ct]:[]]})})]})})}),pO=(e,t,r,n)=>{const s=W.useCallback(xi(e,n),[e,n]),a=W.useCallback(xi(t,n),[t,n]),u=W.useCallback(xi(r,n),[r,n]),l=W.useCallback(()=>{s()},[s]),c=W.useCallback(()=>{a()},[a]),f=W.useCallback(()=>{u()},[u]);return{onPointerOver:l,onPointerDown:c,onPointerOut:f}},gO={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},Tg=st.forwardRef((e,t)=>{const[r,n]=st.useState(0),[s,a]=st.useState(),u=W.useRef(null),l=W.useRef(null),c=W.useRef(null),f=W.useRef(gO),p=W.useRef(),{uniqueId:m,mute:g=!1,src:x,startAt:y,endAt:S,frameStartAt:T,frameEndAt:w,visible:I,transformation:{x:A,y:R,width:N,height:B,animation:L,colorCorrection:O={}},pointerdown:z=()=>{},pointerout:X=()=>{},pointerover:tt=()=>{}}=e,{tl:it,dragModeRef:V}=W.useContext(gn),{onPointerDown:j,onPointerOut:xt,onPointerOver:kt}=pO(tt,z,X,1),{blurRadius:G=0}=O,{temperatureFilter:rt,sharpnessFilter:gt,hueFilter:H,blurFilter:K,adjustmentFilter:ct}=cs(O),yt=x||"",wt=st.useMemo(()=>{const J=document.createElement("video");return J.src=x,J.crossOrigin="Anonymus",J.autoplay=!1,J.currentTime=T===0?.001:T,J},[x,T]);we(ue.PAUSE,()=>{c.current&&(c.current.pause(),f.current.isPlaying=!1)}),we(ue.SCRUBBER_CLICKED,()=>{c.current&&(c.current.pause(),f.current.isPlaying=!1)});const Pt=st.useCallback(xi(()=>{if(c.current){const J=c.current;J.currentTime>0&&!J.paused&&!J.ended&&J.readyState>J.HAVE_CURRENT_DATA&&c.current.pause(),f.current.isPlaying=!1}},400),[c]);st.useEffect(()=>{c.current?(V.current?(Pt(),f.current.isPlaying=!1,f.current.isDragging=!0):f.current.isDragging=!1,c.current.muted=g):f.current.isDragging=!1},[g,V,Pt,c]);const Ft=J=>{if(c.current){if(c.current.currentTime=Number(J),!V.current){const q=c.current,at=q.currentTime>0&&!q.paused&&!q.ended&&q.readyState>q.HAVE_CURRENT_DATA;it.current&&it.current.isActive()&&p.current&&p.current.isActive()&&(at||c.current.play(),f.current.isPlaying=!0,n(St=>St+1))}f.current.progress=0}},Vt=()=>{if(c.current){const J=c.current;J.currentTime>0&&!J.paused&&!J.ended&&J.readyState>J.HAVE_CURRENT_DATA&&c.current.pause(),f.current.isPlaying=!1,p.current&&(f.current.progress=p.current.progress())}},Ut=()=>{},Zt=()=>{var J,q;if(p.current&&(f.current.progress=p.current.progress()),c.current&&p.current){const at=T+((J=p==null?void 0:p.current)==null?void 0:J.time()),St=Math.abs(c.current.currentTime-at),Et=c.current,Jt=Et.currentTime>0&&!Et.paused&&!Et.ended&&Et.readyState>Et.HAVE_CURRENT_DATA;V.current?(c.current.currentTime=at,setTimeout(()=>{c.current&&c.current.play().then(()=>{f.current.isPlaying=!1,c.current&&c.current.pause()})},100),f.current.isPlaying=!1):(Jt!==f.current.isPlaying||!Jt)&&f.current.progress>.01&&f.current.progress<.99?(q=it.current)!=null&&q.isActive()&&p.current&&p.current.isActive()&&(Jt||c.current.play(),f.current.isPlaying=!0):St>.3&&f.current.progress>.01&&f.current.progress<.99&&(c.current.currentTime=at)}};return W.useEffect(()=>{let J=oe.context(()=>{});if(l.current&&it.current){const q={duration:Number(w)-Number(T),onStart:Ft,onComplete:Vt,onStartParams:[T,w],onCompleteParams:[],onInterrupt:Ut,onUpdate:Zt,onUpdateParams:[T,w]};J=oe.context(()=>{p.current=oe.from(l.current,q,T),it.current.add(p.current,y)})}return()=>{p.current&&(p.current.kill(),oe.killTweensOf(p.current)),J.revert()}},[L,y,S,T,w]),st.useEffect(()=>{c.current&&(c.current.muted=g)},[g]),st.useEffect(()=>{const J=Math.round((Number(T)+Number.EPSILON)*100)/100,q=function(){c.current&&(c.current.currentTime=J)},at=function(){if(c.current){const mr=c.current;mr.currentTime>0&&!mr.paused&&!mr.ended&&mr.readyState>mr.HAVE_CURRENT_DATA&&c.current.pause()}f.current.isWaiting=!1,f.current.isStalled=!1},St=function(){c.current&&c.current.pause(),f.current.isWaiting=!0,f.current.isStalled=!1},Et=function(){f.current.isWaiting=!1,f.current.isStalled=!1},Jt=function(){f.current.isWaiting=!1,f.current.isStalled=!0},gr=Math.round((Number(T)+Number.EPSILON)*100)/100,Me=Math.round((Number(w)+Number.EPSILON)*100)/100,$r=`${yt}#t=${gr},${Me}`;return Fr.Texture.fromLoader(wt,$r,m,{pixiIdPrefix:m,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(mr=>{mr&&(a(mr),c.current=mr.baseTexture.resource.source,c.current.id=m,c.current.addEventListener("loadedmetadata",q),c.current.addEventListener("ended",at),c.current.addEventListener("loadstart",St),c.current.addEventListener("canplaythrough",Et),c.current.addEventListener("stalled",Jt))}),()=>{c.current&&(c.current.pause(),c.current.removeEventListener("loadedmetadata",q),c.current.removeEventListener("ended",at),c.current.removeEventListener("loadstart",St),c.current.removeEventListener("canplaythrough",Et),c.current.removeEventListener("stalled",Jt))}},[yt,m,T,w,wt]),st.useEffect(()=>{const J=setTimeout(()=>{s&&p.current&&it.current&&p.current.progress()<.1&&c.current&&!p.current.isActive()&&c.current.play().then(()=>{f.current.isPlaying=!1,c.current&&c.current.pause()})},30);return()=>{clearTimeout(J)}},[s]),st.useEffect(()=>{it.current&&!it.current.isActive()&&(f.current.isPlaying=!1,c.current&&c.current.pause());const J=setTimeout(()=>{if(s&&it.current&&r>0){it.current.isActive()||(f.current.isPlaying=!1,c.current&&c.current.pause());const q=c.current;q&&it.current.isActive()&&p.current&&p.current.isActive()&&(q.currentTime>0&&!q.paused&&!q.ended&&q.readyState>q.HAVE_CURRENT_DATA||c.current.play(),f.current.isPlaying=!0)}},10);return()=>{clearTimeout(J)}},[r,s]),Mt.jsx(Wn,{...e,ref:t,ignoreTlForVideo:!0,pointerdown:j,pointerover:kt,pointerout:xt,children:Mt.jsx(Yt.Container,{ref:l,children:s&&Mt.jsx(Yt.Sprite,{texture:s,width:N,height:B,anchor:.5,x:A,y:R,ref:u,alpha:I?1:0,...I&&{interactive:!0,pointerdown:z},filters:[rt,gt,H,ct,...G>0?[K]:[]]})})})});Tg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const mO=e=>{const{startAt:t,endAt:r}=e,[n,s]=st.useState(!1),a=W.useRef(null),u=W.useRef(null),l=W.useRef(null),c=W.useRef(null),f=W.useRef(null),p=W.useRef(!1),m=W.useRef(!1),{tl:g,totalDuration:x=0,reverseModeRef:y}=W.useContext(gn),S=()=>{p.current||(p.current=!0,s(!0))},T=()=>{s(!1),p.current=!1},w=()=>{if(y.current&&c.current&&g.current){m.current=!0;const A=g.current.time();A>t&&A<r?(s(()=>!0),p.current=!0,u.current&&(u.current.alpha=1)):(s(()=>!1),p.current=!1,u.current&&(u.current.alpha=0))}},I=A=>{A<.2?(s(!0),p.current=!0):(s(!1),p.current=!1)};return st.useEffect(()=>{const A={onStart:S,onStartParams:[{alpha:1}]},R={onComplete:T,onCompleteParams:[{alpha:t>0?0:1}]},N=Math.max(0,t-1),B=oe.context(()=>{if(a.current&&g.current){const L=oe.from(a.current,{alpha:t<.2?1:0,duration:.5,...A});g.current.add(L,N),g.current.to(a.current,{alpha:0,duration:.5,overwrite:"auto",...R},r-.5),t<.2&&(s(!0),p.current=!0),c.current=oe.to(l.current,{alpha:1,overwrite:"auto",duration:Number(r)-Number(t),onStart:S,onStartParams:[{alpha:1}],onUpdate:w,onComplete:T,onCompleteParams:[{alpha:t>0?0:1}]},t),g.current.add(c.current,t),x>.2&&g.current.call(I,[t],x-.3)}});return()=>{var L;(L=c.current)==null||L.kill(),B.revert()}},[t,r,x]),st.useEffect(()=>{p.current=n;const A=oe.context(()=>{u.current&&g.current&&(f.current&&f.current.kill(),f.current=oe.to(u.current,{alpha:1,duration:.5,overwrite:"auto"}),g.current.add(f.current,t))}),R=setTimeout(()=>{var N,B,L,O;if(f.current&&g.current&&c.current&&!((N=f.current)!=null&&N.isActive())&&((B=f.current)==null?void 0:B.time())<.2){const z=(L=c.current)==null?void 0:L.time();(O=f.current)==null||O.time(z)}},50);return()=>{f.current&&f.current.kill(),A.revert(),clearInterval(R)}},[n,t]),Mt.jsx(Yt.Container,{ref:a,alpha:1,children:Mt.jsx(Yt.Container,{ref:l,children:n&&Mt.jsx(Yt.Container,{ref:u,alpha:t<.2?1:0,children:e.children})})})},vO=e=>{const{startAt:t,endAt:r}=e,{setTotalDuration:n}=W.useContext(gn);return st.useEffect(()=>{n&&n(r)},[t,r]),e.children};var wg=(e=>(e.FADE_IN="FADE_IN",e.FADE_OUT="FADE_OUT",e.FADE_IN_OUT="FADE_IN_OUT",e.SLIDE_IN_LEFT="SLIDE_IN_LEFT",e.SLIDE_IN_RIGHT="SLIDE_IN_RIGHT",e.SLIDE_IN_TOP="SLIDE_IN_TOP",e.SLIDE_IN_BOTTOM="SLIDE_IN_BOTTOM",e.SLIDE_OUT_LEFT="SLIDE_OUT_LEFT",e.SLIDE_OUT_RIGHT="SLIDE_OUT_RIGHT",e.SLIDE_OUT_TOP="SLIDE_OUT_TOP",e.SLIDE_OUT_BOTTOM="SLIDE_OUT_BOTTOM",e.ZOOM_IN="ZOOM_IN",e.ZOOM_OUT="ZOOM_OUT",e.ZOOM_IN_OUT="ZOOM_IN_OUT",e.BOUNCE_IN="BOUNCE_IN",e.BOUNCE_OUT="BOUNCE_OUT",e.BOUNCE_IN_OUT="BOUNCE_IN_OUT",e.ELASTIC_IN="ELASTIC_IN",e.ELASTIC_OUT="ELASTIC_OUT",e.ELASTIC_IN_OUT="ELASTIC_IN_OUT",e.BACK_IN="BACK_IN",e.BACK_OUT="BACK_OUT",e.BACK_IN_OUT="BACK_IN_OUT",e.CIRCULAR_IN="CIRCULAR_IN",e.CIRCULAR_OUT="CIRCULAR_OUT",e.CIRCULAR_IN_OUT="CIRCULAR_IN_OUT",e.EXPO_IN="EXPO_IN",e.EXPO_OUT="EXPO_OUT",e.EXPO_IN_OUT="EXPO_IN_OUT",e.SINE_IN="SINE_IN",e.SINE_OUT="SINE_OUT",e.SINE_IN_OUT="SINE_IN_OUT",e.BOUNCE="BOUNCE",e.ELASTIC="ELASTIC",e.BACK="BACK",e.CIRCULAR="CIRCULAR",e.EXPO="EXPO",e.SINE="SINE",e))(wg||{}),Sg=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e))(Sg||{});Ht.Animations=wg,Ht.BlendModes=Sg,Ht.Events=ue,Ht.GsapPixieContext=gn,Ht.GsapPixieContextProvider=dv,Ht.PixiAnimatedSprite=_g,Ht.PixiAudioSprite=MC,Ht.PixiGifSprite=bg,Ht.PixiImageSprite=pp,Ht.PixiSequence=mO,Ht.PixiSequenceWrapper=vO,Ht.PixiSvgPathSprite=rC,Ht.PixiTextSprite=dO,Ht.PixiVideoSprite=Tg,Ht.emitCustomEvent=Vn,Ht.newCustomEventEmitter=fv,Ht.useCustomEventListener=we,Object.defineProperty(Ht,Symbol.toStringTag,{value:"Module"})});
1960
+ }`;var mt=Z0(function(){return Bt(b,et+"return "+$).apply(r,C)});if(mt.source=$,Yh(mt))throw mt;return mt}function aB(i){return Ut(i).toLowerCase()}function oB(i){return Ut(i).toUpperCase()}function uB(i,o,h){if(i=Ut(i),i&&(h||o===r))return am(i);if(!i||!(o=He(o)))return i;var d=yr(i),v=yr(o),b=om(d,v),C=um(d,v)+1;return fn(d,b,C).join("")}function lB(i,o,h){if(i=Ut(i),i&&(h||o===r))return i.slice(0,hm(i)+1);if(!i||!(o=He(o)))return i;var d=yr(i),v=um(d,yr(o))+1;return fn(d,0,v).join("")}function hB(i,o,h){if(i=Ut(i),i&&(h||o===r))return i.replace(Yl,"");if(!i||!(o=He(o)))return i;var d=yr(i),v=om(d,yr(o));return fn(d,v).join("")}function cB(i,o){var h=X,d=tt;if(se(o)){var v="separator"in o?o.separator:v;h="length"in o?pt(o.length):h,d="omission"in o?He(o.omission):d}i=Ut(i);var b=i.length;if(Ri(i)){var C=yr(i);b=C.length}if(h>=b)return i;var E=h-Pi(d);if(E<1)return d;var M=C?fn(C,0,E).join(""):i.slice(0,E);if(v===r)return M+d;if(C&&(E+=M.length-E),Kh(v)){if(i.slice(E).search(v)){var D,U=M;for(v.global||(v=fh(v.source,Ut(Ig.exec(v))+"g")),v.lastIndex=0;D=v.exec(U);)var $=D.index;M=M.slice(0,$===r?E:$)}}else if(i.indexOf(He(v),E)!=E){var Y=M.lastIndexOf(v);Y>-1&&(M=M.slice(0,Y))}return M+d}function fB(i){return i=Ut(i),i&&wO.test(i)?i.replace(Ag,GF):i}var dB=Bi(function(i,o,h){return i+(h?" ":"")+o.toUpperCase()}),Qh=Jm("toUpperCase");function K0(i,o,h){return i=Ut(i),o=h?r:o,o===r?kF(i)?VF(i):EF(i):i.match(o)||[]}var Z0=vt(function(i,o){try{return Ge(i,r,o)}catch(h){return Yh(h)?h:new ft(h)}}),pB=jr(function(i,o){return Ze(o,function(h){h=Or(h),Hr(i,h,Wh(i[h],i))}),i});function gB(i){var o=i==null?0:i.length,h=ot();return i=o?ee(i,function(d){if(typeof d[1]!="function")throw new Je(u);return[h(d[0]),d[1]]}):[],vt(function(d){for(var v=-1;++v<o;){var b=i[v];if(Ge(b[0],this,d))return Ge(b[1],this,d)}})}function mB(i){return G3(tr(i,m))}function tc(i){return function(){return i}}function vB(i,o){return i==null||i!==i?o:i}var yB=t0(),_B=t0(!0);function De(i){return i}function ec(i){return Pm(typeof i=="function"?i:tr(i,m))}function xB(i){return Om(tr(i,m))}function bB(i,o){return Fm(i,tr(o,m))}var TB=vt(function(i,o){return function(h){return Is(h,i,o)}}),wB=vt(function(i,o){return function(h){return Is(i,h,o)}});function rc(i,o,h){var d=_e(o),v=_o(o,d);h==null&&!(se(o)&&(v.length||!d.length))&&(h=o,o=i,i=this,v=_o(o,_e(o)));var b=!(se(h)&&"chain"in h)||!!h.chain,C=Wr(i);return Ze(v,function(E){var M=o[E];i[E]=M,C&&(i.prototype[E]=function(){var D=this.__chain__;if(b||D){var U=i(this.__wrapped__),$=U.__actions__=Le(this.__actions__);return $.push({func:M,args:arguments,thisArg:i}),U.__chain__=D,U}return M.apply(i,an([this.value()],arguments))})}),i}function SB(){return be._===this&&(be._=KF),this}function nc(){}function AB(i){return i=pt(i),vt(function(o){return Nm(o,i)})}var CB=Nh(ee),EB=Nh(em),IB=Nh(sh);function J0(i){return Gh(i)?ah(Or(i)):iN(i)}function RB(i){return function(o){return i==null?r:Un(i,o)}}var PB=r0(),MB=r0(!0);function ic(){return[]}function sc(){return!1}function OB(){return{}}function FB(){return""}function NB(){return!0}function LB(i,o){if(i=pt(i),i<1||i>rt)return[];var h=K,d=Ee(i,K);o=ot(o),i-=K;for(var v=lh(d,o);++h<i;)o(h);return v}function kB(i){return dt(i)?ee(i,Or):Ve(i)?[i]:Le(y0(Ut(i)))}function BB(i){var o=++qF;return Ut(i)+o}var DB=Ao(function(i,o){return i+o},0),UB=Lh("ceil"),$B=Ao(function(i,o){return i/o},1),GB=Lh("floor");function zB(i){return i&&i.length?yo(i,De,xh):r}function HB(i,o){return i&&i.length?yo(i,ot(o,2),xh):r}function VB(i){return im(i,De)}function jB(i,o){return im(i,ot(o,2))}function XB(i){return i&&i.length?yo(i,De,Sh):r}function WB(i,o){return i&&i.length?yo(i,ot(o,2),Sh):r}var qB=Ao(function(i,o){return i*o},1),YB=Lh("round"),KB=Ao(function(i,o){return i-o},0);function ZB(i){return i&&i.length?uh(i,De):0}function JB(i,o){return i&&i.length?uh(i,ot(o,2)):0}return _.after=xk,_.ary=R0,_.assign=o5,_.assignIn=H0,_.assignInWith=Do,_.assignWith=u5,_.at=l5,_.before=P0,_.bind=Wh,_.bindAll=pB,_.bindKey=M0,_.castArray=Ok,_.chain=C0,_.chunk=GN,_.compact=zN,_.concat=HN,_.cond=gB,_.conforms=mB,_.constant=tc,_.countBy=ZL,_.create=h5,_.curry=O0,_.curryRight=F0,_.debounce=N0,_.defaults=c5,_.defaultsDeep=f5,_.defer=bk,_.delay=Tk,_.difference=VN,_.differenceBy=jN,_.differenceWith=XN,_.drop=WN,_.dropRight=qN,_.dropRightWhile=YN,_.dropWhile=KN,_.fill=ZN,_.filter=QL,_.flatMap=rk,_.flatMapDeep=nk,_.flatMapDepth=ik,_.flatten=T0,_.flattenDeep=JN,_.flattenDepth=QN,_.flip=wk,_.flow=yB,_.flowRight=_B,_.fromPairs=tL,_.functions=_5,_.functionsIn=x5,_.groupBy=sk,_.initial=rL,_.intersection=nL,_.intersectionBy=iL,_.intersectionWith=sL,_.invert=T5,_.invertBy=w5,_.invokeMap=ok,_.iteratee=ec,_.keyBy=uk,_.keys=_e,_.keysIn=Be,_.map=Oo,_.mapKeys=A5,_.mapValues=C5,_.matches=xB,_.matchesProperty=bB,_.memoize=No,_.merge=E5,_.mergeWith=V0,_.method=TB,_.methodOf=wB,_.mixin=rc,_.negate=Lo,_.nthArg=AB,_.omit=I5,_.omitBy=R5,_.once=Sk,_.orderBy=lk,_.over=CB,_.overArgs=Ak,_.overEvery=EB,_.overSome=IB,_.partial=qh,_.partialRight=L0,_.partition=hk,_.pick=P5,_.pickBy=j0,_.property=J0,_.propertyOf=RB,_.pull=lL,_.pullAll=S0,_.pullAllBy=hL,_.pullAllWith=cL,_.pullAt=fL,_.range=PB,_.rangeRight=MB,_.rearg=Ck,_.reject=dk,_.remove=dL,_.rest=Ek,_.reverse=jh,_.sampleSize=gk,_.set=O5,_.setWith=F5,_.shuffle=mk,_.slice=pL,_.sortBy=_k,_.sortedUniq=bL,_.sortedUniqBy=TL,_.split=rB,_.spread=Ik,_.tail=wL,_.take=SL,_.takeRight=AL,_.takeRightWhile=CL,_.takeWhile=EL,_.tap=zL,_.throttle=Rk,_.thru=Mo,_.toArray=$0,_.toPairs=X0,_.toPairsIn=W0,_.toPath=kB,_.toPlainObject=z0,_.transform=N5,_.unary=Pk,_.union=IL,_.unionBy=RL,_.unionWith=PL,_.uniq=ML,_.uniqBy=OL,_.uniqWith=FL,_.unset=L5,_.unzip=Xh,_.unzipWith=A0,_.update=k5,_.updateWith=B5,_.values=$i,_.valuesIn=D5,_.without=NL,_.words=K0,_.wrap=Mk,_.xor=LL,_.xorBy=kL,_.xorWith=BL,_.zip=DL,_.zipObject=UL,_.zipObjectDeep=$L,_.zipWith=GL,_.entries=X0,_.entriesIn=W0,_.extend=H0,_.extendWith=Do,rc(_,_),_.add=DB,_.attempt=Z0,_.camelCase=z5,_.capitalize=q0,_.ceil=UB,_.clamp=U5,_.clone=Fk,_.cloneDeep=Lk,_.cloneDeepWith=kk,_.cloneWith=Nk,_.conformsTo=Bk,_.deburr=Y0,_.defaultTo=vB,_.divide=$B,_.endsWith=H5,_.eq=xr,_.escape=V5,_.escapeRegExp=j5,_.every=JL,_.find=tk,_.findIndex=x0,_.findKey=d5,_.findLast=ek,_.findLastIndex=b0,_.findLastKey=p5,_.floor=GB,_.forEach=E0,_.forEachRight=I0,_.forIn=g5,_.forInRight=m5,_.forOwn=v5,_.forOwnRight=y5,_.get=Zh,_.gt=Dk,_.gte=Uk,_.has=b5,_.hasIn=Jh,_.head=w0,_.identity=De,_.includes=ak,_.indexOf=eL,_.inRange=$5,_.invoke=S5,_.isArguments=zn,_.isArray=dt,_.isArrayBuffer=$k,_.isArrayLike=ke,_.isArrayLikeObject=he,_.isBoolean=Gk,_.isBuffer=dn,_.isDate=zk,_.isElement=Hk,_.isEmpty=Vk,_.isEqual=jk,_.isEqualWith=Xk,_.isError=Yh,_.isFinite=Wk,_.isFunction=Wr,_.isInteger=k0,_.isLength=ko,_.isMap=B0,_.isMatch=qk,_.isMatchWith=Yk,_.isNaN=Kk,_.isNative=Zk,_.isNil=Qk,_.isNull=Jk,_.isNumber=D0,_.isObject=se,_.isObjectLike=ae,_.isPlainObject=Ns,_.isRegExp=Kh,_.isSafeInteger=t5,_.isSet=U0,_.isString=Bo,_.isSymbol=Ve,_.isTypedArray=Ui,_.isUndefined=e5,_.isWeakMap=r5,_.isWeakSet=n5,_.join=aL,_.kebabCase=X5,_.last=rr,_.lastIndexOf=oL,_.lowerCase=W5,_.lowerFirst=q5,_.lt=i5,_.lte=s5,_.max=zB,_.maxBy=HB,_.mean=VB,_.meanBy=jB,_.min=XB,_.minBy=WB,_.stubArray=ic,_.stubFalse=sc,_.stubObject=OB,_.stubString=FB,_.stubTrue=NB,_.multiply=qB,_.nth=uL,_.noConflict=SB,_.noop=nc,_.now=Fo,_.pad=Y5,_.padEnd=K5,_.padStart=Z5,_.parseInt=J5,_.random=G5,_.reduce=ck,_.reduceRight=fk,_.repeat=Q5,_.replace=tB,_.result=M5,_.round=YB,_.runInContext=P,_.sample=pk,_.size=vk,_.snakeCase=eB,_.some=yk,_.sortedIndex=gL,_.sortedIndexBy=mL,_.sortedIndexOf=vL,_.sortedLastIndex=yL,_.sortedLastIndexBy=_L,_.sortedLastIndexOf=xL,_.startCase=nB,_.startsWith=iB,_.subtract=KB,_.sum=ZB,_.sumBy=JB,_.template=sB,_.times=LB,_.toFinite=qr,_.toInteger=pt,_.toLength=G0,_.toLower=aB,_.toNumber=nr,_.toSafeInteger=a5,_.toString=Ut,_.toUpper=oB,_.trim=uB,_.trimEnd=lB,_.trimStart=hB,_.truncate=cB,_.unescape=fB,_.uniqueId=BB,_.upperCase=dB,_.upperFirst=Qh,_.each=E0,_.eachRight=I0,_.first=w0,rc(_,function(){var i={};return Pr(_,function(o,h){Gt.call(_.prototype,h)||(i[h]=o)}),i}(),{chain:!1}),_.VERSION=n,Ze(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){_[i].placeholder=_}),Ze(["drop","take"],function(i,o){St.prototype[i]=function(h){h=h===r?1:ge(pt(h),0);var d=this.__filtered__&&!o?new St(this):this.clone();return d.__filtered__?d.__takeCount__=Ee(h,d.__takeCount__):d.__views__.push({size:Ee(h,K),type:i+(d.__dir__<0?"Right":"")}),d},St.prototype[i+"Right"]=function(h){return this.reverse()[i](h).reverse()}}),Ze(["filter","map","takeWhile"],function(i,o){var h=o+1,d=h==j||h==kt;St.prototype[i]=function(v){var b=this.clone();return b.__iteratees__.push({iteratee:ot(v,3),type:h}),b.__filtered__=b.__filtered__||d,b}}),Ze(["head","last"],function(i,o){var h="take"+(o?"Right":"");St.prototype[i]=function(){return this[h](1).value()[0]}}),Ze(["initial","tail"],function(i,o){var h="drop"+(o?"":"Right");St.prototype[i]=function(){return this.__filtered__?new St(this):this[h](1)}}),St.prototype.compact=function(){return this.filter(De)},St.prototype.find=function(i){return this.filter(i).head()},St.prototype.findLast=function(i){return this.reverse().find(i)},St.prototype.invokeMap=vt(function(i,o){return typeof i=="function"?new St(this):this.map(function(h){return Is(h,i,o)})}),St.prototype.reject=function(i){return this.filter(Lo(ot(i)))},St.prototype.slice=function(i,o){i=pt(i);var h=this;return h.__filtered__&&(i>0||o<0)?new St(h):(i<0?h=h.takeRight(-i):i&&(h=h.drop(i)),o!==r&&(o=pt(o),h=o<0?h.dropRight(-o):h.take(o-i)),h)},St.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},St.prototype.toArray=function(){return this.take(K)},Pr(St.prototype,function(i,o){var h=/^(?:filter|find|map|reject)|While$/.test(o),d=/^(?:head|last)$/.test(o),v=_[d?"take"+(o=="last"?"Right":""):o],b=d||/^find/.test(o);v&&(_.prototype[o]=function(){var C=this.__wrapped__,E=d?[1]:arguments,M=C instanceof St,D=E[0],U=M||dt(C),$=function(Tt){var It=v.apply(_,an([Tt],E));return d&&Y?It[0]:It};U&&h&&typeof D=="function"&&D.length!=1&&(M=U=!1);var Y=this.__chain__,et=!!this.__actions__.length,ut=b&&!Y,mt=M&&!et;if(!b&&U){C=mt?C:new St(this);var lt=i.apply(C,E);return lt.__actions__.push({func:Mo,args:[$],thisArg:r}),new Qe(lt,Y)}return ut&&mt?i.apply(this,E):(lt=this.thru($),ut?d?lt.value()[0]:lt.value():lt)})}),Ze(["pop","push","shift","sort","splice","unshift"],function(i){var o=ro[i],h=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",d=/^(?:pop|shift)$/.test(i);_.prototype[i]=function(){var v=arguments;if(d&&!this.__chain__){var b=this.value();return o.apply(dt(b)?b:[],v)}return this[h](function(C){return o.apply(dt(C)?C:[],v)})}}),Pr(St.prototype,function(i,o){var h=_[o];if(h){var d=h.name+"";Gt.call(Ni,d)||(Ni[d]=[]),Ni[d].push({name:o,func:h})}}),Ni[So(r,w).name]=[{name:"wrapper",func:r}],St.prototype.clone=f3,St.prototype.reverse=d3,St.prototype.value=p3,_.prototype.at=HL,_.prototype.chain=VL,_.prototype.commit=jL,_.prototype.next=XL,_.prototype.plant=qL,_.prototype.reverse=YL,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=KL,_.prototype.first=_.prototype.head,bs&&(_.prototype[bs]=WL),_},Mi=jF();Nn?((Nn.exports=Mi)._=Mi,eh._=Mi):be._=Mi}).call(We)}(qa,qa.exports);var xg=qa.exports;const fO={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},bg=it.forwardRef((e,t)=>{const[r,n]=it.useState([]),[,s]=it.useState(0),[a,u]=it.useState([]),[,l]=q.useState(!1),[c,f]=rO({autoPlay:!1}),p=q.useRef(null),m=q.useRef(null),g=q.useRef(fO),x=q.useRef(),{tl:y,dragModeRef:S}=q.useContext(gn),{frames:T,delays:w}=c,{src:I,startAt:A,endAt:R,frameStartAt:N,frameEndAt:B,loop:L,visible:O,transformation:{width:z=0,height:X=0,x:tt,y:st,animation:V,colorCorrection:j={}},pointerdown:bt}=e,{temperatureFilter:kt,sharpnessFilter:G,hueFilter:rt,blurFilter:gt,adjustmentFilter:H}=cs(j),{blurRadius:K=0}=j,ct=.1;hO(I,f),we(ue.PAUSE,()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)}),we(ue.SEEK_END,()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)}),we(ue.SCRUBBER_CLICKED,()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)}),it.useEffect(()=>{g.current&&p.current&&(S.current?(p.current.stop(),g.current.isPlaying=!1,g.current.isDragging=!0):g.current.isDragging=!1)},[S]),it.useEffect(()=>{if(!Zo(T)){const J=OM(T,Ct=>{const{data:Et,width:Zt,height:gr}=Ct,Me=new Uint8Array(Et);return Fr.Texture.fromBuffer(Me,Zt,gr)}),W=J.map((Ct,Et)=>({texture:Ct,time:w[Et]}));n(J),u(W);let at=0;w.forEach(Ct=>{at+=Ct*10}),s(at),g.current.totalDuration=at,g.current.totalFrames=T.length}},[T,w]);const yt=xg.debounce(J=>{if(p.current){let W=J===0?0:J/ct;W=isNaN(W)?0:W;const at=g.current.totalFrames;W=W>at?at:W,W>=at?(p.current.gotoAndStop(0),g.current.isPlaying=!1):(p.current.gotoAndPlay(W||0),g.current.isPlaying=!0)}},20),_t=xg.debounce(()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)},50),Pt=J=>{if(p.current){let W=J===0?0:J/ct;W=isNaN(W)?0:W;const at=g.current.totalFrames;W=W>at?at:W,W>=at?(p.current.gotoAndStop(0),g.current.isPlaying=!1):(p.current.gotoAndPlay(W||0),g.current.isPlaying=!0)}},Ot=()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)},Ht=()=>{p.current&&(p.current.stop(),g.current.isPlaying=!1)},Vt=J=>{var at;const W=J+((at=x.current)==null?void 0:at.time());p.current&&S.current?(yt(W),_t(),g.current.isPlaying=!1):x.current&&p.current&&!g.current.isPlaying&&x.current.isActive()&&y.current.isActive()&&(yt(W),g.current.isPlaying=!0)},Kt=()=>{l(!0)};return q.useEffect(()=>{let J=oe.context(()=>{});if(m.current&&y.current){const W={duration:Number(B)-Number(N),onStart:Pt,onComplete:Ot,onStartParams:[N,B],onCompleteParams:[],onInterrupt:Ht,onUpdate:Vt,onUpdateParams:[N,B]};x.current&&x.current.kill(),J=oe.context(()=>{x.current=oe.from(m.current,W,N),y.current.add(x.current,A)})}return()=>{x.current&&(x.current.kill(),oe.killTweensOf(x.current)),J.revert()}},[V,A,R,N,B]),Ft.jsx(Wn,{...e,ref:t,ignoreTlForVideo:!0,isGif:!0,children:Ft.jsx(Qt.Container,{ref:m,children:r&&r.length>0&&Ft.jsx(_g,{x:tt,y:st,width:z,height:X,animationSpeed:1,alpha:O?1:0,loop:L,textures:a,onComplete:Kt,anchor:.5,forwardRef:p,...O&&{interactive:!0,pointerdown:bt},filters:[kt,G,rt,H,...K>0?[gt]:[]]})})})});bg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiGifSprite"};const dO=it.forwardRef((e,t)=>{const n=q.useRef(null),s=q.useRef(0),a=q.useRef(null),u=q.useRef(null),l=q.useRef(16),c=q.useRef(null),{visible:f,text:p,disabled:m,transformation:g,pointerdown:x,onDobuleClick:y}=e,{x:S,y:T,fontFamily:w="Arial",fontWeight:I="normal",fontStyle:A="normal",fontSize:R=16,fontVariant:N="normal",fill:B="black",stroke:L,strokeThickness:O=0,blurRadius:z=0,blurEnabled:X=!1,dropShadowColor:tt=null,dropShadow:st=!1,dropShadowBlur:V=0,wordWrapWidth:j=5e7,leading:bt=0,letterSpacing:kt,colorCorrection:G={}}=g,{temperatureFilter:rt,sharpnessFilter:gt,hueFilter:H,blurFilter:K,adjustmentFilter:ct}=cs(G),{blurRadius:yt=0}=G;it.useEffect(()=>{l.current=Number(R)},[R]);const _t=["italic","oblique"].includes(A)?A:void 0,Pt=["small-caps"].includes(N),Ot=["bold","bolder","lighter","100","200","300"].includes(I)?I:void 0,Ht=Number(kt)>0?kt:void 0,Vt=it.useMemo(()=>new Fr.TextStyle({fontFamily:w,fontSize:R,fill:B||"white",...L&&O>0&&{stroke:L,strokeThickness:O},..._t&&{fontStyle:_t},...Pt&&{fontVariant:Pt},...Ot&&{fontWeight:Ot},...Ht&&{letterSpacing:Ht},...X&&{dropShadow:!0,dropShadowBlur:Number(z),dropShadowColor:(tt==null?void 0:tt.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},...st&&{dropShadow:!0,dropShadowBlur:Number(V),dropShadowColor:(tt==null?void 0:tt.toString())||"black",dropShadowAngle:.5235987755982988,dropShadowDistance:5},wordWrap:!0,breakWords:!0,wordWrapWidth:j||500,leading:bt||0}),[X,z,B,w,R,A,bt,_t,Ot,Pt,Ht,tt,L,O,j,st,V]);it.useEffect(()=>{c.current={...g}},[g]);const Kt=()=>{const W=new Date().getTime();W-s.current<300&&y?y():x&&x(),s.current=W},J=()=>{y&&y()};return Ft.jsx(Wn,{...e,ref:t,isText:!0,onDoubleClick:J,children:Ft.jsx(Qt.Container,{ref:n,children:Ft.jsx(Qt.Container,{alpha:1,ref:u,children:Ft.jsx(Qt.Text,{style:Vt,x:S,y:T,anchor:.5,text:p,alpha:f?1:0,...f&&!m&&{interactive:!0,buttonMode:!0,pointerdown:Kt},ref:a,filters:[rt,gt,H,ct,...yt>0?[K]:[]]})})})})}),pO=(e,t,r,n)=>{const s=q.useCallback(xi(e,n),[e,n]),a=q.useCallback(xi(t,n),[t,n]),u=q.useCallback(xi(r,n),[r,n]),l=q.useCallback(()=>{s()},[s]),c=q.useCallback(()=>{a()},[a]),f=q.useCallback(()=>{u()},[u]);return{onPointerOver:l,onPointerDown:c,onPointerOut:f}},gO={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,isStalled:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,timeDiff:0},Tg=it.forwardRef((e,t)=>{const[r,n]=it.useState(0),[s,a]=it.useState(),u=q.useRef(null),l=q.useRef(null),c=q.useRef(null),f=q.useRef(gO),p=q.useRef(),{uniqueId:m,mute:g=!1,src:x,startAt:y,endAt:S,frameStartAt:T,frameEndAt:w,visible:I,transformation:{x:A,y:R,width:N,height:B,animation:L,colorCorrection:O={}},pointerdown:z=()=>{},pointerout:X=()=>{},pointerover:tt=()=>{}}=e,{tl:st,dragModeRef:V}=q.useContext(gn),{onPointerDown:j,onPointerOut:bt,onPointerOver:kt}=pO(tt,z,X,1),{blurRadius:G=0}=O,{temperatureFilter:rt,sharpnessFilter:gt,hueFilter:H,blurFilter:K,adjustmentFilter:ct}=cs(O),yt=x||"",_t=it.useMemo(()=>{const J=document.createElement("video");return J.src=x,J.crossOrigin="Anonymus",J.autoplay=!1,J.currentTime=T===0?.001:T,J},[x,T]);we(ue.PAUSE,()=>{c.current&&(c.current.pause(),f.current.isPlaying=!1)}),we(ue.SCRUBBER_CLICKED,()=>{c.current&&(c.current.pause(),f.current.isPlaying=!1)});const Pt=it.useCallback(xi(()=>{if(c.current){const J=c.current;J.currentTime>0&&!J.paused&&!J.ended&&J.readyState>J.HAVE_CURRENT_DATA&&c.current.pause(),f.current.isPlaying=!1}},400),[c]);it.useEffect(()=>{c.current?(V.current?(Pt(),f.current.isPlaying=!1,f.current.isDragging=!0):f.current.isDragging=!1,c.current.muted=g):f.current.isDragging=!1},[g,V,Pt,c]);const Ot=J=>{if(c.current){if(c.current.currentTime=Number(J),!V.current){const W=c.current,at=W.currentTime>0&&!W.paused&&!W.ended&&W.readyState>W.HAVE_CURRENT_DATA;st.current&&st.current.isActive()&&p.current&&p.current.isActive()&&(at||c.current.play(),f.current.isPlaying=!0,n(Ct=>Ct+1))}f.current.progress=0}},Ht=()=>{if(c.current){const J=c.current;J.currentTime>0&&!J.paused&&!J.ended&&J.readyState>J.HAVE_CURRENT_DATA&&c.current.pause(),f.current.isPlaying=!1,p.current&&(f.current.progress=p.current.progress())}},Vt=()=>{},Kt=()=>{var J,W;if(p.current&&(f.current.progress=p.current.progress()),c.current&&p.current){const at=T+((J=p==null?void 0:p.current)==null?void 0:J.time()),Ct=Math.abs(c.current.currentTime-at),Et=c.current,Zt=Et.currentTime>0&&!Et.paused&&!Et.ended&&Et.readyState>Et.HAVE_CURRENT_DATA;V.current?(c.current.currentTime=at,setTimeout(()=>{c.current&&c.current.play().then(()=>{f.current.isPlaying=!1,c.current&&c.current.pause()})},100),f.current.isPlaying=!1):(Zt!==f.current.isPlaying||!Zt)&&f.current.progress>.01&&f.current.progress<.99?(W=st.current)!=null&&W.isActive()&&p.current&&p.current.isActive()&&(Zt||c.current.play(),f.current.isPlaying=!0):Ct>.3&&f.current.progress>.01&&f.current.progress<.99&&(c.current.currentTime=at)}};return q.useEffect(()=>{let J=oe.context(()=>{});if(l.current&&st.current){const W={duration:Number(w)-Number(T),onStart:Ot,onComplete:Ht,onStartParams:[T,w],onCompleteParams:[],onInterrupt:Vt,onUpdate:Kt,onUpdateParams:[T,w]};J=oe.context(()=>{p.current=oe.from(l.current,W,T),st.current.add(p.current,y)})}return()=>{p.current&&(p.current.kill(),oe.killTweensOf(p.current)),J.revert()}},[L,y,S,T,w]),it.useEffect(()=>{c.current&&(c.current.muted=g)},[g]),it.useEffect(()=>{const J=Math.round((Number(T)+Number.EPSILON)*100)/100,W=function(){c.current&&(c.current.currentTime=J)},at=function(){if(c.current){const mr=c.current;mr.currentTime>0&&!mr.paused&&!mr.ended&&mr.readyState>mr.HAVE_CURRENT_DATA&&c.current.pause()}f.current.isWaiting=!1,f.current.isStalled=!1},Ct=function(){c.current&&c.current.pause(),f.current.isWaiting=!0,f.current.isStalled=!1},Et=function(){f.current.isWaiting=!1,f.current.isStalled=!1},Zt=function(){f.current.isWaiting=!1,f.current.isStalled=!0},gr=Math.round((Number(T)+Number.EPSILON)*100)/100,Me=Math.round((Number(w)+Number.EPSILON)*100)/100,$r=`${yt}#t=${gr},${Me}`;return Fr.Texture.fromLoader(_t,$r,m,{pixiIdPrefix:m,resourceOptions:{autoPlay:!1,crossorigin:"Anonymus",updateFPS:30}}).then(mr=>{mr&&(a(mr),c.current=mr.baseTexture.resource.source,c.current.id=m,c.current.addEventListener("loadedmetadata",W),c.current.addEventListener("ended",at),c.current.addEventListener("loadstart",Ct),c.current.addEventListener("canplaythrough",Et),c.current.addEventListener("stalled",Zt))}),()=>{c.current&&(c.current.pause(),c.current.removeEventListener("loadedmetadata",W),c.current.removeEventListener("ended",at),c.current.removeEventListener("loadstart",Ct),c.current.removeEventListener("canplaythrough",Et),c.current.removeEventListener("stalled",Zt))}},[yt,m,T,w,_t]),it.useEffect(()=>{const J=setTimeout(()=>{s&&p.current&&st.current&&p.current.progress()<.1&&c.current&&!p.current.isActive()&&c.current.play().then(()=>{f.current.isPlaying=!1,c.current&&c.current.pause()})},30);return()=>{clearTimeout(J)}},[s]),it.useEffect(()=>{st.current&&!st.current.isActive()&&(f.current.isPlaying=!1,c.current&&c.current.pause());const J=setTimeout(()=>{if(s&&st.current&&r>0){st.current.isActive()||(f.current.isPlaying=!1,c.current&&c.current.pause());const W=c.current;W&&st.current.isActive()&&p.current&&p.current.isActive()&&(W.currentTime>0&&!W.paused&&!W.ended&&W.readyState>W.HAVE_CURRENT_DATA||c.current.play(),f.current.isPlaying=!0)}},10);return()=>{clearTimeout(J)}},[r,s]),Ft.jsx(Wn,{...e,ref:t,ignoreTlForVideo:!0,pointerdown:j,pointerover:kt,pointerout:bt,children:Ft.jsx(Qt.Container,{ref:l,children:s&&Ft.jsx(Qt.Sprite,{texture:s,width:N,height:B,anchor:.5,x:A,y:R,ref:u,alpha:I?1:0,...I&&{interactive:!0,pointerdown:z},filters:[rt,gt,H,ct,...G>0?[K]:[]]})})})});Tg.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiVideoSprite"};const mO=e=>{const{startAt:t,endAt:r}=e,[n,s]=it.useState(!1),a=q.useRef(null),u=q.useRef(null),l=q.useRef(null),c=q.useRef(null),f=q.useRef(null),p=q.useRef(!1),m=q.useRef(!1),{tl:g,totalDuration:x=0,reverseModeRef:y}=q.useContext(gn),S=()=>{p.current||(p.current=!0,s(!0))},T=()=>{s(!1),p.current=!1},w=()=>{if(y.current&&c.current&&g.current){m.current=!0;const A=g.current.time();A>t&&A<r?(s(()=>!0),p.current=!0,u.current&&(u.current.alpha=1)):(s(()=>!1),p.current=!1,u.current&&(u.current.alpha=0))}},I=A=>{A<.2?(s(!0),p.current=!0):(s(!1),p.current=!1)};return it.useEffect(()=>{const A={onStart:S,onStartParams:[{alpha:1}]},R={onComplete:T,onCompleteParams:[{alpha:t>0?0:1}]},N=Math.max(0,t-1),B=oe.context(()=>{if(a.current&&g.current){const L=oe.from(a.current,{alpha:t<.2?1:0,duration:.5,...A});g.current.add(L,N),g.current.to(a.current,{alpha:0,duration:.5,overwrite:"auto",...R},r-.5),t<.2&&(s(!0),p.current=!0),c.current=oe.to(l.current,{alpha:1,overwrite:"auto",duration:Number(r)-Number(t),onStart:S,onStartParams:[{alpha:1}],onUpdate:w,onComplete:T,onCompleteParams:[{alpha:t>0?0:1}]},t),g.current.add(c.current,t),x>.2&&g.current.call(I,[t],x-.3)}});return()=>{var L;(L=c.current)==null||L.kill(),B.revert()}},[t,r,x]),it.useEffect(()=>{p.current=n;const A=oe.context(()=>{u.current&&g.current&&(f.current&&f.current.kill(),f.current=oe.to(u.current,{alpha:1,duration:.5,overwrite:"auto"}),g.current.add(f.current,t))}),R=setTimeout(()=>{var N,B,L,O;if(f.current&&g.current&&c.current&&!((N=f.current)!=null&&N.isActive())&&((B=f.current)==null?void 0:B.time())<.2){const z=(L=c.current)==null?void 0:L.time();(O=f.current)==null||O.time(z)}},50);return()=>{f.current&&f.current.kill(),A.revert(),clearInterval(R)}},[n,t]),Ft.jsx(Qt.Container,{ref:a,alpha:1,children:Ft.jsx(Qt.Container,{ref:l,children:n&&Ft.jsx(Qt.Container,{ref:u,alpha:t<.2?1:0,children:e.children})})})},vO=e=>{const{startAt:t,endAt:r}=e,{setTotalDuration:n}=q.useContext(gn);return it.useEffect(()=>{n&&n(r)},[t,r]),e.children};var wg=(e=>(e.FADE_IN="FADE_IN",e.FADE_OUT="FADE_OUT",e.FADE_IN_OUT="FADE_IN_OUT",e.SLIDE_IN_LEFT="SLIDE_IN_LEFT",e.SLIDE_IN_RIGHT="SLIDE_IN_RIGHT",e.SLIDE_IN_TOP="SLIDE_IN_TOP",e.SLIDE_IN_BOTTOM="SLIDE_IN_BOTTOM",e.SLIDE_OUT_LEFT="SLIDE_OUT_LEFT",e.SLIDE_OUT_RIGHT="SLIDE_OUT_RIGHT",e.SLIDE_OUT_TOP="SLIDE_OUT_TOP",e.SLIDE_OUT_BOTTOM="SLIDE_OUT_BOTTOM",e.ZOOM_IN="ZOOM_IN",e.ZOOM_OUT="ZOOM_OUT",e.ZOOM_IN_OUT="ZOOM_IN_OUT",e.BOUNCE_IN="BOUNCE_IN",e.BOUNCE_OUT="BOUNCE_OUT",e.BOUNCE_IN_OUT="BOUNCE_IN_OUT",e.ELASTIC_IN="ELASTIC_IN",e.ELASTIC_OUT="ELASTIC_OUT",e.ELASTIC_IN_OUT="ELASTIC_IN_OUT",e.BACK_IN="BACK_IN",e.BACK_OUT="BACK_OUT",e.BACK_IN_OUT="BACK_IN_OUT",e.CIRCULAR_IN="CIRCULAR_IN",e.CIRCULAR_OUT="CIRCULAR_OUT",e.CIRCULAR_IN_OUT="CIRCULAR_IN_OUT",e.EXPO_IN="EXPO_IN",e.EXPO_OUT="EXPO_OUT",e.EXPO_IN_OUT="EXPO_IN_OUT",e.SINE_IN="SINE_IN",e.SINE_OUT="SINE_OUT",e.SINE_IN_OUT="SINE_IN_OUT",e.BOUNCE="BOUNCE",e.ELASTIC="ELASTIC",e.BACK="BACK",e.CIRCULAR="CIRCULAR",e.EXPO="EXPO",e.SINE="SINE",e))(wg||{}),Sg=(e=>(e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e))(Sg||{});zt.Animations=wg,zt.BlendModes=Sg,zt.Events=ue,zt.GsapPixieContext=gn,zt.GsapPixieContextProvider=dv,zt.PixiAnimatedSprite=_g,zt.PixiAudioSprite=MC,zt.PixiGifSprite=bg,zt.PixiImageSprite=pp,zt.PixiSequence=mO,zt.PixiSequenceWrapper=vO,zt.PixiSvgPathSprite=rC,zt.PixiTextSprite=dO,zt.PixiVideoSprite=Tg,zt.emitCustomEvent=Vn,zt.newCustomEventEmitter=fv,zt.useCustomEventListener=we,Object.defineProperty(zt,Symbol.toStringTag,{value:"Module"})});