reacthub-pixitweenjs 0.2.53 → 0.2.55
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.es.js +7 -4
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -8106,7 +8106,9 @@ const Ai = /* @__PURE__ */ Zn(vR), gR = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1,
|
|
|
8106
8106
|
pointerdown: X,
|
|
8107
8107
|
pointerout: z,
|
|
8108
8108
|
pointerover: it
|
|
8109
|
-
} = e
|
|
8109
|
+
} = e;
|
|
8110
|
+
console.log("abstractallProps", e);
|
|
8111
|
+
const {
|
|
8110
8112
|
contrast: Z = 1,
|
|
8111
8113
|
saturation: $ = 1,
|
|
8112
8114
|
brightness: M = 1,
|
|
@@ -8169,7 +8171,7 @@ const Ai = /* @__PURE__ */ Zn(vR), gR = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1,
|
|
|
8169
8171
|
...!Ai(V) && { adjust: mO },
|
|
8170
8172
|
matrix: Wn.filters.ColorMatrixFilter
|
|
8171
8173
|
}), et = (R == null ? void 0 : R.enabled) || C && C !== Dn.Normal;
|
|
8172
|
-
return /* @__PURE__ */ Qt.jsxs(Ue, { ref: d, children: [
|
|
8174
|
+
return console.log("uniqueId + alpha", b, y.current, f), /* @__PURE__ */ Qt.jsxs(Ue, { ref: d, children: [
|
|
8173
8175
|
/* @__PURE__ */ Qt.jsx(
|
|
8174
8176
|
Ue,
|
|
8175
8177
|
{
|
|
@@ -8208,7 +8210,8 @@ const Ai = /* @__PURE__ */ Zn(vR), gR = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1,
|
|
|
8208
8210
|
),
|
|
8209
8211
|
!et && /* @__PURE__ */ Qt.jsx(Ue, { ref: c, children: e.children })
|
|
8210
8212
|
] })
|
|
8211
|
-
}
|
|
8213
|
+
},
|
|
8214
|
+
b
|
|
8212
8215
|
),
|
|
8213
8216
|
k && /* @__PURE__ */ Qt.jsx(
|
|
8214
8217
|
_O,
|
|
@@ -8222,7 +8225,7 @@ const Ai = /* @__PURE__ */ Zn(vR), gR = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1,
|
|
|
8222
8225
|
uniqueId: b
|
|
8223
8226
|
}
|
|
8224
8227
|
)
|
|
8225
|
-
] });
|
|
8228
|
+
] }, b);
|
|
8226
8229
|
});
|
|
8227
8230
|
qi.whyDidYouRender = {
|
|
8228
8231
|
logOnDifferentValues: !0,
|
package/dist/index.umd.js
CHANGED
|
@@ -536,7 +536,7 @@ void main(void)
|
|
|
536
536
|
|
|
537
537
|
gl_FragColor = c * alpha;
|
|
538
538
|
}
|
|
539
|
-
`;class R1 extends Wr{constructor(t){super(O1,I1),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,t)}apply(t,r,n,i){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,t.applyFilter(this,r,n,i)}}var Bn=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(Bn||{});const C1=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:a,onDoubleClick:l,uniqueId:u=""})=>{const f=wn.utils.string2hex("#F3C409"),h=wn.utils.string2hex("#F3C409"),p=Tt.useRef({isDragging:!1}),d=Tt.useCallback(()=>{a&&!p.current.isDragging&&a(!0)},[a]),c=Tt.useCallback(()=>{a&&!p.current.isDragging&&a(!1)},[a]),v=Tt.useCallback(()=>{p.current.isDragging=!0},[]),y=Tt.useCallback(()=>{p.current.isDragging=!1},[]),m=Tt.useCallback(()=>{p.current.isDragging=!1},[]),b=Tt.useCallback(()=>{console.log("dobule click in pixi transformer"),l&&l({uniqueId:u})},[l]),_=Tt.useCallback(w=>{p.current.isDragging=!0,i&&i(w)},[i]),E=Tt.useCallback(()=>{if(t.current===null)return;const w=t.current.x,x=t.current.y,A=t.current.width,C=t.current.height,S=t.current.rotation,O=[t.current.scale.x,t.current.scale.y];n&&n({uniqueId:u,transformation:{x:Math.round(w),y:Math.round(x),width:Math.round(Math.max(5,A)),height:Math.round(Math.max(5,C)),rotation:S,scale:O}}),p.current.isDragging=!1},[n]);return Tt.useEffect(()=>(e.current&&(e.current.on("mouseover",d),e.current.on("mouseout",c),e.current.on("mousedown",v),e.current.on("mouseup",y),e.current.on("mouseupoutside",m),e.current.addListener("dblclick",b)),()=>{e.current&&(e.current.off("mouseover",d),e.current.off("mouseout",c),e.current.off("mousedown",v),e.current.off("mouseup",y),e.current.off("mouseupoutside",m),e.current.removeListener("dblclick",b))}),[]),Zt.jsx(gy.Transformer,{ref:e,group:r?[t.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:2,color:h},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:f,shape:"circle",radius:10},transformchange:_,transformcommit:E})};let id;function sd(){return id=document.body,id}function wr(e,t,r){let n;return _t.useEffect(()=>{n=n||sd();const i=a=>{const l=a.detail;t(l)};return n.addEventListener(e,i,!1),()=>{n==null||n.removeEventListener(e,i,!1)}},r),i=>{n=i}}function Ea(e,t){const r=sd(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function N1(){let e;function t(r){e=r}return t.emit=function(r,n){const i=new CustomEvent(r,{bubbles:!0,detail:n});e==null||e.dispatchEvent(i)},t}const mi=Tt.createContext({}),qe={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"},P1=({children:e})=>{const[t,r]=_t.useState(!1),n=_t.useRef(),i=_t.useRef(),a=_t.useRef(.001);_t.useLayoutEffect(()=>(i.current=Xe.context(()=>{n.current&&n.current.progress(0).kill(),n.current=Xe.timeline({paused:!0,defaults:{duration:0}})}),()=>i.current.revert()),[]);const l=_t.useCallback(()=>{let b=n.current.time();a.current=b},[]);_t.useEffect(()=>{const m=n.current;m.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){m.pause(),l()}).eventCallback("onUpdate",function(){l()}).eventCallback("onPause",function(){l()}).eventCallback("onResume",function(){l()}).eventCallback("onComplete",function(){m.pause(),m.revert(),Ea(qe.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),l()})},[]);const u=_t.useCallback(()=>{n.current.revert()},[]),f=_t.useCallback(()=>{n.current.restart()},[]),h=_t.useCallback(()=>{const m=n.current;m.repeat(1),m.restart()},[]),p=_t.useCallback(m=>{n.current.seek(m)},[]),d=_t.useCallback(()=>{n.current.seek(4)},[]),c=_t.useCallback(()=>{const m=n.current;return m?m.totalDuration():0},[]),v=()=>{n.current.pause(),Ea(qe.PAUSE)},y=()=>{n.current.resume(),Ea(qe.RESUME)};return wr(qe.SEEK_START,()=>{r(!0)}),wr(qe.SCRUBBER_PLAY,()=>{y()}),wr(qe.SCRUBBER_PAUSE,()=>{v()}),wr(qe.SCRUBBER_SEEK,m=>{p(m)}),wr(qe.SEEK_END,()=>{r(!1)}),wr(qe.SCRUBBER_PROGRESS_UPDATE,m=>{}),Zt.jsx(mi.Provider,{value:{gsapCtx:i,tl:n,handlePlay:y,handlePause:v,handleReset:u,handleSeek:p,handleSeekTest:d,handleRestart:f,handleRepeat:h,playerTimeRef:a,isDragging:t,getTimelineDuration:c},children:e})},M1=e=>{let t={};switch(e){case"NONE":case"none":break;case"BOUNCE_IN":t.from={duration:2,ease:"bounce.out",y:-1500};break;case"BOUNCE_IN_DOWN":t.from={ease:"bounce.out",y:-1500,duration:2};break;case"BOUNCE_IN_LEFT":t.from={ease:"bounce.out",x:-1500,duration:2};break;case"BOUNCE_IN_RIGHT":t.from={ease:"bounce.out",x:1500,duration:2};break;case"BOUNCE_IN_UP":t.from={ease:"bounce.out",y:1500,duration:2};break;case"BOUNCE_OUT":t.from={ease:"bounce.in",y:2,duration:2};break;case"BOUNCE_OUT_DOWN":break;case"BOUNCE_OUT_LEFT":break;case"BOUNCE_OUT_RIGHT":break;case"BOUNCE_OUT_UP":break;case"FADE_IN":t.to={ease:"power4.in",alpha:1,duration:.5};break;case"FADE_IN_DOWN":t.fromTo={from:{y:-1e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break;case"FADE_IN_LEFT":t.fromTo={from:{x:-1e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_RIGHT":t.fromTo={from:{x:2e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_UP":t.fromTo={from:{y:2e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break}return t};var k1=Object.prototype;function L1(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||k1;return e===r}var ad=L1;function F1(e,t){return function(r){return e(t(r))}}var B1=F1,U1=B1,D1=U1(Object.keys,Object),$1=D1,G1=ad,q1=$1,j1=Object.prototype,H1=j1.hasOwnProperty;function z1(e){if(!G1(e))return q1(e);var t=[];for(var r in Object(e))H1.call(e,r)&&r!="constructor"&&t.push(r);return t}var od=z1,V1=typeof Ke=="object"&&Ke&&Ke.Object===Object&&Ke,ld=V1,W1=ld,X1=typeof self=="object"&&self&&self.Object===Object&&self,K1=W1||X1||Function("return this")(),Br=K1,Y1=Br,Z1=Y1.Symbol,wa=Z1,ud=wa,fd=Object.prototype,J1=fd.hasOwnProperty,Q1=fd.toString,fs=ud?ud.toStringTag:void 0;function tb(e){var t=J1.call(e,fs),r=e[fs];try{e[fs]=void 0;var n=!0}catch{}var i=Q1.call(e);return n&&(t?e[fs]=r:delete e[fs]),i}var eb=tb,rb=Object.prototype,nb=rb.toString;function ib(e){return nb.call(e)}var sb=ib,cd=wa,ab=eb,ob=sb,lb="[object Null]",ub="[object Undefined]",hd=cd?cd.toStringTag:void 0;function fb(e){return e==null?e===void 0?ub:lb:hd&&hd in Object(e)?ab(e):ob(e)}var cs=fb;function cb(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var hs=cb,hb=cs,db=hs,pb="[object AsyncFunction]",vb="[object Function]",gb="[object GeneratorFunction]",yb="[object Proxy]";function mb(e){if(!db(e))return!1;var t=hb(e);return t==vb||t==gb||t==pb||t==yb}var dd=mb,_b=Br,bb=_b["__core-js_shared__"],xb=bb,Zl=xb,pd=function(){var e=/[^.]+$/.exec(Zl&&Zl.keys&&Zl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Eb(e){return!!pd&&pd in e}var wb=Eb,Tb=Function.prototype,Ab=Tb.toString;function Sb(e){if(e!=null){try{return Ab.call(e)}catch{}try{return e+""}catch{}}return""}var vd=Sb,Ob=dd,Ib=wb,Rb=hs,Cb=vd,Nb=/[\\^$.*+?()[\]{}|]/g,Pb=/^\[object .+?Constructor\]$/,Mb=Function.prototype,kb=Object.prototype,Lb=Mb.toString,Fb=kb.hasOwnProperty,Bb=RegExp("^"+Lb.call(Fb).replace(Nb,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ub(e){if(!Rb(e)||Ib(e))return!1;var t=Ob(e)?Bb:Pb;return t.test(Cb(e))}var Db=Ub;function $b(e,t){return e==null?void 0:e[t]}var Gb=$b,qb=Db,jb=Gb;function Hb(e,t){var r=jb(e,t);return qb(r)?r:void 0}var _i=Hb,zb=_i,Vb=Br,Wb=zb(Vb,"DataView"),Xb=Wb,Kb=_i,Yb=Br,Zb=Kb(Yb,"Map"),Jl=Zb,Jb=_i,Qb=Br,tx=Jb(Qb,"Promise"),ex=tx,rx=_i,nx=Br,ix=rx(nx,"Set"),sx=ix,ax=_i,ox=Br,lx=ax(ox,"WeakMap"),ux=lx,Ql=Xb,tu=Jl,eu=ex,ru=sx,nu=ux,gd=cs,bi=vd,yd="[object Map]",fx="[object Object]",md="[object Promise]",_d="[object Set]",bd="[object WeakMap]",xd="[object DataView]",cx=bi(Ql),hx=bi(tu),dx=bi(eu),px=bi(ru),vx=bi(nu),Un=gd;(Ql&&Un(new Ql(new ArrayBuffer(1)))!=xd||tu&&Un(new tu)!=yd||eu&&Un(eu.resolve())!=md||ru&&Un(new ru)!=_d||nu&&Un(new nu)!=bd)&&(Un=function(e){var t=gd(e),r=t==fx?e.constructor:void 0,n=r?bi(r):"";if(n)switch(n){case cx:return xd;case hx:return yd;case dx:return md;case px:return _d;case vx:return bd}return t});var Ed=Un;function gx(e){return e!=null&&typeof e=="object"}var ds=gx,yx=cs,mx=ds,_x="[object Arguments]";function bx(e){return mx(e)&&yx(e)==_x}var xx=bx,wd=xx,Ex=ds,Td=Object.prototype,wx=Td.hasOwnProperty,Tx=Td.propertyIsEnumerable,Ax=wd(function(){return arguments}())?wd:function(e){return Ex(e)&&wx.call(e,"callee")&&!Tx.call(e,"callee")},iu=Ax,Sx=Array.isArray,Ur=Sx,Ox=9007199254740991;function Ix(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ox}var su=Ix,Rx=dd,Cx=su;function Nx(e){return e!=null&&Cx(e.length)&&!Rx(e)}var Ta=Nx,Aa={exports:{}};function Px(){return!1}var Mx=Px;Aa.exports,function(e,t){var r=Br,n=Mx,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,l=a&&a.exports===i,u=l?r.Buffer:void 0,f=u?u.isBuffer:void 0,h=f||n;e.exports=h}(Aa,Aa.exports);var au=Aa.exports,kx=cs,Lx=su,Fx=ds,Bx="[object Arguments]",Ux="[object Array]",Dx="[object Boolean]",$x="[object Date]",Gx="[object Error]",qx="[object Function]",jx="[object Map]",Hx="[object Number]",zx="[object Object]",Vx="[object RegExp]",Wx="[object Set]",Xx="[object String]",Kx="[object WeakMap]",Yx="[object ArrayBuffer]",Zx="[object DataView]",Jx="[object Float32Array]",Qx="[object Float64Array]",tE="[object Int8Array]",eE="[object Int16Array]",rE="[object Int32Array]",nE="[object Uint8Array]",iE="[object Uint8ClampedArray]",sE="[object Uint16Array]",aE="[object Uint32Array]",se={};se[Jx]=se[Qx]=se[tE]=se[eE]=se[rE]=se[nE]=se[iE]=se[sE]=se[aE]=!0,se[Bx]=se[Ux]=se[Yx]=se[Dx]=se[Zx]=se[$x]=se[Gx]=se[qx]=se[jx]=se[Hx]=se[zx]=se[Vx]=se[Wx]=se[Xx]=se[Kx]=!1;function oE(e){return Fx(e)&&Lx(e.length)&&!!se[kx(e)]}var lE=oE;function uE(e){return function(t){return e(t)}}var fE=uE,Sa={exports:{}};Sa.exports,function(e,t){var r=ld,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,l=a&&r.process,u=function(){try{var f=i&&i.require&&i.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}}();e.exports=u}(Sa,Sa.exports);var cE=Sa.exports,hE=lE,dE=fE,Ad=cE,Sd=Ad&&Ad.isTypedArray,pE=Sd?dE(Sd):hE,ou=pE,vE=od,gE=Ed,yE=iu,mE=Ur,_E=Ta,bE=au,xE=ad,EE=ou,wE="[object Map]",TE="[object Set]",AE=Object.prototype,SE=AE.hasOwnProperty;function OE(e){if(e==null)return!0;if(_E(e)&&(mE(e)||typeof e=="string"||typeof e.splice=="function"||bE(e)||EE(e)||yE(e)))return!e.length;var t=gE(e);if(t==wE||t==TE)return!e.size;if(xE(e))return!vE(e).length;for(var r in e)if(SE.call(e,r))return!1;return!0}var IE=OE;const xi=Tn(IE),RE=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Ei=Tt.forwardRef((e,t)=>{const[r,n]=Tt.useState(!1),[i,a]=_t.useState(!1),[l,u]=_t.useState(!1),[f,h]=_t.useState(e.initialAlpha),p=_t.useRef(null),d=_t.useRef(null),c=_t.useRef(null),v=_t.useRef(null),y=_t.useRef(e.initialAlpha),{tl:m}=_t.useContext(mi),{uniqueId:b,startAt:_,endAt:E,initialAlpha:w,transformation:{x,y:A,width:C,height:S,scale:O=[1,1],rotation:L=0,colorCorrection:R,animation:I,effect:N},applyTransformer:k,disabled:F,ignoreTlForVideo:q,pointerdown:X,pointerout:z,pointerover:it}=e,{contrast:Z=1,saturation:$=1,brightness:M=1,alpha:U=1,blurRadius:j=0}=R||{},V={...M>1&&{brightness:M},...Z>1&&{contrast:Z},...$>1&&{saturation:$},...U!==0&&{alpha:U}};wr(qe.COMPLETE,()=>{p.current&&(y.current=w,h(w))}),Tt.useImperativeHandle(t,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>l}),[i,l]),Tt.useEffect(()=>{p.current&&n(!0)},[]);const Y=()=>{console.log("gsapOnAlphaComplete complete")};Tt.useEffect(()=>{let nt=Xe.context(()=>{});if(p.current&&m.current){const ht={alpha:1,duration:Number(E)-Number(_)},vt=M1(I||"None");nt=Xe.context(()=>{var mt,xt;m.current.to(p.current,{alpha:1,duration:.1},_).to(p.current,{alpha:0,duration:.1,onComplete:Y},Number(E)-.09),q||m.current.from(p.current,{...ht},_),xi(vt.from)?xi(vt.to)?xi(vt.fromTo)||m.current.fromTo(p.current,(mt=vt.fromTo)==null?void 0:mt.from,(xt=vt.fromTo)==null?void 0:xt.to,_):m.current.to(p.current,{...vt.to},_):m.current.from(p.current,{...vt.from},_)})}return()=>nt.revert()},[I,_,E,q]);const G=Tt.useCallback(()=>{a(!0)},[]),W=Tt.useCallback(nt=>{console.log("changeEnd",nt),e.onAnchorTransformationEnd&&(console.log("running onAnchorTransformationEnd"),e.onAnchorTransformationEnd(nt)),a(!1)},[]),tt=pe.withFilters(pe.Container,{...j>0&&{blur:wn.filters.BlurFilter},...!xi(V)&&{adjust:R1},matrix:wn.filters.ColorMatrixFilter}),et=(R==null?void 0:R.enabled)||N&&N!==Bn.Normal;return Zt.jsxs(pe.Container,{ref:d,children:[Zt.jsx(pe.Container,{ref:p,alpha:y.current||f,position:[x,A],pivot:[x,A],width:C,height:S,scale:O,rotation:L,...!F&&!i&&{interactive:!0,buttonMode:!0,pointerdown:X,pointerover:it,pointerout:z},children:Zt.jsxs(pe.Container,{children:[et&&Zt.jsx(tt,{scale:1,blur:{blur:j,quality:4},adjust:V,apply:({matrix:nt})=>{N===Bn.BlackAndWhite?nt.desaturate():N===Bn.Sepia?nt.sepia():N===Bn.RetroVintage||N===Bn.NightVision?nt.negative():N===Bn.Normal&&nt.reset()},matrix:{enabled:!0,matrix:RE},children:Zt.jsx(pe.Container,{ref:c,children:e.children})}),!et&&Zt.jsx(pe.Container,{ref:c,children:e.children})]})}),k&&Zt.jsx(C1,{pixiTransformerRef:v,imageRef:p,isMounted:r,transformCommit:W,transformChange:G,mouseoverEvent:u,uniqueId:b})]})});Ei.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};const CE=Tt.forwardRef((e,t)=>{const r=_t.useRef(null),n=_t.useRef(null),{src:i,transformation:{x:a,y:l,width:u,height:f,anchor:h},pointerdown:p,pointerup:d}=e;return Zt.jsx(Ei,{...e,ref:t,children:Zt.jsx(pe.Container,{ref:n,children:Zt.jsx(pe.Sprite,{image:i,width:u,height:f,anchor:h,ref:r,x:a,y:l,interactive:!0,pointerdown:p,pointerup:d})})})}),Oa={build(e){const t=e.points;let r,n,i,a,l,u;if(e.type===Re.CIRC){const y=e.shape;r=y.x,n=y.y,l=u=y.radius,i=a=0}else if(e.type===Re.ELIP){const y=e.shape;r=y.x,n=y.y,l=y.width,u=y.height,i=a=0}else{const y=e.shape,m=y.width/2,b=y.height/2;r=y.x+m,n=y.y+b,l=u=Math.max(0,Math.min(y.radius,Math.min(m,b))),i=m-l,a=b-u}if(!(l>=0&&u>=0&&i>=0&&a>=0)){t.length=0;return}const f=Math.ceil(2.3*Math.sqrt(l+u)),h=f*8+(i?4:0)+(a?4:0);if(t.length=h,h===0)return;if(f===0){t.length=8,t[0]=t[6]=r+i,t[1]=t[3]=n+a,t[2]=t[4]=r-i,t[5]=t[7]=n-a;return}let p=0,d=f*4+(i?2:0)+2,c=d,v=h;{const y=i+l,m=a,b=r+y,_=r-y,E=n+m;if(t[p++]=b,t[p++]=E,t[--d]=E,t[--d]=_,a){const w=n-m;t[c++]=_,t[c++]=w,t[--v]=w,t[--v]=b}}for(let y=1;y<f;y++){const m=Math.PI/2*(y/f),b=i+Math.cos(m)*l,_=a+Math.sin(m)*u,E=r+b,w=r-b,x=n+_,A=n-_;t[p++]=E,t[p++]=x,t[--d]=x,t[--d]=w,t[c++]=w,t[c++]=A,t[--v]=A,t[--v]=E}{const y=i,m=a+u,b=r+y,_=r-y,E=n+m,w=n-m;t[p++]=b,t[p++]=E,t[--v]=w,t[--v]=b,i&&(t[p++]=_,t[p++]=E,t[--v]=w,t[--v]=_)}},triangulate(e,t){const r=e.points,n=t.points,i=t.indices;if(r.length===0)return;let a=n.length/2;const l=a;let u,f;if(e.type!==Re.RREC){const p=e.shape;u=p.x,f=p.y}else{const p=e.shape;u=p.x+p.width/2,f=p.y+p.height/2}const h=e.matrix;n.push(e.matrix?h.a*u+h.c*f+h.tx:u,e.matrix?h.b*u+h.d*f+h.ty:f),a++,n.push(r[0],r[1]);for(let p=2;p<r.length;p+=2)n.push(r[p],r[p+1]),i.push(a++,l,a);i.push(l+1,l,a)}};function Od(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let i=0,a=e[r-2],l=e[r-1];i<r;i+=2){const u=e[i],f=e[i+1];n+=(u-a)*(f+l),a=u,l=f}if(!t&&n>0||t&&n<=0){const i=r/2;for(let a=i+i%2;a<r;a+=2){const l=r-a-2,u=r-a-1,f=a,h=a+1;[e[l],e[f]]=[e[f],e[l]],[e[u],e[h]]=[e[h],e[u]]}}}const Id={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let r=e.points;const n=e.holes,i=t.points,a=t.indices;if(r.length>=6){Od(r,!1);const l=[];for(let h=0;h<n.length;h++){const p=n[h];Od(p.points,!0),l.push(r.length/2),r=r.concat(p.points)}const u=jy(r,l,2);if(!u)return;const f=i.length/2;for(let h=0;h<u.length;h+=3)a.push(u[h]+f),a.push(u[h+1]+f),a.push(u[h+2]+f);for(let h=0;h<r.length;h++)i.push(r[h])}}},NE={build(e){const t=e.shape,r=t.x,n=t.y,i=t.width,a=t.height,l=e.points;l.length=0,i>=0&&a>=0&&l.push(r,n,r+i,n,r+i,n+a,r,n+a)},triangulate(e,t){const r=e.points,n=t.points;if(r.length===0)return;const i=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),t.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},PE={build(e){Oa.build(e)},triangulate(e,t){Oa.triangulate(e,t)}};var Tr=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(Tr||{}),Dn=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(Dn||{});const wi={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 Rd{static curveTo(t,r,n,i,a,l){const u=l[l.length-2],h=l[l.length-1]-r,p=u-t,d=i-r,c=n-t,v=Math.abs(h*c-p*d);if(v<1e-8||a===0)return(l[l.length-2]!==t||l[l.length-1]!==r)&&l.push(t,r),null;const y=h*h+p*p,m=d*d+c*c,b=h*d+p*c,_=a*Math.sqrt(y)/v,E=a*Math.sqrt(m)/v,w=_*b/y,x=E*b/m,A=_*c+E*p,C=_*d+E*h,S=p*(E+w),O=h*(E+w),L=c*(_+x),R=d*(_+x),I=Math.atan2(O-C,S-A),N=Math.atan2(R-C,L-A);return{cx:A+t,cy:C+r,radius:a,startAngle:I,endAngle:N,anticlockwise:p*d>c*h}}static arc(t,r,n,i,a,l,u,f,h){const p=u-l,d=wi._segmentsCount(Math.abs(p)*a,Math.ceil(Math.abs(p)/ia)*40),c=p/(d*2),v=c*2,y=Math.cos(c),m=Math.sin(c),b=d-1,_=b%1/b;for(let E=0;E<=b;++E){const w=E+_*E,x=c+l+v*w,A=Math.cos(x),C=-Math.sin(x);h.push((y*A+m*C)*a+n,(y*-C+m*A)*a+i)}}}class ME{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 lu{static curveLength(t,r,n,i,a,l,u,f){let p=0,d=0,c=0,v=0,y=0,m=0,b=0,_=0,E=0,w=0,x=0,A=t,C=r;for(let S=1;S<=10;++S)d=S/10,c=d*d,v=c*d,y=1-d,m=y*y,b=m*y,_=b*t+3*m*d*n+3*y*c*a+v*u,E=b*r+3*m*d*i+3*y*c*l+v*f,w=A-_,x=C-E,A=_,C=E,p+=Math.sqrt(w*w+x*x);return p}static curveTo(t,r,n,i,a,l,u){const f=u[u.length-2],h=u[u.length-1];u.length-=2;const p=wi._segmentsCount(lu.curveLength(f,h,t,r,n,i,a,l));let d=0,c=0,v=0,y=0,m=0;u.push(f,h);for(let b=1,_=0;b<=p;++b)_=b/p,d=1-_,c=d*d,v=c*d,y=_*_,m=y*_,u.push(v*f+3*c*_*t+3*d*y*n+m*a,v*h+3*c*_*r+3*d*y*i+m*l)}}function Cd(e,t,r,n,i,a,l,u){const f=e-r*i,h=t-n*i,p=e+r*a,d=t+n*a;let c,v;l?(c=n,v=-r):(c=-n,v=r);const y=f+c,m=h+v,b=p+c,_=d+v;return u.push(y,m,b,_),2}function $n(e,t,r,n,i,a,l,u){const f=r-e,h=n-t;let p=Math.atan2(f,h),d=Math.atan2(i-e,a-t);u&&p<d?p+=Math.PI*2:!u&&p>d&&(d+=Math.PI*2);let c=p;const v=d-p,y=Math.abs(v),m=Math.sqrt(f*f+h*h),b=(15*y*Math.sqrt(m)/Math.PI>>0)+1,_=v/b;if(c+=_,u){l.push(e,t,r,n);for(let E=1,w=c;E<b;E++,w+=_)l.push(e,t,e+Math.sin(w)*m,t+Math.cos(w)*m);l.push(e,t,i,a)}else{l.push(r,n,e,t);for(let E=1,w=c;E<b;E++,w+=_)l.push(e+Math.sin(w)*m,t+Math.cos(w)*m,e,t);l.push(i,a,e,t)}return b*2}function kE(e,t){const r=e.shape;let n=e.points||r.points.slice();const i=t.closePointEps;if(n.length===0)return;const a=e.lineStyle,l=new Oe(n[0],n[1]),u=new Oe(n[n.length-2],n[n.length-1]),f=r.type!==Re.POLY||r.closeStroke,h=Math.abs(l.x-u.x)<i&&Math.abs(l.y-u.y)<i;if(f){n=n.slice(),h&&(n.pop(),n.pop(),u.set(n[n.length-2],n[n.length-1]));const z=(l.x+u.x)*.5,it=(u.y+l.y)*.5;n.unshift(z,it),n.push(z,it)}const p=t.points,d=n.length/2;let c=n.length;const v=p.length/2,y=a.width/2,m=y*y,b=a.miterLimit*a.miterLimit;let _=n[0],E=n[1],w=n[2],x=n[3],A=0,C=0,S=-(E-x),O=_-w,L=0,R=0,I=Math.sqrt(S*S+O*O);S/=I,O/=I,S*=y,O*=y;const N=a.alignment,k=(1-N)*2,F=N*2;f||(a.cap===Dn.ROUND?c+=$n(_-S*(k-F)*.5,E-O*(k-F)*.5,_-S*k,E-O*k,_+S*F,E+O*F,p,!0)+2:a.cap===Dn.SQUARE&&(c+=Cd(_,E,S,O,k,F,!0,p))),p.push(_-S*k,E-O*k,_+S*F,E+O*F);for(let z=1;z<d-1;++z){_=n[(z-1)*2],E=n[(z-1)*2+1],w=n[z*2],x=n[z*2+1],A=n[(z+1)*2],C=n[(z+1)*2+1],S=-(E-x),O=_-w,I=Math.sqrt(S*S+O*O),S/=I,O/=I,S*=y,O*=y,L=-(x-C),R=w-A,I=Math.sqrt(L*L+R*R),L/=I,R/=I,L*=y,R*=y;const it=w-_,Z=E-x,$=w-A,M=C-x,U=it*$+Z*M,j=Z*$-M*it,V=j<0;if(Math.abs(j)<.001*Math.abs(U)){p.push(w-S*k,x-O*k,w+S*F,x+O*F),U>=0&&(a.join===Tr.ROUND?c+=$n(w,x,w-S*k,x-O*k,w-L*k,x-R*k,p,!1)+4:c+=2,p.push(w-L*F,x-R*F,w+L*k,x+R*k));continue}const Y=(-S+_)*(-O+x)-(-S+w)*(-O+E),G=(-L+A)*(-R+x)-(-L+w)*(-R+C),W=(it*G-$*Y)/j,tt=(M*Y-Z*G)/j,et=(W-w)*(W-w)+(tt-x)*(tt-x),nt=w+(W-w)*k,ht=x+(tt-x)*k,vt=w-(W-w)*F,mt=x-(tt-x)*F,xt=Math.min(it*it+Z*Z,$*$+M*M),Rt=V?k:F,ve=xt+Rt*Rt*m,Wt=et<=ve;let st=a.join;if(st===Tr.MITER&&et/m>b&&(st=Tr.BEVEL),Wt)switch(st){case Tr.MITER:{p.push(nt,ht,vt,mt);break}case Tr.BEVEL:{V?p.push(nt,ht,w+S*F,x+O*F,nt,ht,w+L*F,x+R*F):p.push(w-S*k,x-O*k,vt,mt,w-L*k,x-R*k,vt,mt),c+=2;break}case Tr.ROUND:{V?(p.push(nt,ht,w+S*F,x+O*F),c+=$n(w,x,w+S*F,x+O*F,w+L*F,x+R*F,p,!0)+4,p.push(nt,ht,w+L*F,x+R*F)):(p.push(w-S*k,x-O*k,vt,mt),c+=$n(w,x,w-S*k,x-O*k,w-L*k,x-R*k,p,!1)+4,p.push(w-L*k,x-R*k,vt,mt));break}}else{switch(p.push(w-S*k,x-O*k,w+S*F,x+O*F),st){case Tr.MITER:{V?p.push(vt,mt,vt,mt):p.push(nt,ht,nt,ht),c+=2;break}case Tr.ROUND:{V?c+=$n(w,x,w+S*F,x+O*F,w+L*F,x+R*F,p,!0)+2:c+=$n(w,x,w-S*k,x-O*k,w-L*k,x-R*k,p,!1)+2;break}}p.push(w-L*k,x-R*k,w+L*F,x+R*F),c+=2}}_=n[(d-2)*2],E=n[(d-2)*2+1],w=n[(d-1)*2],x=n[(d-1)*2+1],S=-(E-x),O=_-w,I=Math.sqrt(S*S+O*O),S/=I,O/=I,S*=y,O*=y,p.push(w-S*k,x-O*k,w+S*F,x+O*F),f||(a.cap===Dn.ROUND?c+=$n(w-S*(k-F)*.5,x-O*(k-F)*.5,w-S*k,x-O*k,w+S*F,x+O*F,p,!1)+2:a.cap===Dn.SQUARE&&(c+=Cd(w,x,S,O,k,F,!1,p)));const q=t.indices,X=wi.epsilon*wi.epsilon;for(let z=v;z<c+v-2;++z)_=p[z*2],E=p[z*2+1],w=p[(z+1)*2],x=p[(z+1)*2+1],A=p[(z+2)*2],C=p[(z+2)*2+1],!(Math.abs(_*(x-C)+w*(C-E)+A*(E-x))<X)&&q.push(z,z+1,z+2)}function LE(e,t){let r=0;const n=e.shape,i=e.points||n.points,a=n.type!==Re.POLY||n.closeStroke;if(i.length===0)return;const l=t.points,u=t.indices,f=i.length/2,h=l.length/2;let p=h;for(l.push(i[0],i[1]),r=1;r<f;r++)l.push(i[r*2],i[r*2+1]),u.push(p,p+1),p++;a&&u.push(p,h)}function Nd(e,t){e.lineStyle.native?LE(e,t):kE(e,t)}class uu{static curveLength(t,r,n,i,a,l){const u=t-2*n+a,f=r-2*i+l,h=2*n-2*t,p=2*i-2*r,d=4*(u*u+f*f),c=4*(u*h+f*p),v=h*h+p*p,y=2*Math.sqrt(d+c+v),m=Math.sqrt(d),b=2*d*m,_=2*Math.sqrt(v),E=c/m;return(b*y+m*c*(y-_)+(4*v*d-c*c)*Math.log((2*m+E+y)/(E+_)))/(4*b)}static curveTo(t,r,n,i,a){const l=a[a.length-2],u=a[a.length-1],f=wi._segmentsCount(uu.curveLength(l,u,t,r,n,i));let h=0,p=0;for(let d=1;d<=f;++d){const c=d/f;h=l+(t-l)*c,p=u+(r-u)*c,a.push(h+(t+(n-t)*c-h)*c,p+(r+(i-r)*c-p)*c)}}}const fu={[Re.POLY]:Id,[Re.CIRC]:Oa,[Re.ELIP]:Oa,[Re.RECT]:NE,[Re.RREC]:PE},Pd=[],Ia=[];class cu{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?ee.EMPTY:(t=t||new ee(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:i,c:a,d:l,tx:u,ty:f}=t,h=n*r.x+a*r.y+u,p=i*r.x+l*r.y+f;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,p),this.maxY=Math.max(this.maxY,p)}addQuad(t){let r=this.minX,n=this.minY,i=this.maxX,a=this.maxY,l=t[0],u=t[1];r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,a=u>a?u:a,l=t[2],u=t[3],r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,a=u>a?u:a,l=t[4],u=t[5],r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,a=u>a?u:a,l=t[6],u=t[7],r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,a=u>a?u:a,this.minX=r,this.minY=n,this.maxX=i,this.maxY=a}addFrame(t,r,n,i,a){this.addFrameMatrix(t.worldTransform,r,n,i,a)}addFrameMatrix(t,r,n,i,a){const l=t.a,u=t.b,f=t.c,h=t.d,p=t.tx,d=t.ty;let c=this.minX,v=this.minY,y=this.maxX,m=this.maxY,b=l*r+f*n+p,_=u*r+h*n+d;c=b<c?b:c,v=_<v?_:v,y=b>y?b:y,m=_>m?_:m,b=l*i+f*n+p,_=u*i+h*n+d,c=b<c?b:c,v=_<v?_:v,y=b>y?b:y,m=_>m?_:m,b=l*r+f*a+p,_=u*r+h*a+d,c=b<c?b:c,v=_<v?_:v,y=b>y?b:y,m=_>m?_:m,b=l*i+f*a+p,_=u*i+h*a+d,c=b<c?b:c,v=_<v?_:v,y=b>y?b:y,m=_>m?_:m,this.minX=c,this.minY=v,this.maxX=y,this.maxY=m}addVertexData(t,r,n){let i=this.minX,a=this.minY,l=this.maxX,u=this.maxY;for(let f=r;f<n;f+=2){const h=t[f],p=t[f+1];i=h<i?h:i,a=p<a?p:a,l=h>l?h:l,u=p>u?p:u}this.minX=i,this.minY=a,this.maxX=l,this.maxY=u}addVertices(t,r,n,i){this.addVerticesMatrix(t.worldTransform,r,n,i)}addVerticesMatrix(t,r,n,i,a=0,l=a){const u=t.a,f=t.b,h=t.c,p=t.d,d=t.tx,c=t.ty;let v=this.minX,y=this.minY,m=this.maxX,b=this.maxY;for(let _=n;_<i;_+=2){const E=r[_],w=r[_+1],x=u*E+h*w+d,A=p*w+f*E+c;v=Math.min(v,x-a),m=Math.max(m,x+a),y=Math.min(y,A-l),b=Math.max(b,A+l)}this.minX=v,this.minY=y,this.maxX=m,this.maxY=b}addBounds(t){const r=this.minX,n=this.minY,i=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>i?t.maxX:i,this.maxY=t.maxY>a?t.maxY:a}addBoundsMask(t,r){const n=t.minX>r.minX?t.minX:r.minX,i=t.minY>r.minY?t.minY:r.minY,a=t.maxX<r.maxX?t.maxX:r.maxX,l=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=a&&i<=l){const u=this.minX,f=this.minY,h=this.maxX,p=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=a>h?a:h,this.maxY=l>p?l: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,i=t.minY>r.y?t.minY:r.y,a=t.maxX<r.x+r.width?t.maxX:r.x+r.width,l=t.maxY<r.y+r.height?t.maxY:r.y+r.height;if(n<=a&&i<=l){const u=this.minX,f=this.minY,h=this.maxX,p=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=a>h?a:h,this.maxY=l>p?l:p}}pad(t=0,r=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)}addFramePad(t,r,n,i,a,l){t-=a,r-=l,n+=a,i+=l,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>i?this.maxY:i}}class Ti extends Bs{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Ul,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 cu,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 i=r[n];Object.defineProperty(Ti.prototype,i,Object.getOwnPropertyDescriptor(t,i))}}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 ee),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new ee),t=this._localBoundsRect),this._localBounds||(this._localBounds=new cu);const r=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const i=this._bounds,a=this._boundsID;this._bounds=this._localBounds;const l=this.getBounds(!1,t);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-a,l}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,i){return r&&(t=r.toGlobal(t,n,i)),i||(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,i=1,a=0,l=0,u=0,f=0,h=0){return this.position.x=t,this.position.y=r,this.scale.x=n||1,this.scale.y=i||1,this.rotation=a,this.skew.x=l,this.skew.y=u,this.pivot.x=f,this.pivot.y=h,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 FE),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*w_}set angle(t){this.transform.rotation=t*T_}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 FE extends Ti{constructor(){super(...arguments),this.sortDirty=null}}Ti.prototype.displayObjectUpdateTransform=Ti.prototype.updateTransform;const BE=new Fe;function UE(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const hu=class extends Ti{constructor(){super(),this.children=[],this.sortableChildren=hu.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);ta(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,ta(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,ta(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,i=n-r;let a;if(i>0&&i<=n){a=this.children.splice(r,i);for(let l=0;l<a.length;++l)a[l].parent=null,a[l].transform&&(a[l].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let l=0;l<a.length;++l)a[l].emit("removed",this),this.emit("childRemoved",a[l],this,l);return a}else if(i===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(UE),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,i=this.children.length;n<i;++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!==hu.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=BE.copyFrom(n),n.prepend(i)):n=i),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let a=0,l=this.children.length;a<l;++a){const u=this.children[a],f=u.cullable;u.cullable=f||!this.cullArea,u.render(e),u.cullable=f}}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 i,a,l;const t=this.filters,r=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let u=0;u<t.length;u++)t[u].enabled&&this._enabledFilters.push(t[u])}const n=t&&((i=this._enabledFilters)==null?void 0:i.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==xe.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 u=0,f=this.children.length;u<f;++u)this.children[u].render(e)}n&&e.batch.flush(),r&&e.mask.pop(this),t&&((l=this._enabledFilters)!=null&&l.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 Ai=hu;Ai.defaultSortableChildren=!1,Ai.prototype.containerUpdateTransform=Ai.prototype.updateTransform,Object.defineProperties(jt,{SORTABLE_CHILDREN:{get(){return Ai.defaultSortableChildren},set(e){Jt("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Ai.defaultSortableChildren=e}}});class Ra{constructor(t,r=null,n=null,i=null){this.points=[],this.holes=[],this.shape=t,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=t.type}clone(){return new Ra(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 Si=new Oe,Md=class extends ph{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 cu,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(),Ia.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),Pd.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 i=new Ra(e,t,r,n);return this.graphicsData.push(i),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const r=new Ra(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,Si):Si.copyFrom(e),n.shape.contains(Si.x,Si.y))){let i=!1;if(n.holes){for(let a=0;a<n.holes.length;a++)if(n.holes[a].shape.contains(Si.x,Si.y)){i=!0;break}}if(!i)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 u=this.shapeIndex;u<t.length;u++){this.shapeIndex++;const f=t[u],h=f.fillStyle,p=f.lineStyle;fu[f.type].build(f),f.matrix&&this.transformPoints(f.points,f.matrix),(h.visible||p.visible)&&this.processHoles(f.holes);for(let c=0;c<2;c++){const v=c===0?h:p;if(!v.visible)continue;const y=v.texture.baseTexture,m=this.indices.length,b=this.points.length/2;y.wrapMode=Vi.REPEAT,c===0?this.processFill(f):this.processLine(f);const _=this.points.length/2-b;_!==0&&(r&&!this._compareStyles(n,v)&&(r.end(m,b),r=null),r||(r=Pd.pop()||new ME,r.begin(v,m,b),this.batches.push(r),n=v),this.addUvs(this.points,e,v.texture,b,_,v.matrix))}}const i=this.indices.length,a=this.points.length/2;if(r&&r.end(i,a),this.batches.length===0){this.batchable=!0;return}const l=a>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&l===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=l?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,i=r.lineStyle;if(n&&!n.texture.baseTexture.valid||i&&!i.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 i=0;i<n.size;i++){const a=n.start+i;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<Md.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++zt._globalBatch;for(let p=0;p<this.drawCalls.length;p++)this.drawCalls[p].texArray.clear(),Ia.push(this.drawCalls[p]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=Ia.pop();n||(n=new kl,n.texArray=new $l),n.texArray.count=0,n.start=0,n.size=0,n.type=an.TRIANGLES;let i=0,a=null,l=0,u=!1,f=an.TRIANGLES,h=0;this.drawCalls.push(n);for(let p=0;p<this.batches.length;p++){const d=this.batches[p],c=8,v=d.style,y=v.texture.baseTexture;u!==!!v.native&&(u=!!v.native,f=u?an.LINES:an.TRIANGLES,a=null,i=c,e++),a!==y&&(a=y,y._batchEnabled!==e&&(i===c&&(e++,i=0,n.size>0&&(n=Ia.pop(),n||(n=new kl,n.texArray=new $l),this.drawCalls.push(n)),n.start=h,n.size=0,n.texArray.count=0,n.type=f),y.touched=1,y._batchEnabled=e,y._batchLocation=i,y.wrapMode=Vi.REPEAT,n.texArray.elements[n.texArray.count++]=y,i++)),n.size+=d.size,h+=d.size,l=y._batchLocation,this.addColors(t,v.color,v.alpha,d.attribSize,d.attribStart),this.addTextureIds(r,l,d.attribSize,d.attribStart)}zt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,r=this.colors,n=this.textureIds,i=new ArrayBuffer(e.length*3*4),a=new Float32Array(i),l=new Uint32Array(i);let u=0;for(let f=0;f<e.length/2;f++)a[u++]=e[f*2],a[u++]=e[f*2+1],a[u++]=t[f*2],a[u++]=t[f*2+1],l[u++]=r[f],a[u++]=n[f];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?Id.triangulate(e,this):fu[e.type].triangulate(e,this)}processLine(e){Nd(e,this);for(let t=0;t<e.holes.length;t++)Nd(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];fu[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],i=e[r*2+1];e[r*2]=t.a*n+t.c*i+t.tx,e[r*2+1]=t.b*n+t.d*i+t.ty}}addColors(e,t,r,n,i=0){const a=Ge.shared.setValue(t).toLittleEndianNumber(),l=Ge.shared.setValue(a).toPremultiplied(r);e.length=Math.max(e.length,i+n);for(let u=0;u<n;u++)e[i+u]=l}addTextureIds(e,t,r,n=0){e.length=Math.max(e.length,n+r);for(let i=0;i<r;i++)e[n+i]=t}addUvs(e,t,r,n,i,a=null){let l=0;const u=t.length,f=r.frame;for(;l<i;){let p=e[(n+l)*2],d=e[(n+l)*2+1];if(a){const c=a.a*p+a.c*d+a.tx;d=a.b*p+a.d*d+a.ty,p=c}l++,t.push(p/f.width,d/f.height)}const h=r.baseTexture;(f.width<h.width||f.height<h.height)&&this.adjustUvs(t,r,u,i)}adjustUvs(e,t,r,n){const i=t.baseTexture,a=1e-6,l=r+n*2,u=t.frame,f=u.width/i.width,h=u.height/i.height;let p=u.x/u.width,d=u.y/u.height,c=Math.floor(e[r]+a),v=Math.floor(e[r+1]+a);for(let y=r+2;y<l;y+=2)c=Math.min(c,Math.floor(e[y]+a)),v=Math.min(v,Math.floor(e[y+1]+a));p-=c,d-=v;for(let y=r;y<l;y+=2)e[y]=(e[y]+p)*f,e[y+1]=(e[y+1]+d)*h}};let kd=Md;kd.BATCHABLE_SIZE=100;class Ca{constructor(){this.color=16777215,this.alpha=1,this.texture=Vt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new Ca;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=Vt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class du extends Ca{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Dn.BUTT,this.join=Tr.MITER,this.miterLimit=10}clone(){const t=new du;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 pu={},Na=class extends Ai{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 Ca,this._lineStyle=new du,this._matrix=null,this._holeMode=!1,this.state=ra.for2d(),this._geometry=e||new kd,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Ge(16777215),this.blendMode=It.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Na(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,i=!1){return typeof e=="number"&&(e={width:e,color:t,alpha:r,alignment:n,native:i}),this.lineTextureStyle(e)}lineTextureStyle(e){const t={width:0,texture:Vt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Dn.BUTT,join:Tr.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],i=r[r.length-1];return(n!==e||i!==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 i=this.currentPath.points;return i.length===0&&this.moveTo(0,0),uu.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,a){return this._initCurve(),lu.curveTo(e,t,r,n,i,a,this.currentPath.points),this}arcTo(e,t,r,n,i){this._initCurve(e,t);const a=this.currentPath.points,l=Rd.curveTo(e,t,r,n,i,a);if(l){const{cx:u,cy:f,radius:h,startAngle:p,endAngle:d,anticlockwise:c}=l;this.arc(u,f,h,p,d,c)}return this}arc(e,t,r,n,i,a=!1){if(n===i)return this;if(!a&&i<=n?i+=ia:a&&n<=i&&(n+=ia),i-n===0)return this;const u=e+Math.cos(n)*r,f=t+Math.sin(n)*r,h=this._geometry.closePointEps;let p=this.currentPath?this.currentPath.points:null;if(p){const d=Math.abs(p[p.length-2]-u),c=Math.abs(p[p.length-1]-f);d<h&&c<h||p.push(u,f)}else this.moveTo(u,f),p=this.currentPath.points;return Rd.arc(u,f,e,t,r,n,i,a,p),this}beginFill(e=0,t){return this.beginTextureFill({texture:Vt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Ge.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:Vt.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 ee(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new Fl(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new Ll(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new A_(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 i=new is(t);return i.closeStroke=r,this.drawShape(i),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===Re.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 i=e.batches[n],a=i.style.color,l=new Float32Array(this.vertexData.buffer,i.attribStart*4*2,i.attribSize*2),u=new Float32Array(e.uvsFloat32.buffer,i.attribStart*4*2,i.attribSize*2),f=new Uint16Array(e.indicesUint16.buffer,i.start*2,i.size),h={vertexData:l,blendMode:t,indices:f,uvs:u,_batchRGB:Ge.shared.setValue(a).toRgbArray(),_tintRGB:a,_texture:i.style.texture,alpha:i.style.alpha,worldAlpha:1};this.batches[n]=h}}_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,i=t.uniforms,a=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Ge.shared.setValue(this._tintColor).premultiply(n).toArray(i.tint),e.shader.bind(t),e.geometry.bind(r,t),e.state.set(this.state);for(let l=0,u=a.length;l<u;l++)this._renderDrawCallDirect(e,r.drawCalls[l])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:i,start:a}=t,l=r.count;for(let u=0;u<l;u++)e.texture.bind(r.elements[u],u);e.geometry.draw(n,i,a)}_resolveDirectShader(e){let t=this.shader;const r=this.pluginName;if(!t){if(!pu[r]){const{maxTextures:n}=e.plugins[r],i=new Int32Array(n);for(let u=0;u<n;u++)i[u]=u;const a={tint:new Float32Array([1,1,1,1]),translationMatrix:new Fe,default:mr.from({uSamplers:i},!0)},l=e.plugins[r]._shader.program;pu[r]=new as(l,a)}t=pu[r]}return t}_calculateBounds(){this.finishPoly();const e=this._geometry;if(!e.graphicsData.length)return;const{minX:t,minY:r,maxX:n,maxY:i}=e.bounds;this._bounds.addFrame(this.transform,t,r,n,i)}containsPoint(e){return this.worldTransform.applyInverse(e,Na._TEMP_POINT),this._geometry.containsPoint(Na._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=Ge.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,i=t.c,a=t.d,l=t.tx,u=t.ty,f=this._geometry.points,h=this.vertexData;let p=0;for(let d=0;d<f.length;d+=2){const c=f[d],v=f[d+1];h[p++]=r*c+i*v+l,h[p++]=a*v+n*c+u}}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 vu=Na;vu.curves=wi,vu._TEMP_POINT=new Oe;var DE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},gu={},$E={get exports(){return gu},set exports(e){gu=e}};/*!
|
|
539
|
+
`;class R1 extends Wr{constructor(t){super(O1,I1),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,t)}apply(t,r,n,i){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,t.applyFilter(this,r,n,i)}}var Bn=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(Bn||{});const C1=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:a,onDoubleClick:l,uniqueId:u=""})=>{const f=wn.utils.string2hex("#F3C409"),h=wn.utils.string2hex("#F3C409"),p=Tt.useRef({isDragging:!1}),d=Tt.useCallback(()=>{a&&!p.current.isDragging&&a(!0)},[a]),c=Tt.useCallback(()=>{a&&!p.current.isDragging&&a(!1)},[a]),v=Tt.useCallback(()=>{p.current.isDragging=!0},[]),y=Tt.useCallback(()=>{p.current.isDragging=!1},[]),m=Tt.useCallback(()=>{p.current.isDragging=!1},[]),b=Tt.useCallback(()=>{console.log("dobule click in pixi transformer"),l&&l({uniqueId:u})},[l]),_=Tt.useCallback(w=>{p.current.isDragging=!0,i&&i(w)},[i]),E=Tt.useCallback(()=>{if(t.current===null)return;const w=t.current.x,x=t.current.y,A=t.current.width,C=t.current.height,S=t.current.rotation,O=[t.current.scale.x,t.current.scale.y];n&&n({uniqueId:u,transformation:{x:Math.round(w),y:Math.round(x),width:Math.round(Math.max(5,A)),height:Math.round(Math.max(5,C)),rotation:S,scale:O}}),p.current.isDragging=!1},[n]);return Tt.useEffect(()=>(e.current&&(e.current.on("mouseover",d),e.current.on("mouseout",c),e.current.on("mousedown",v),e.current.on("mouseup",y),e.current.on("mouseupoutside",m),e.current.addListener("dblclick",b)),()=>{e.current&&(e.current.off("mouseover",d),e.current.off("mouseout",c),e.current.off("mousedown",v),e.current.off("mouseup",y),e.current.off("mouseupoutside",m),e.current.removeListener("dblclick",b))}),[]),Zt.jsx(gy.Transformer,{ref:e,group:r?[t.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:2,color:h},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:f,shape:"circle",radius:10},transformchange:_,transformcommit:E})};let id;function sd(){return id=document.body,id}function wr(e,t,r){let n;return _t.useEffect(()=>{n=n||sd();const i=a=>{const l=a.detail;t(l)};return n.addEventListener(e,i,!1),()=>{n==null||n.removeEventListener(e,i,!1)}},r),i=>{n=i}}function Ea(e,t){const r=sd(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function N1(){let e;function t(r){e=r}return t.emit=function(r,n){const i=new CustomEvent(r,{bubbles:!0,detail:n});e==null||e.dispatchEvent(i)},t}const mi=Tt.createContext({}),qe={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"},P1=({children:e})=>{const[t,r]=_t.useState(!1),n=_t.useRef(),i=_t.useRef(),a=_t.useRef(.001);_t.useLayoutEffect(()=>(i.current=Xe.context(()=>{n.current&&n.current.progress(0).kill(),n.current=Xe.timeline({paused:!0,defaults:{duration:0}})}),()=>i.current.revert()),[]);const l=_t.useCallback(()=>{let b=n.current.time();a.current=b},[]);_t.useEffect(()=>{const m=n.current;m.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){m.pause(),l()}).eventCallback("onUpdate",function(){l()}).eventCallback("onPause",function(){l()}).eventCallback("onResume",function(){l()}).eventCallback("onComplete",function(){m.pause(),m.revert(),Ea(qe.COMPLETE,{uniqueId:"timeline"}),console.log("Emitted events"),l()})},[]);const u=_t.useCallback(()=>{n.current.revert()},[]),f=_t.useCallback(()=>{n.current.restart()},[]),h=_t.useCallback(()=>{const m=n.current;m.repeat(1),m.restart()},[]),p=_t.useCallback(m=>{n.current.seek(m)},[]),d=_t.useCallback(()=>{n.current.seek(4)},[]),c=_t.useCallback(()=>{const m=n.current;return m?m.totalDuration():0},[]),v=()=>{n.current.pause(),Ea(qe.PAUSE)},y=()=>{n.current.resume(),Ea(qe.RESUME)};return wr(qe.SEEK_START,()=>{r(!0)}),wr(qe.SCRUBBER_PLAY,()=>{y()}),wr(qe.SCRUBBER_PAUSE,()=>{v()}),wr(qe.SCRUBBER_SEEK,m=>{p(m)}),wr(qe.SEEK_END,()=>{r(!1)}),wr(qe.SCRUBBER_PROGRESS_UPDATE,m=>{}),Zt.jsx(mi.Provider,{value:{gsapCtx:i,tl:n,handlePlay:y,handlePause:v,handleReset:u,handleSeek:p,handleSeekTest:d,handleRestart:f,handleRepeat:h,playerTimeRef:a,isDragging:t,getTimelineDuration:c},children:e})},M1=e=>{let t={};switch(e){case"NONE":case"none":break;case"BOUNCE_IN":t.from={duration:2,ease:"bounce.out",y:-1500};break;case"BOUNCE_IN_DOWN":t.from={ease:"bounce.out",y:-1500,duration:2};break;case"BOUNCE_IN_LEFT":t.from={ease:"bounce.out",x:-1500,duration:2};break;case"BOUNCE_IN_RIGHT":t.from={ease:"bounce.out",x:1500,duration:2};break;case"BOUNCE_IN_UP":t.from={ease:"bounce.out",y:1500,duration:2};break;case"BOUNCE_OUT":t.from={ease:"bounce.in",y:2,duration:2};break;case"BOUNCE_OUT_DOWN":break;case"BOUNCE_OUT_LEFT":break;case"BOUNCE_OUT_RIGHT":break;case"BOUNCE_OUT_UP":break;case"FADE_IN":t.to={ease:"power4.in",alpha:1,duration:.5};break;case"FADE_IN_DOWN":t.fromTo={from:{y:-1e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break;case"FADE_IN_LEFT":t.fromTo={from:{x:-1e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_RIGHT":t.fromTo={from:{x:2e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_UP":t.fromTo={from:{y:2e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break}return t};var k1=Object.prototype;function L1(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||k1;return e===r}var ad=L1;function F1(e,t){return function(r){return e(t(r))}}var B1=F1,U1=B1,D1=U1(Object.keys,Object),$1=D1,G1=ad,q1=$1,j1=Object.prototype,H1=j1.hasOwnProperty;function z1(e){if(!G1(e))return q1(e);var t=[];for(var r in Object(e))H1.call(e,r)&&r!="constructor"&&t.push(r);return t}var od=z1,V1=typeof Ke=="object"&&Ke&&Ke.Object===Object&&Ke,ld=V1,W1=ld,X1=typeof self=="object"&&self&&self.Object===Object&&self,K1=W1||X1||Function("return this")(),Br=K1,Y1=Br,Z1=Y1.Symbol,wa=Z1,ud=wa,fd=Object.prototype,J1=fd.hasOwnProperty,Q1=fd.toString,fs=ud?ud.toStringTag:void 0;function tb(e){var t=J1.call(e,fs),r=e[fs];try{e[fs]=void 0;var n=!0}catch{}var i=Q1.call(e);return n&&(t?e[fs]=r:delete e[fs]),i}var eb=tb,rb=Object.prototype,nb=rb.toString;function ib(e){return nb.call(e)}var sb=ib,cd=wa,ab=eb,ob=sb,lb="[object Null]",ub="[object Undefined]",hd=cd?cd.toStringTag:void 0;function fb(e){return e==null?e===void 0?ub:lb:hd&&hd in Object(e)?ab(e):ob(e)}var cs=fb;function cb(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var hs=cb,hb=cs,db=hs,pb="[object AsyncFunction]",vb="[object Function]",gb="[object GeneratorFunction]",yb="[object Proxy]";function mb(e){if(!db(e))return!1;var t=hb(e);return t==vb||t==gb||t==pb||t==yb}var dd=mb,_b=Br,bb=_b["__core-js_shared__"],xb=bb,Zl=xb,pd=function(){var e=/[^.]+$/.exec(Zl&&Zl.keys&&Zl.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Eb(e){return!!pd&&pd in e}var wb=Eb,Tb=Function.prototype,Ab=Tb.toString;function Sb(e){if(e!=null){try{return Ab.call(e)}catch{}try{return e+""}catch{}}return""}var vd=Sb,Ob=dd,Ib=wb,Rb=hs,Cb=vd,Nb=/[\\^$.*+?()[\]{}|]/g,Pb=/^\[object .+?Constructor\]$/,Mb=Function.prototype,kb=Object.prototype,Lb=Mb.toString,Fb=kb.hasOwnProperty,Bb=RegExp("^"+Lb.call(Fb).replace(Nb,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ub(e){if(!Rb(e)||Ib(e))return!1;var t=Ob(e)?Bb:Pb;return t.test(Cb(e))}var Db=Ub;function $b(e,t){return e==null?void 0:e[t]}var Gb=$b,qb=Db,jb=Gb;function Hb(e,t){var r=jb(e,t);return qb(r)?r:void 0}var _i=Hb,zb=_i,Vb=Br,Wb=zb(Vb,"DataView"),Xb=Wb,Kb=_i,Yb=Br,Zb=Kb(Yb,"Map"),Jl=Zb,Jb=_i,Qb=Br,tx=Jb(Qb,"Promise"),ex=tx,rx=_i,nx=Br,ix=rx(nx,"Set"),sx=ix,ax=_i,ox=Br,lx=ax(ox,"WeakMap"),ux=lx,Ql=Xb,tu=Jl,eu=ex,ru=sx,nu=ux,gd=cs,bi=vd,yd="[object Map]",fx="[object Object]",md="[object Promise]",_d="[object Set]",bd="[object WeakMap]",xd="[object DataView]",cx=bi(Ql),hx=bi(tu),dx=bi(eu),px=bi(ru),vx=bi(nu),Un=gd;(Ql&&Un(new Ql(new ArrayBuffer(1)))!=xd||tu&&Un(new tu)!=yd||eu&&Un(eu.resolve())!=md||ru&&Un(new ru)!=_d||nu&&Un(new nu)!=bd)&&(Un=function(e){var t=gd(e),r=t==fx?e.constructor:void 0,n=r?bi(r):"";if(n)switch(n){case cx:return xd;case hx:return yd;case dx:return md;case px:return _d;case vx:return bd}return t});var Ed=Un;function gx(e){return e!=null&&typeof e=="object"}var ds=gx,yx=cs,mx=ds,_x="[object Arguments]";function bx(e){return mx(e)&&yx(e)==_x}var xx=bx,wd=xx,Ex=ds,Td=Object.prototype,wx=Td.hasOwnProperty,Tx=Td.propertyIsEnumerable,Ax=wd(function(){return arguments}())?wd:function(e){return Ex(e)&&wx.call(e,"callee")&&!Tx.call(e,"callee")},iu=Ax,Sx=Array.isArray,Ur=Sx,Ox=9007199254740991;function Ix(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ox}var su=Ix,Rx=dd,Cx=su;function Nx(e){return e!=null&&Cx(e.length)&&!Rx(e)}var Ta=Nx,Aa={exports:{}};function Px(){return!1}var Mx=Px;Aa.exports,function(e,t){var r=Br,n=Mx,i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,l=a&&a.exports===i,u=l?r.Buffer:void 0,f=u?u.isBuffer:void 0,h=f||n;e.exports=h}(Aa,Aa.exports);var au=Aa.exports,kx=cs,Lx=su,Fx=ds,Bx="[object Arguments]",Ux="[object Array]",Dx="[object Boolean]",$x="[object Date]",Gx="[object Error]",qx="[object Function]",jx="[object Map]",Hx="[object Number]",zx="[object Object]",Vx="[object RegExp]",Wx="[object Set]",Xx="[object String]",Kx="[object WeakMap]",Yx="[object ArrayBuffer]",Zx="[object DataView]",Jx="[object Float32Array]",Qx="[object Float64Array]",tE="[object Int8Array]",eE="[object Int16Array]",rE="[object Int32Array]",nE="[object Uint8Array]",iE="[object Uint8ClampedArray]",sE="[object Uint16Array]",aE="[object Uint32Array]",se={};se[Jx]=se[Qx]=se[tE]=se[eE]=se[rE]=se[nE]=se[iE]=se[sE]=se[aE]=!0,se[Bx]=se[Ux]=se[Yx]=se[Dx]=se[Zx]=se[$x]=se[Gx]=se[qx]=se[jx]=se[Hx]=se[zx]=se[Vx]=se[Wx]=se[Xx]=se[Kx]=!1;function oE(e){return Fx(e)&&Lx(e.length)&&!!se[kx(e)]}var lE=oE;function uE(e){return function(t){return e(t)}}var fE=uE,Sa={exports:{}};Sa.exports,function(e,t){var r=ld,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===n,l=a&&r.process,u=function(){try{var f=i&&i.require&&i.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}}();e.exports=u}(Sa,Sa.exports);var cE=Sa.exports,hE=lE,dE=fE,Ad=cE,Sd=Ad&&Ad.isTypedArray,pE=Sd?dE(Sd):hE,ou=pE,vE=od,gE=Ed,yE=iu,mE=Ur,_E=Ta,bE=au,xE=ad,EE=ou,wE="[object Map]",TE="[object Set]",AE=Object.prototype,SE=AE.hasOwnProperty;function OE(e){if(e==null)return!0;if(_E(e)&&(mE(e)||typeof e=="string"||typeof e.splice=="function"||bE(e)||EE(e)||yE(e)))return!e.length;var t=gE(e);if(t==wE||t==TE)return!e.size;if(xE(e))return!vE(e).length;for(var r in e)if(SE.call(e,r))return!1;return!0}var IE=OE;const xi=Tn(IE),RE=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Ei=Tt.forwardRef((e,t)=>{const[r,n]=Tt.useState(!1),[i,a]=_t.useState(!1),[l,u]=_t.useState(!1),[f,h]=_t.useState(e.initialAlpha),p=_t.useRef(null),d=_t.useRef(null),c=_t.useRef(null),v=_t.useRef(null),y=_t.useRef(e.initialAlpha),{tl:m}=_t.useContext(mi),{uniqueId:b,startAt:_,endAt:E,initialAlpha:w,transformation:{x,y:A,width:C,height:S,scale:O=[1,1],rotation:L=0,colorCorrection:R,animation:I,effect:N},applyTransformer:k,disabled:F,ignoreTlForVideo:q,pointerdown:X,pointerout:z,pointerover:it}=e;console.log("abstractallProps",e);const{contrast:Z=1,saturation:$=1,brightness:M=1,alpha:U=1,blurRadius:j=0}=R||{},V={...M>1&&{brightness:M},...Z>1&&{contrast:Z},...$>1&&{saturation:$},...U!==0&&{alpha:U}};wr(qe.COMPLETE,()=>{p.current&&(y.current=w,h(w))}),Tt.useImperativeHandle(t,()=>({getIsTransformerDragging:()=>i,getIsMouseOverTransformer:()=>l}),[i,l]),Tt.useEffect(()=>{p.current&&n(!0)},[]);const Y=()=>{console.log("gsapOnAlphaComplete complete")};Tt.useEffect(()=>{let nt=Xe.context(()=>{});if(p.current&&m.current){const ht={alpha:1,duration:Number(E)-Number(_)},vt=M1(I||"None");nt=Xe.context(()=>{var mt,xt;m.current.to(p.current,{alpha:1,duration:.1},_).to(p.current,{alpha:0,duration:.1,onComplete:Y},Number(E)-.09),q||m.current.from(p.current,{...ht},_),xi(vt.from)?xi(vt.to)?xi(vt.fromTo)||m.current.fromTo(p.current,(mt=vt.fromTo)==null?void 0:mt.from,(xt=vt.fromTo)==null?void 0:xt.to,_):m.current.to(p.current,{...vt.to},_):m.current.from(p.current,{...vt.from},_)})}return()=>nt.revert()},[I,_,E,q]);const G=Tt.useCallback(()=>{a(!0)},[]),W=Tt.useCallback(nt=>{console.log("changeEnd",nt),e.onAnchorTransformationEnd&&(console.log("running onAnchorTransformationEnd"),e.onAnchorTransformationEnd(nt)),a(!1)},[]),tt=pe.withFilters(pe.Container,{...j>0&&{blur:wn.filters.BlurFilter},...!xi(V)&&{adjust:R1},matrix:wn.filters.ColorMatrixFilter}),et=(R==null?void 0:R.enabled)||N&&N!==Bn.Normal;return console.log("uniqueId + alpha",b,y.current,f),Zt.jsxs(pe.Container,{ref:d,children:[Zt.jsx(pe.Container,{ref:p,alpha:y.current||f,position:[x,A],pivot:[x,A],width:C,height:S,scale:O,rotation:L,...!F&&!i&&{interactive:!0,buttonMode:!0,pointerdown:X,pointerover:it,pointerout:z},children:Zt.jsxs(pe.Container,{children:[et&&Zt.jsx(tt,{scale:1,blur:{blur:j,quality:4},adjust:V,apply:({matrix:nt})=>{N===Bn.BlackAndWhite?nt.desaturate():N===Bn.Sepia?nt.sepia():N===Bn.RetroVintage||N===Bn.NightVision?nt.negative():N===Bn.Normal&&nt.reset()},matrix:{enabled:!0,matrix:RE},children:Zt.jsx(pe.Container,{ref:c,children:e.children})}),!et&&Zt.jsx(pe.Container,{ref:c,children:e.children})]})},b),k&&Zt.jsx(C1,{pixiTransformerRef:v,imageRef:p,isMounted:r,transformCommit:W,transformChange:G,mouseoverEvent:u,uniqueId:b})]},b)});Ei.whyDidYouRender={logOnDifferentValues:!0,customName:"AbstractContainer"};const CE=Tt.forwardRef((e,t)=>{const r=_t.useRef(null),n=_t.useRef(null),{src:i,transformation:{x:a,y:l,width:u,height:f,anchor:h},pointerdown:p,pointerup:d}=e;return Zt.jsx(Ei,{...e,ref:t,children:Zt.jsx(pe.Container,{ref:n,children:Zt.jsx(pe.Sprite,{image:i,width:u,height:f,anchor:h,ref:r,x:a,y:l,interactive:!0,pointerdown:p,pointerup:d})})})}),Oa={build(e){const t=e.points;let r,n,i,a,l,u;if(e.type===Re.CIRC){const y=e.shape;r=y.x,n=y.y,l=u=y.radius,i=a=0}else if(e.type===Re.ELIP){const y=e.shape;r=y.x,n=y.y,l=y.width,u=y.height,i=a=0}else{const y=e.shape,m=y.width/2,b=y.height/2;r=y.x+m,n=y.y+b,l=u=Math.max(0,Math.min(y.radius,Math.min(m,b))),i=m-l,a=b-u}if(!(l>=0&&u>=0&&i>=0&&a>=0)){t.length=0;return}const f=Math.ceil(2.3*Math.sqrt(l+u)),h=f*8+(i?4:0)+(a?4:0);if(t.length=h,h===0)return;if(f===0){t.length=8,t[0]=t[6]=r+i,t[1]=t[3]=n+a,t[2]=t[4]=r-i,t[5]=t[7]=n-a;return}let p=0,d=f*4+(i?2:0)+2,c=d,v=h;{const y=i+l,m=a,b=r+y,_=r-y,E=n+m;if(t[p++]=b,t[p++]=E,t[--d]=E,t[--d]=_,a){const w=n-m;t[c++]=_,t[c++]=w,t[--v]=w,t[--v]=b}}for(let y=1;y<f;y++){const m=Math.PI/2*(y/f),b=i+Math.cos(m)*l,_=a+Math.sin(m)*u,E=r+b,w=r-b,x=n+_,A=n-_;t[p++]=E,t[p++]=x,t[--d]=x,t[--d]=w,t[c++]=w,t[c++]=A,t[--v]=A,t[--v]=E}{const y=i,m=a+u,b=r+y,_=r-y,E=n+m,w=n-m;t[p++]=b,t[p++]=E,t[--v]=w,t[--v]=b,i&&(t[p++]=_,t[p++]=E,t[--v]=w,t[--v]=_)}},triangulate(e,t){const r=e.points,n=t.points,i=t.indices;if(r.length===0)return;let a=n.length/2;const l=a;let u,f;if(e.type!==Re.RREC){const p=e.shape;u=p.x,f=p.y}else{const p=e.shape;u=p.x+p.width/2,f=p.y+p.height/2}const h=e.matrix;n.push(e.matrix?h.a*u+h.c*f+h.tx:u,e.matrix?h.b*u+h.d*f+h.ty:f),a++,n.push(r[0],r[1]);for(let p=2;p<r.length;p+=2)n.push(r[p],r[p+1]),i.push(a++,l,a);i.push(l+1,l,a)}};function Od(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let i=0,a=e[r-2],l=e[r-1];i<r;i+=2){const u=e[i],f=e[i+1];n+=(u-a)*(f+l),a=u,l=f}if(!t&&n>0||t&&n<=0){const i=r/2;for(let a=i+i%2;a<r;a+=2){const l=r-a-2,u=r-a-1,f=a,h=a+1;[e[l],e[f]]=[e[f],e[l]],[e[u],e[h]]=[e[h],e[u]]}}}const Id={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let r=e.points;const n=e.holes,i=t.points,a=t.indices;if(r.length>=6){Od(r,!1);const l=[];for(let h=0;h<n.length;h++){const p=n[h];Od(p.points,!0),l.push(r.length/2),r=r.concat(p.points)}const u=jy(r,l,2);if(!u)return;const f=i.length/2;for(let h=0;h<u.length;h+=3)a.push(u[h]+f),a.push(u[h+1]+f),a.push(u[h+2]+f);for(let h=0;h<r.length;h++)i.push(r[h])}}},NE={build(e){const t=e.shape,r=t.x,n=t.y,i=t.width,a=t.height,l=e.points;l.length=0,i>=0&&a>=0&&l.push(r,n,r+i,n,r+i,n+a,r,n+a)},triangulate(e,t){const r=e.points,n=t.points;if(r.length===0)return;const i=n.length/2;n.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),t.indices.push(i,i+1,i+2,i+1,i+2,i+3)}},PE={build(e){Oa.build(e)},triangulate(e,t){Oa.triangulate(e,t)}};var Tr=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(Tr||{}),Dn=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(Dn||{});const wi={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 Rd{static curveTo(t,r,n,i,a,l){const u=l[l.length-2],h=l[l.length-1]-r,p=u-t,d=i-r,c=n-t,v=Math.abs(h*c-p*d);if(v<1e-8||a===0)return(l[l.length-2]!==t||l[l.length-1]!==r)&&l.push(t,r),null;const y=h*h+p*p,m=d*d+c*c,b=h*d+p*c,_=a*Math.sqrt(y)/v,E=a*Math.sqrt(m)/v,w=_*b/y,x=E*b/m,A=_*c+E*p,C=_*d+E*h,S=p*(E+w),O=h*(E+w),L=c*(_+x),R=d*(_+x),I=Math.atan2(O-C,S-A),N=Math.atan2(R-C,L-A);return{cx:A+t,cy:C+r,radius:a,startAngle:I,endAngle:N,anticlockwise:p*d>c*h}}static arc(t,r,n,i,a,l,u,f,h){const p=u-l,d=wi._segmentsCount(Math.abs(p)*a,Math.ceil(Math.abs(p)/ia)*40),c=p/(d*2),v=c*2,y=Math.cos(c),m=Math.sin(c),b=d-1,_=b%1/b;for(let E=0;E<=b;++E){const w=E+_*E,x=c+l+v*w,A=Math.cos(x),C=-Math.sin(x);h.push((y*A+m*C)*a+n,(y*-C+m*A)*a+i)}}}class ME{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 lu{static curveLength(t,r,n,i,a,l,u,f){let p=0,d=0,c=0,v=0,y=0,m=0,b=0,_=0,E=0,w=0,x=0,A=t,C=r;for(let S=1;S<=10;++S)d=S/10,c=d*d,v=c*d,y=1-d,m=y*y,b=m*y,_=b*t+3*m*d*n+3*y*c*a+v*u,E=b*r+3*m*d*i+3*y*c*l+v*f,w=A-_,x=C-E,A=_,C=E,p+=Math.sqrt(w*w+x*x);return p}static curveTo(t,r,n,i,a,l,u){const f=u[u.length-2],h=u[u.length-1];u.length-=2;const p=wi._segmentsCount(lu.curveLength(f,h,t,r,n,i,a,l));let d=0,c=0,v=0,y=0,m=0;u.push(f,h);for(let b=1,_=0;b<=p;++b)_=b/p,d=1-_,c=d*d,v=c*d,y=_*_,m=y*_,u.push(v*f+3*c*_*t+3*d*y*n+m*a,v*h+3*c*_*r+3*d*y*i+m*l)}}function Cd(e,t,r,n,i,a,l,u){const f=e-r*i,h=t-n*i,p=e+r*a,d=t+n*a;let c,v;l?(c=n,v=-r):(c=-n,v=r);const y=f+c,m=h+v,b=p+c,_=d+v;return u.push(y,m,b,_),2}function $n(e,t,r,n,i,a,l,u){const f=r-e,h=n-t;let p=Math.atan2(f,h),d=Math.atan2(i-e,a-t);u&&p<d?p+=Math.PI*2:!u&&p>d&&(d+=Math.PI*2);let c=p;const v=d-p,y=Math.abs(v),m=Math.sqrt(f*f+h*h),b=(15*y*Math.sqrt(m)/Math.PI>>0)+1,_=v/b;if(c+=_,u){l.push(e,t,r,n);for(let E=1,w=c;E<b;E++,w+=_)l.push(e,t,e+Math.sin(w)*m,t+Math.cos(w)*m);l.push(e,t,i,a)}else{l.push(r,n,e,t);for(let E=1,w=c;E<b;E++,w+=_)l.push(e+Math.sin(w)*m,t+Math.cos(w)*m,e,t);l.push(i,a,e,t)}return b*2}function kE(e,t){const r=e.shape;let n=e.points||r.points.slice();const i=t.closePointEps;if(n.length===0)return;const a=e.lineStyle,l=new Oe(n[0],n[1]),u=new Oe(n[n.length-2],n[n.length-1]),f=r.type!==Re.POLY||r.closeStroke,h=Math.abs(l.x-u.x)<i&&Math.abs(l.y-u.y)<i;if(f){n=n.slice(),h&&(n.pop(),n.pop(),u.set(n[n.length-2],n[n.length-1]));const z=(l.x+u.x)*.5,it=(u.y+l.y)*.5;n.unshift(z,it),n.push(z,it)}const p=t.points,d=n.length/2;let c=n.length;const v=p.length/2,y=a.width/2,m=y*y,b=a.miterLimit*a.miterLimit;let _=n[0],E=n[1],w=n[2],x=n[3],A=0,C=0,S=-(E-x),O=_-w,L=0,R=0,I=Math.sqrt(S*S+O*O);S/=I,O/=I,S*=y,O*=y;const N=a.alignment,k=(1-N)*2,F=N*2;f||(a.cap===Dn.ROUND?c+=$n(_-S*(k-F)*.5,E-O*(k-F)*.5,_-S*k,E-O*k,_+S*F,E+O*F,p,!0)+2:a.cap===Dn.SQUARE&&(c+=Cd(_,E,S,O,k,F,!0,p))),p.push(_-S*k,E-O*k,_+S*F,E+O*F);for(let z=1;z<d-1;++z){_=n[(z-1)*2],E=n[(z-1)*2+1],w=n[z*2],x=n[z*2+1],A=n[(z+1)*2],C=n[(z+1)*2+1],S=-(E-x),O=_-w,I=Math.sqrt(S*S+O*O),S/=I,O/=I,S*=y,O*=y,L=-(x-C),R=w-A,I=Math.sqrt(L*L+R*R),L/=I,R/=I,L*=y,R*=y;const it=w-_,Z=E-x,$=w-A,M=C-x,U=it*$+Z*M,j=Z*$-M*it,V=j<0;if(Math.abs(j)<.001*Math.abs(U)){p.push(w-S*k,x-O*k,w+S*F,x+O*F),U>=0&&(a.join===Tr.ROUND?c+=$n(w,x,w-S*k,x-O*k,w-L*k,x-R*k,p,!1)+4:c+=2,p.push(w-L*F,x-R*F,w+L*k,x+R*k));continue}const Y=(-S+_)*(-O+x)-(-S+w)*(-O+E),G=(-L+A)*(-R+x)-(-L+w)*(-R+C),W=(it*G-$*Y)/j,tt=(M*Y-Z*G)/j,et=(W-w)*(W-w)+(tt-x)*(tt-x),nt=w+(W-w)*k,ht=x+(tt-x)*k,vt=w-(W-w)*F,mt=x-(tt-x)*F,xt=Math.min(it*it+Z*Z,$*$+M*M),Rt=V?k:F,ve=xt+Rt*Rt*m,Wt=et<=ve;let st=a.join;if(st===Tr.MITER&&et/m>b&&(st=Tr.BEVEL),Wt)switch(st){case Tr.MITER:{p.push(nt,ht,vt,mt);break}case Tr.BEVEL:{V?p.push(nt,ht,w+S*F,x+O*F,nt,ht,w+L*F,x+R*F):p.push(w-S*k,x-O*k,vt,mt,w-L*k,x-R*k,vt,mt),c+=2;break}case Tr.ROUND:{V?(p.push(nt,ht,w+S*F,x+O*F),c+=$n(w,x,w+S*F,x+O*F,w+L*F,x+R*F,p,!0)+4,p.push(nt,ht,w+L*F,x+R*F)):(p.push(w-S*k,x-O*k,vt,mt),c+=$n(w,x,w-S*k,x-O*k,w-L*k,x-R*k,p,!1)+4,p.push(w-L*k,x-R*k,vt,mt));break}}else{switch(p.push(w-S*k,x-O*k,w+S*F,x+O*F),st){case Tr.MITER:{V?p.push(vt,mt,vt,mt):p.push(nt,ht,nt,ht),c+=2;break}case Tr.ROUND:{V?c+=$n(w,x,w+S*F,x+O*F,w+L*F,x+R*F,p,!0)+2:c+=$n(w,x,w-S*k,x-O*k,w-L*k,x-R*k,p,!1)+2;break}}p.push(w-L*k,x-R*k,w+L*F,x+R*F),c+=2}}_=n[(d-2)*2],E=n[(d-2)*2+1],w=n[(d-1)*2],x=n[(d-1)*2+1],S=-(E-x),O=_-w,I=Math.sqrt(S*S+O*O),S/=I,O/=I,S*=y,O*=y,p.push(w-S*k,x-O*k,w+S*F,x+O*F),f||(a.cap===Dn.ROUND?c+=$n(w-S*(k-F)*.5,x-O*(k-F)*.5,w-S*k,x-O*k,w+S*F,x+O*F,p,!1)+2:a.cap===Dn.SQUARE&&(c+=Cd(w,x,S,O,k,F,!1,p)));const q=t.indices,X=wi.epsilon*wi.epsilon;for(let z=v;z<c+v-2;++z)_=p[z*2],E=p[z*2+1],w=p[(z+1)*2],x=p[(z+1)*2+1],A=p[(z+2)*2],C=p[(z+2)*2+1],!(Math.abs(_*(x-C)+w*(C-E)+A*(E-x))<X)&&q.push(z,z+1,z+2)}function LE(e,t){let r=0;const n=e.shape,i=e.points||n.points,a=n.type!==Re.POLY||n.closeStroke;if(i.length===0)return;const l=t.points,u=t.indices,f=i.length/2,h=l.length/2;let p=h;for(l.push(i[0],i[1]),r=1;r<f;r++)l.push(i[r*2],i[r*2+1]),u.push(p,p+1),p++;a&&u.push(p,h)}function Nd(e,t){e.lineStyle.native?LE(e,t):kE(e,t)}class uu{static curveLength(t,r,n,i,a,l){const u=t-2*n+a,f=r-2*i+l,h=2*n-2*t,p=2*i-2*r,d=4*(u*u+f*f),c=4*(u*h+f*p),v=h*h+p*p,y=2*Math.sqrt(d+c+v),m=Math.sqrt(d),b=2*d*m,_=2*Math.sqrt(v),E=c/m;return(b*y+m*c*(y-_)+(4*v*d-c*c)*Math.log((2*m+E+y)/(E+_)))/(4*b)}static curveTo(t,r,n,i,a){const l=a[a.length-2],u=a[a.length-1],f=wi._segmentsCount(uu.curveLength(l,u,t,r,n,i));let h=0,p=0;for(let d=1;d<=f;++d){const c=d/f;h=l+(t-l)*c,p=u+(r-u)*c,a.push(h+(t+(n-t)*c-h)*c,p+(r+(i-r)*c-p)*c)}}}const fu={[Re.POLY]:Id,[Re.CIRC]:Oa,[Re.ELIP]:Oa,[Re.RECT]:NE,[Re.RREC]:PE},Pd=[],Ia=[];class cu{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?ee.EMPTY:(t=t||new ee(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:i,c:a,d:l,tx:u,ty:f}=t,h=n*r.x+a*r.y+u,p=i*r.x+l*r.y+f;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,p),this.maxY=Math.max(this.maxY,p)}addQuad(t){let r=this.minX,n=this.minY,i=this.maxX,a=this.maxY,l=t[0],u=t[1];r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,a=u>a?u:a,l=t[2],u=t[3],r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,a=u>a?u:a,l=t[4],u=t[5],r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,a=u>a?u:a,l=t[6],u=t[7],r=l<r?l:r,n=u<n?u:n,i=l>i?l:i,a=u>a?u:a,this.minX=r,this.minY=n,this.maxX=i,this.maxY=a}addFrame(t,r,n,i,a){this.addFrameMatrix(t.worldTransform,r,n,i,a)}addFrameMatrix(t,r,n,i,a){const l=t.a,u=t.b,f=t.c,h=t.d,p=t.tx,d=t.ty;let c=this.minX,v=this.minY,y=this.maxX,m=this.maxY,b=l*r+f*n+p,_=u*r+h*n+d;c=b<c?b:c,v=_<v?_:v,y=b>y?b:y,m=_>m?_:m,b=l*i+f*n+p,_=u*i+h*n+d,c=b<c?b:c,v=_<v?_:v,y=b>y?b:y,m=_>m?_:m,b=l*r+f*a+p,_=u*r+h*a+d,c=b<c?b:c,v=_<v?_:v,y=b>y?b:y,m=_>m?_:m,b=l*i+f*a+p,_=u*i+h*a+d,c=b<c?b:c,v=_<v?_:v,y=b>y?b:y,m=_>m?_:m,this.minX=c,this.minY=v,this.maxX=y,this.maxY=m}addVertexData(t,r,n){let i=this.minX,a=this.minY,l=this.maxX,u=this.maxY;for(let f=r;f<n;f+=2){const h=t[f],p=t[f+1];i=h<i?h:i,a=p<a?p:a,l=h>l?h:l,u=p>u?p:u}this.minX=i,this.minY=a,this.maxX=l,this.maxY=u}addVertices(t,r,n,i){this.addVerticesMatrix(t.worldTransform,r,n,i)}addVerticesMatrix(t,r,n,i,a=0,l=a){const u=t.a,f=t.b,h=t.c,p=t.d,d=t.tx,c=t.ty;let v=this.minX,y=this.minY,m=this.maxX,b=this.maxY;for(let _=n;_<i;_+=2){const E=r[_],w=r[_+1],x=u*E+h*w+d,A=p*w+f*E+c;v=Math.min(v,x-a),m=Math.max(m,x+a),y=Math.min(y,A-l),b=Math.max(b,A+l)}this.minX=v,this.minY=y,this.maxX=m,this.maxY=b}addBounds(t){const r=this.minX,n=this.minY,i=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>i?t.maxX:i,this.maxY=t.maxY>a?t.maxY:a}addBoundsMask(t,r){const n=t.minX>r.minX?t.minX:r.minX,i=t.minY>r.minY?t.minY:r.minY,a=t.maxX<r.maxX?t.maxX:r.maxX,l=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=a&&i<=l){const u=this.minX,f=this.minY,h=this.maxX,p=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=a>h?a:h,this.maxY=l>p?l: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,i=t.minY>r.y?t.minY:r.y,a=t.maxX<r.x+r.width?t.maxX:r.x+r.width,l=t.maxY<r.y+r.height?t.maxY:r.y+r.height;if(n<=a&&i<=l){const u=this.minX,f=this.minY,h=this.maxX,p=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=a>h?a:h,this.maxY=l>p?l:p}}pad(t=0,r=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)}addFramePad(t,r,n,i,a,l){t-=a,r-=l,n+=a,i+=l,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>i?this.maxY:i}}class Ti extends Bs{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Ul,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 cu,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 i=r[n];Object.defineProperty(Ti.prototype,i,Object.getOwnPropertyDescriptor(t,i))}}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 ee),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new ee),t=this._localBoundsRect),this._localBounds||(this._localBounds=new cu);const r=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;const i=this._bounds,a=this._boundsID;this._bounds=this._localBounds;const l=this.getBounds(!1,t);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-a,l}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,i){return r&&(t=r.toGlobal(t,n,i)),i||(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,i=1,a=0,l=0,u=0,f=0,h=0){return this.position.x=t,this.position.y=r,this.scale.x=n||1,this.scale.y=i||1,this.rotation=a,this.skew.x=l,this.skew.y=u,this.pivot.x=f,this.pivot.y=h,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 FE),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*w_}set angle(t){this.transform.rotation=t*T_}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 FE extends Ti{constructor(){super(...arguments),this.sortDirty=null}}Ti.prototype.displayObjectUpdateTransform=Ti.prototype.updateTransform;const BE=new Fe;function UE(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const hu=class extends Ti{constructor(){super(),this.children=[],this.sortableChildren=hu.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);ta(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,ta(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,ta(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,i=n-r;let a;if(i>0&&i<=n){a=this.children.splice(r,i);for(let l=0;l<a.length;++l)a[l].parent=null,a[l].transform&&(a[l].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let l=0;l<a.length;++l)a[l].emit("removed",this),this.emit("childRemoved",a[l],this,l);return a}else if(i===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(UE),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,i=this.children.length;n<i;++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!==hu.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=BE.copyFrom(n),n.prepend(i)):n=i),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let a=0,l=this.children.length;a<l;++a){const u=this.children[a],f=u.cullable;u.cullable=f||!this.cullArea,u.render(e),u.cullable=f}}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 i,a,l;const t=this.filters,r=this._mask;if(t){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let u=0;u<t.length;u++)t[u].enabled&&this._enabledFilters.push(t[u])}const n=t&&((i=this._enabledFilters)==null?void 0:i.length)||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==xe.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 u=0,f=this.children.length;u<f;++u)this.children[u].render(e)}n&&e.batch.flush(),r&&e.mask.pop(this),t&&((l=this._enabledFilters)!=null&&l.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 Ai=hu;Ai.defaultSortableChildren=!1,Ai.prototype.containerUpdateTransform=Ai.prototype.updateTransform,Object.defineProperties(jt,{SORTABLE_CHILDREN:{get(){return Ai.defaultSortableChildren},set(e){Jt("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Ai.defaultSortableChildren=e}}});class Ra{constructor(t,r=null,n=null,i=null){this.points=[],this.holes=[],this.shape=t,this.lineStyle=n,this.fillStyle=r,this.matrix=i,this.type=t.type}clone(){return new Ra(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 Si=new Oe,Md=class extends ph{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 cu,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(),Ia.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),Pd.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 i=new Ra(e,t,r,n);return this.graphicsData.push(i),this.dirty++,this}drawHole(e,t=null){if(!this.graphicsData.length)return null;const r=new Ra(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,Si):Si.copyFrom(e),n.shape.contains(Si.x,Si.y))){let i=!1;if(n.holes){for(let a=0;a<n.holes.length;a++)if(n.holes[a].shape.contains(Si.x,Si.y)){i=!0;break}}if(!i)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 u=this.shapeIndex;u<t.length;u++){this.shapeIndex++;const f=t[u],h=f.fillStyle,p=f.lineStyle;fu[f.type].build(f),f.matrix&&this.transformPoints(f.points,f.matrix),(h.visible||p.visible)&&this.processHoles(f.holes);for(let c=0;c<2;c++){const v=c===0?h:p;if(!v.visible)continue;const y=v.texture.baseTexture,m=this.indices.length,b=this.points.length/2;y.wrapMode=Vi.REPEAT,c===0?this.processFill(f):this.processLine(f);const _=this.points.length/2-b;_!==0&&(r&&!this._compareStyles(n,v)&&(r.end(m,b),r=null),r||(r=Pd.pop()||new ME,r.begin(v,m,b),this.batches.push(r),n=v),this.addUvs(this.points,e,v.texture,b,_,v.matrix))}}const i=this.indices.length,a=this.points.length/2;if(r&&r.end(i,a),this.batches.length===0){this.batchable=!0;return}const l=a>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&l===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=l?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,i=r.lineStyle;if(n&&!n.texture.baseTexture.valid||i&&!i.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 i=0;i<n.size;i++){const a=n.start+i;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<Md.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++zt._globalBatch;for(let p=0;p<this.drawCalls.length;p++)this.drawCalls[p].texArray.clear(),Ia.push(this.drawCalls[p]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=Ia.pop();n||(n=new kl,n.texArray=new $l),n.texArray.count=0,n.start=0,n.size=0,n.type=an.TRIANGLES;let i=0,a=null,l=0,u=!1,f=an.TRIANGLES,h=0;this.drawCalls.push(n);for(let p=0;p<this.batches.length;p++){const d=this.batches[p],c=8,v=d.style,y=v.texture.baseTexture;u!==!!v.native&&(u=!!v.native,f=u?an.LINES:an.TRIANGLES,a=null,i=c,e++),a!==y&&(a=y,y._batchEnabled!==e&&(i===c&&(e++,i=0,n.size>0&&(n=Ia.pop(),n||(n=new kl,n.texArray=new $l),this.drawCalls.push(n)),n.start=h,n.size=0,n.texArray.count=0,n.type=f),y.touched=1,y._batchEnabled=e,y._batchLocation=i,y.wrapMode=Vi.REPEAT,n.texArray.elements[n.texArray.count++]=y,i++)),n.size+=d.size,h+=d.size,l=y._batchLocation,this.addColors(t,v.color,v.alpha,d.attribSize,d.attribStart),this.addTextureIds(r,l,d.attribSize,d.attribStart)}zt._globalBatch=e,this.packAttributes()}packAttributes(){const e=this.points,t=this.uvs,r=this.colors,n=this.textureIds,i=new ArrayBuffer(e.length*3*4),a=new Float32Array(i),l=new Uint32Array(i);let u=0;for(let f=0;f<e.length/2;f++)a[u++]=e[f*2],a[u++]=e[f*2+1],a[u++]=t[f*2],a[u++]=t[f*2+1],l[u++]=r[f],a[u++]=n[f];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?Id.triangulate(e,this):fu[e.type].triangulate(e,this)}processLine(e){Nd(e,this);for(let t=0;t<e.holes.length;t++)Nd(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];fu[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],i=e[r*2+1];e[r*2]=t.a*n+t.c*i+t.tx,e[r*2+1]=t.b*n+t.d*i+t.ty}}addColors(e,t,r,n,i=0){const a=Ge.shared.setValue(t).toLittleEndianNumber(),l=Ge.shared.setValue(a).toPremultiplied(r);e.length=Math.max(e.length,i+n);for(let u=0;u<n;u++)e[i+u]=l}addTextureIds(e,t,r,n=0){e.length=Math.max(e.length,n+r);for(let i=0;i<r;i++)e[n+i]=t}addUvs(e,t,r,n,i,a=null){let l=0;const u=t.length,f=r.frame;for(;l<i;){let p=e[(n+l)*2],d=e[(n+l)*2+1];if(a){const c=a.a*p+a.c*d+a.tx;d=a.b*p+a.d*d+a.ty,p=c}l++,t.push(p/f.width,d/f.height)}const h=r.baseTexture;(f.width<h.width||f.height<h.height)&&this.adjustUvs(t,r,u,i)}adjustUvs(e,t,r,n){const i=t.baseTexture,a=1e-6,l=r+n*2,u=t.frame,f=u.width/i.width,h=u.height/i.height;let p=u.x/u.width,d=u.y/u.height,c=Math.floor(e[r]+a),v=Math.floor(e[r+1]+a);for(let y=r+2;y<l;y+=2)c=Math.min(c,Math.floor(e[y]+a)),v=Math.min(v,Math.floor(e[y+1]+a));p-=c,d-=v;for(let y=r;y<l;y+=2)e[y]=(e[y]+p)*f,e[y+1]=(e[y+1]+d)*h}};let kd=Md;kd.BATCHABLE_SIZE=100;class Ca{constructor(){this.color=16777215,this.alpha=1,this.texture=Vt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new Ca;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=Vt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class du extends Ca{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=Dn.BUTT,this.join=Tr.MITER,this.miterLimit=10}clone(){const t=new du;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 pu={},Na=class extends Ai{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 Ca,this._lineStyle=new du,this._matrix=null,this._holeMode=!1,this.state=ra.for2d(),this._geometry=e||new kd,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Ge(16777215),this.blendMode=It.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new Na(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,i=!1){return typeof e=="number"&&(e={width:e,color:t,alpha:r,alignment:n,native:i}),this.lineTextureStyle(e)}lineTextureStyle(e){const t={width:0,texture:Vt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:Dn.BUTT,join:Tr.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],i=r[r.length-1];return(n!==e||i!==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 i=this.currentPath.points;return i.length===0&&this.moveTo(0,0),uu.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,a){return this._initCurve(),lu.curveTo(e,t,r,n,i,a,this.currentPath.points),this}arcTo(e,t,r,n,i){this._initCurve(e,t);const a=this.currentPath.points,l=Rd.curveTo(e,t,r,n,i,a);if(l){const{cx:u,cy:f,radius:h,startAngle:p,endAngle:d,anticlockwise:c}=l;this.arc(u,f,h,p,d,c)}return this}arc(e,t,r,n,i,a=!1){if(n===i)return this;if(!a&&i<=n?i+=ia:a&&n<=i&&(n+=ia),i-n===0)return this;const u=e+Math.cos(n)*r,f=t+Math.sin(n)*r,h=this._geometry.closePointEps;let p=this.currentPath?this.currentPath.points:null;if(p){const d=Math.abs(p[p.length-2]-u),c=Math.abs(p[p.length-1]-f);d<h&&c<h||p.push(u,f)}else this.moveTo(u,f),p=this.currentPath.points;return Rd.arc(u,f,e,t,r,n,i,a,p),this}beginFill(e=0,t){return this.beginTextureFill({texture:Vt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Ge.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:Vt.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 ee(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new Fl(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new Ll(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new A_(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 i=new is(t);return i.closeStroke=r,this.drawShape(i),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===Re.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 i=e.batches[n],a=i.style.color,l=new Float32Array(this.vertexData.buffer,i.attribStart*4*2,i.attribSize*2),u=new Float32Array(e.uvsFloat32.buffer,i.attribStart*4*2,i.attribSize*2),f=new Uint16Array(e.indicesUint16.buffer,i.start*2,i.size),h={vertexData:l,blendMode:t,indices:f,uvs:u,_batchRGB:Ge.shared.setValue(a).toRgbArray(),_tintRGB:a,_texture:i.style.texture,alpha:i.style.alpha,worldAlpha:1};this.batches[n]=h}}_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,i=t.uniforms,a=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Ge.shared.setValue(this._tintColor).premultiply(n).toArray(i.tint),e.shader.bind(t),e.geometry.bind(r,t),e.state.set(this.state);for(let l=0,u=a.length;l<u;l++)this._renderDrawCallDirect(e,r.drawCalls[l])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:i,start:a}=t,l=r.count;for(let u=0;u<l;u++)e.texture.bind(r.elements[u],u);e.geometry.draw(n,i,a)}_resolveDirectShader(e){let t=this.shader;const r=this.pluginName;if(!t){if(!pu[r]){const{maxTextures:n}=e.plugins[r],i=new Int32Array(n);for(let u=0;u<n;u++)i[u]=u;const a={tint:new Float32Array([1,1,1,1]),translationMatrix:new Fe,default:mr.from({uSamplers:i},!0)},l=e.plugins[r]._shader.program;pu[r]=new as(l,a)}t=pu[r]}return t}_calculateBounds(){this.finishPoly();const e=this._geometry;if(!e.graphicsData.length)return;const{minX:t,minY:r,maxX:n,maxY:i}=e.bounds;this._bounds.addFrame(this.transform,t,r,n,i)}containsPoint(e){return this.worldTransform.applyInverse(e,Na._TEMP_POINT),this._geometry.containsPoint(Na._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=Ge.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,i=t.c,a=t.d,l=t.tx,u=t.ty,f=this._geometry.points,h=this.vertexData;let p=0;for(let d=0;d<f.length;d+=2){const c=f[d],v=f[d+1];h[p++]=r*c+i*v+l,h[p++]=a*v+n*c+u}}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 vu=Na;vu.curves=wi,vu._TEMP_POINT=new Oe;var DE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},gu={},$E={get exports(){return gu},set exports(e){gu=e}};/*!
|
|
540
540
|
* d-path-parser - v1.0.0
|
|
541
541
|
* by Massimo Artizzu (MaxArt2501)
|
|
542
542
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reacthub-pixitweenjs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.55",
|
|
4
4
|
"description": "reacthub-pixitweenjs is a library that provides a powerful combination of React, PixiJS, GSAP, and image manipulation capabilities in a timeline sequence. With this library, you can easily create stunning animations and interactive graphics for your React applications",
|
|
5
5
|
"author": "khanzzirfan <reacthub.ai@gmail.com>",
|
|
6
6
|
"main": "dist/index.es.js",
|