reacthub-pixitweenjs 0.2.103 → 0.2.104

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 CHANGED
@@ -11008,9 +11008,7 @@ const qs = (e) => {
11008
11008
  effect: c
11009
11009
  },
11010
11010
  pointerdown: v
11011
- } = e;
11012
- console.log("PixiImageSprite props", e);
11013
- const { blurRadius: y = 0 } = p, {
11011
+ } = e, { blurRadius: y = 0 } = p, {
11014
11012
  temperatureFilter: _,
11015
11013
  sharpnessFilter: b,
11016
11014
  hueFilter: m,
@@ -14131,9 +14129,7 @@ const Pi = /* @__PURE__ */ Zn(_M), BB = (e) => {
14131
14129
  loaded: !1,
14132
14130
  size: { width: 50, height: 50 },
14133
14131
  isDragging: !1
14134
- }, [, r] = Tt.useState(!1), n = Ft(null), i = Ft(t), o = Ft(null), { tl: a, dragModeRef: u } = Bs(Ui);
14135
- console.log("audio props", e);
14136
- const {
14132
+ }, [, r] = Tt.useState(!1), n = Ft(null), i = Ft(t), o = Ft(null), { tl: a, dragModeRef: u } = Bs(Ui), {
14137
14133
  uniqueId: f,
14138
14134
  src: h,
14139
14135
  startAt: d,
@@ -19123,7 +19119,7 @@ const eB = {
19123
19119
  });
19124
19120
  }
19125
19121
  return () => {
19126
- console.log("PixiGif Sprite Component cleanup"), v.current && (v.current.kill(), be.killTweensOf(v.current)), rt.revert();
19122
+ v.current && (v.current.kill(), be.killTweensOf(v.current)), rt.revert();
19127
19123
  };
19128
19124
  }, [M, T, x, E, I]), /* @__PURE__ */ Wt.jsx(
19129
19125
  ji,
package/dist/index.umd.js CHANGED
@@ -1920,7 +1920,7 @@ void main() {
1920
1920
  vec3 color = texColor.rgb;
1921
1921
  gl_FragColor = vec4(uNightVisionMatrix * vec3(color), texColor.a);
1922
1922
  }
1923
- `),t=[.393,.769,.189,.349,.686,.168,.272,.534,.131];return e.uniforms.uNightVisionMatrix=t,{nightVisionFilter:e}},gp=Et.forwardRef((e,t)=>{const r=mt.useRef(null),n=mt.useRef(null),{src:i,visible:o,transformation:{x:a,y:u,width:f,height:h,anchor:d,colorCorrection:p={},effect:c},pointerdown:v}=e;console.log("PixiImageSprite props",e);const{blurRadius:y=0}=p,{temperatureFilter:_,sharpnessFilter:b,hueFilter:m,blurFilter:w,adjustmentFilter:T}=_s(p),{nightVisionFilter:x}=XE();return Et.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),Vt.jsx(ni,{...e,ref:t,children:Vt.jsx(le.Container,{ref:n,children:Vt.jsx(le.Sprite,{image:i,width:f,height:h,anchor:d,ref:r,alpha:o?1:0,x:a,y:u,...o&&{interactive:!0,pointerdown:v},filters:[_,b,m,T,...y>0?[w]:[],...c===Sn.NightVision?[x]:[]]})})})});gp.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const Fo={build(e){const t=e.points;let r,n,i,o,a,u;if(e.type===Ne.CIRC){const y=e.shape;r=y.x,n=y.y,a=u=y.radius,i=o=0}else if(e.type===Ne.ELIP){const y=e.shape;r=y.x,n=y.y,a=y.width,u=y.height,i=o=0}else{const y=e.shape,_=y.width/2,b=y.height/2;r=y.x+_,n=y.y+b,a=u=Math.max(0,Math.min(y.radius,Math.min(_,b))),i=_-a,o=b-u}if(!(a>=0&&u>=0&&i>=0&&o>=0)){t.length=0;return}const f=Math.ceil(2.3*Math.sqrt(a+u)),h=f*8+(i?4:0)+(o?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+o,t[2]=t[4]=r-i,t[5]=t[7]=n-o;return}let d=0,p=f*4+(i?2:0)+2,c=p,v=h;{const y=i+a,_=o,b=r+y,m=r-y,w=n+_;if(t[d++]=b,t[d++]=w,t[--p]=w,t[--p]=m,o){const T=n-_;t[c++]=m,t[c++]=T,t[--v]=T,t[--v]=b}}for(let y=1;y<f;y++){const _=Math.PI/2*(y/f),b=i+Math.cos(_)*a,m=o+Math.sin(_)*u,w=r+b,T=r-b,x=n+m,E=n-m;t[d++]=w,t[d++]=x,t[--p]=x,t[--p]=T,t[c++]=T,t[c++]=E,t[--v]=E,t[--v]=w}{const y=i,_=o+u,b=r+y,m=r-y,w=n+_,T=n-_;t[d++]=b,t[d++]=w,t[--v]=T,t[--v]=b,i&&(t[d++]=m,t[d++]=w,t[--v]=T,t[--v]=m)}},triangulate(e,t){const r=e.points,n=t.points,i=t.indices;if(r.length===0)return;let o=n.length/2;const a=o;let u,f;if(e.type!==Ne.RREC){const d=e.shape;u=d.x,f=d.y}else{const d=e.shape;u=d.x+d.width/2,f=d.y+d.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),o++,n.push(r[0],r[1]);for(let d=2;d<r.length;d+=2)n.push(r[d],r[d+1]),i.push(o++,a,o);i.push(a+1,a,o)}};function mp(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let i=0,o=e[r-2],a=e[r-1];i<r;i+=2){const u=e[i],f=e[i+1];n+=(u-o)*(f+a),o=u,a=f}if(!t&&n>0||t&&n<=0){const i=r/2;for(let o=i+i%2;o<r;o+=2){const a=r-o-2,u=r-o-1,f=o,h=o+1;[e[a],e[f]]=[e[f],e[a]],[e[u],e[h]]=[e[h],e[u]]}}}const yp={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let r=e.points;const n=e.holes,i=t.points,o=t.indices;if(r.length>=6){mp(r,!1);const a=[];for(let h=0;h<n.length;h++){const d=n[h];mp(d.points,!0),a.push(r.length/2),r=r.concat(d.points)}const u=k_(r,a,2);if(!u)return;const f=i.length/2;for(let h=0;h<u.length;h+=3)o.push(u[h]+f),o.push(u[h+1]+f),o.push(u[h+2]+f);for(let h=0;h<r.length;h++)i.push(r[h])}}},KE={build(e){const t=e.shape,r=t.x,n=t.y,i=t.width,o=t.height,a=e.points;a.length=0,i>=0&&o>=0&&a.push(r,n,r+i,n,r+i,n+o,r,n+o)},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)}},YE={build(e){Fo.build(e)},triangulate(e,t){Fo.triangulate(e,t)}};var Sr=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(Sr||{}),jn=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(jn||{});const Si={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 _p{static curveTo(t,r,n,i,o,a){const u=a[a.length-2],h=a[a.length-1]-r,d=u-t,p=i-r,c=n-t,v=Math.abs(h*c-d*p);if(v<1e-8||o===0)return(a[a.length-2]!==t||a[a.length-1]!==r)&&a.push(t,r),null;const y=h*h+d*d,_=p*p+c*c,b=h*p+d*c,m=o*Math.sqrt(y)/v,w=o*Math.sqrt(_)/v,T=m*b/y,x=w*b/_,E=m*c+w*d,I=m*p+w*h,O=d*(w+T),A=h*(w+T),L=c*(m+x),R=p*(m+x),C=Math.atan2(A-I,O-E),P=Math.atan2(R-I,L-E);return{cx:E+t,cy:I+r,radius:o,startAngle:C,endAngle:P,anticlockwise:d*p>c*h}}static arc(t,r,n,i,o,a,u,f,h){const d=u-a,p=Si._segmentsCount(Math.abs(d)*o,Math.ceil(Math.abs(d)/go)*40),c=d/(p*2),v=c*2,y=Math.cos(c),_=Math.sin(c),b=p-1,m=b%1/b;for(let w=0;w<=b;++w){const T=w+m*w,x=c+a+v*T,E=Math.cos(x),I=-Math.sin(x);h.push((y*E+_*I)*o+n,(y*-I+_*E)*o+i)}}}class ZE{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 Su{static curveLength(t,r,n,i,o,a,u,f){let d=0,p=0,c=0,v=0,y=0,_=0,b=0,m=0,w=0,T=0,x=0,E=t,I=r;for(let O=1;O<=10;++O)p=O/10,c=p*p,v=c*p,y=1-p,_=y*y,b=_*y,m=b*t+3*_*p*n+3*y*c*o+v*u,w=b*r+3*_*p*i+3*y*c*a+v*f,T=E-m,x=I-w,E=m,I=w,d+=Math.sqrt(T*T+x*x);return d}static curveTo(t,r,n,i,o,a,u){const f=u[u.length-2],h=u[u.length-1];u.length-=2;const d=Si._segmentsCount(Su.curveLength(f,h,t,r,n,i,o,a));let p=0,c=0,v=0,y=0,_=0;u.push(f,h);for(let b=1,m=0;b<=d;++b)m=b/d,p=1-m,c=p*p,v=c*p,y=m*m,_=y*m,u.push(v*f+3*c*m*t+3*p*y*n+_*o,v*h+3*c*m*r+3*p*y*i+_*a)}}function bp(e,t,r,n,i,o,a,u){const f=e-r*i,h=t-n*i,d=e+r*o,p=t+n*o;let c,v;a?(c=n,v=-r):(c=-n,v=r);const y=f+c,_=h+v,b=d+c,m=p+v;return u.push(y,_,b,m),2}function qn(e,t,r,n,i,o,a,u){const f=r-e,h=n-t;let d=Math.atan2(f,h),p=Math.atan2(i-e,o-t);u&&d<p?d+=Math.PI*2:!u&&d>p&&(p+=Math.PI*2);let c=d;const v=p-d,y=Math.abs(v),_=Math.sqrt(f*f+h*h),b=(15*y*Math.sqrt(_)/Math.PI>>0)+1,m=v/b;if(c+=m,u){a.push(e,t,r,n);for(let w=1,T=c;w<b;w++,T+=m)a.push(e,t,e+Math.sin(T)*_,t+Math.cos(T)*_);a.push(e,t,i,o)}else{a.push(r,n,e,t);for(let w=1,T=c;w<b;w++,T+=m)a.push(e+Math.sin(T)*_,t+Math.cos(T)*_,e,t);a.push(i,o,e,t)}return b*2}function QE(e,t){const r=e.shape;let n=e.points||r.points.slice();const i=t.closePointEps;if(n.length===0)return;const o=e.lineStyle,a=new oe(n[0],n[1]),u=new oe(n[n.length-2],n[n.length-1]),f=r.type!==Ne.POLY||r.closeStroke,h=Math.abs(a.x-u.x)<i&&Math.abs(a.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=(a.x+u.x)*.5,nt=(u.y+a.y)*.5;n.unshift(z,nt),n.push(z,nt)}const d=t.points,p=n.length/2;let c=n.length;const v=d.length/2,y=o.width/2,_=y*y,b=o.miterLimit*o.miterLimit;let m=n[0],w=n[1],T=n[2],x=n[3],E=0,I=0,O=-(w-x),A=m-T,L=0,R=0,C=Math.sqrt(O*O+A*A);O/=C,A/=C,O*=y,A*=y;const P=o.alignment,M=(1-P)*2,F=P*2;f||(o.cap===jn.ROUND?c+=qn(m-O*(M-F)*.5,w-A*(M-F)*.5,m-O*M,w-A*M,m+O*F,w+A*F,d,!0)+2:o.cap===jn.SQUARE&&(c+=bp(m,w,O,A,M,F,!0,d))),d.push(m-O*M,w-A*M,m+O*F,w+A*F);for(let z=1;z<p-1;++z){m=n[(z-1)*2],w=n[(z-1)*2+1],T=n[z*2],x=n[z*2+1],E=n[(z+1)*2],I=n[(z+1)*2+1],O=-(w-x),A=m-T,C=Math.sqrt(O*O+A*A),O/=C,A/=C,O*=y,A*=y,L=-(x-I),R=T-E,C=Math.sqrt(L*L+R*R),L/=C,R/=C,L*=y,R*=y;const nt=T-m,V=w-x,D=T-E,k=I-x,G=nt*D+V*k,j=V*D-k*nt,Q=j<0;if(Math.abs(j)<.001*Math.abs(G)){d.push(T-O*M,x-A*M,T+O*F,x+A*F),G>=0&&(o.join===Sr.ROUND?c+=qn(T,x,T-O*M,x-A*M,T-L*M,x-R*M,d,!1)+4:c+=2,d.push(T-L*F,x-R*F,T+L*M,x+R*M));continue}const K=(-O+m)*(-A+x)-(-O+T)*(-A+w),$=(-L+E)*(-R+x)-(-L+T)*(-R+I),W=(nt*$-D*K)/j,et=(k*K-V*$)/j,Y=(W-T)*(W-T)+(et-x)*(et-x),rt=T+(W-T)*M,ot=x+(et-x)*M,pt=T-(W-T)*F,vt=x-(et-x)*F,_t=Math.min(nt*nt+V*V,D*D+k*k),At=Q?M:F,ne=_t+At*At*_,Ut=Y<=ne;let it=o.join;if(it===Sr.MITER&&Y/_>b&&(it=Sr.BEVEL),Ut)switch(it){case Sr.MITER:{d.push(rt,ot,pt,vt);break}case Sr.BEVEL:{Q?d.push(rt,ot,T+O*F,x+A*F,rt,ot,T+L*F,x+R*F):d.push(T-O*M,x-A*M,pt,vt,T-L*M,x-R*M,pt,vt),c+=2;break}case Sr.ROUND:{Q?(d.push(rt,ot,T+O*F,x+A*F),c+=qn(T,x,T+O*F,x+A*F,T+L*F,x+R*F,d,!0)+4,d.push(rt,ot,T+L*F,x+R*F)):(d.push(T-O*M,x-A*M,pt,vt),c+=qn(T,x,T-O*M,x-A*M,T-L*M,x-R*M,d,!1)+4,d.push(T-L*M,x-R*M,pt,vt));break}}else{switch(d.push(T-O*M,x-A*M,T+O*F,x+A*F),it){case Sr.MITER:{Q?d.push(pt,vt,pt,vt):d.push(rt,ot,rt,ot),c+=2;break}case Sr.ROUND:{Q?c+=qn(T,x,T+O*F,x+A*F,T+L*F,x+R*F,d,!0)+2:c+=qn(T,x,T-O*M,x-A*M,T-L*M,x-R*M,d,!1)+2;break}}d.push(T-L*M,x-R*M,T+L*F,x+R*F),c+=2}}m=n[(p-2)*2],w=n[(p-2)*2+1],T=n[(p-1)*2],x=n[(p-1)*2+1],O=-(w-x),A=m-T,C=Math.sqrt(O*O+A*A),O/=C,A/=C,O*=y,A*=y,d.push(T-O*M,x-A*M,T+O*F,x+A*F),f||(o.cap===jn.ROUND?c+=qn(T-O*(M-F)*.5,x-A*(M-F)*.5,T-O*M,x-A*M,T+O*F,x+A*F,d,!1)+2:o.cap===jn.SQUARE&&(c+=bp(T,x,O,A,M,F,!1,d)));const q=t.indices,Z=Si.epsilon*Si.epsilon;for(let z=v;z<c+v-2;++z)m=d[z*2],w=d[z*2+1],T=d[(z+1)*2],x=d[(z+1)*2+1],E=d[(z+2)*2],I=d[(z+2)*2+1],!(Math.abs(m*(x-I)+T*(I-w)+E*(w-x))<Z)&&q.push(z,z+1,z+2)}function JE(e,t){let r=0;const n=e.shape,i=e.points||n.points,o=n.type!==Ne.POLY||n.closeStroke;if(i.length===0)return;const a=t.points,u=t.indices,f=i.length/2,h=a.length/2;let d=h;for(a.push(i[0],i[1]),r=1;r<f;r++)a.push(i[r*2],i[r*2+1]),u.push(d,d+1),d++;o&&u.push(d,h)}function xp(e,t){e.lineStyle.native?JE(e,t):QE(e,t)}class Au{static curveLength(t,r,n,i,o,a){const u=t-2*n+o,f=r-2*i+a,h=2*n-2*t,d=2*i-2*r,p=4*(u*u+f*f),c=4*(u*h+f*d),v=h*h+d*d,y=2*Math.sqrt(p+c+v),_=Math.sqrt(p),b=2*p*_,m=2*Math.sqrt(v),w=c/_;return(b*y+_*c*(y-m)+(4*v*p-c*c)*Math.log((2*_+w+y)/(w+m)))/(4*b)}static curveTo(t,r,n,i,o){const a=o[o.length-2],u=o[o.length-1],f=Si._segmentsCount(Au.curveLength(a,u,t,r,n,i));let h=0,d=0;for(let p=1;p<=f;++p){const c=p/f;h=a+(t-a)*c,d=u+(r-u)*c,o.push(h+(t+(n-t)*c-h)*c,d+(r+(i-r)*c-d)*c)}}}const Ou={[Ne.POLY]:yp,[Ne.CIRC]:Fo,[Ne.ELIP]:Fo,[Ne.RECT]:KE,[Ne.RREC]:YE},wp=[],Bo=[];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?ie.EMPTY:(t=t||new ie(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:o,d:a,tx:u,ty:f}=t,h=n*r.x+o*r.y+u,d=i*r.x+a*r.y+f;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,d),this.maxY=Math.max(this.maxY,d)}addQuad(t){let r=this.minX,n=this.minY,i=this.maxX,o=this.maxY,a=t[0],u=t[1];r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[2],u=t[3],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[4],u=t[5],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[6],u=t[7],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,this.minX=r,this.minY=n,this.maxX=i,this.maxY=o}addFrame(t,r,n,i,o){this.addFrameMatrix(t.worldTransform,r,n,i,o)}addFrameMatrix(t,r,n,i,o){const a=t.a,u=t.b,f=t.c,h=t.d,d=t.tx,p=t.ty;let c=this.minX,v=this.minY,y=this.maxX,_=this.maxY,b=a*r+f*n+d,m=u*r+h*n+p;c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,b=a*i+f*n+d,m=u*i+h*n+p,c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,b=a*r+f*o+d,m=u*r+h*o+p,c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,b=a*i+f*o+d,m=u*i+h*o+p,c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,this.minX=c,this.minY=v,this.maxX=y,this.maxY=_}addVertexData(t,r,n){let i=this.minX,o=this.minY,a=this.maxX,u=this.maxY;for(let f=r;f<n;f+=2){const h=t[f],d=t[f+1];i=h<i?h:i,o=d<o?d:o,a=h>a?h:a,u=d>u?d:u}this.minX=i,this.minY=o,this.maxX=a,this.maxY=u}addVertices(t,r,n,i){this.addVerticesMatrix(t.worldTransform,r,n,i)}addVerticesMatrix(t,r,n,i,o=0,a=o){const u=t.a,f=t.b,h=t.c,d=t.d,p=t.tx,c=t.ty;let v=this.minX,y=this.minY,_=this.maxX,b=this.maxY;for(let m=n;m<i;m+=2){const w=r[m],T=r[m+1],x=u*w+h*T+p,E=d*T+f*w+c;v=Math.min(v,x-o),_=Math.max(_,x+o),y=Math.min(y,E-a),b=Math.max(b,E+a)}this.minX=v,this.minY=y,this.maxX=_,this.maxY=b}addBounds(t){const r=this.minX,n=this.minY,i=this.maxX,o=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>o?t.maxY:o}addBoundsMask(t,r){const n=t.minX>r.minX?t.minX:r.minX,i=t.minY>r.minY?t.minY:r.minY,o=t.maxX<r.maxX?t.maxX:r.maxX,a=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=o&&i<=a){const u=this.minX,f=this.minY,h=this.maxX,d=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=a>d?a:d}}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,o=t.maxX<r.x+r.width?t.maxX:r.x+r.width,a=t.maxY<r.y+r.height?t.maxY:r.y+r.height;if(n<=o&&i<=a){const u=this.minX,f=this.minY,h=this.maxX,d=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=a>d?a:d}}pad(t=0,r=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)}addFramePad(t,r,n,i,o,a){t-=o,r-=a,n+=o,i+=a,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 Ai extends Ws{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new ou,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(Ai.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 ie),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new ie),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,o=this._boundsID;this._bounds=this._localBounds;const a=this.getBounds(!1,t);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-o,a}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,o=0,a=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=o,this.skew.x=a,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 t2),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*pw}set angle(t){this.transform.rotation=t*cs}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 t2 extends Ai{constructor(){super(...arguments),this.sortDirty=null}}Ai.prototype.displayObjectUpdateTransform=Ai.prototype.updateTransform;const e2=new $e;function r2(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const Ru=class extends Ai{constructor(){super(),this.children=[],this.sortableChildren=Ru.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);co(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,co(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,co(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 o;if(i>0&&i<=n){o=this.children.splice(r,i);for(let a=0;a<o.length;++a)o[a].parent=null,o[a].transform&&(o[a].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let a=0;a<o.length;++a)o[a].emit("removed",this),this.emit("childRemoved",o[a],this,a);return o}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(r2),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 o=this.children[n];o.visible&&o.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!==Ru.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=e2.copyFrom(n),n.prepend(i)):n=i),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let o=0,a=this.children.length;o<a;++o){const u=this.children[o],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,o,a;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!==Ee.NONE));if(n&&e.batch.flush(),t&&((o=this._enabledFilters)!=null&&o.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&&((a=this._enabledFilters)!=null&&a.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 Oi=Ru;Oi.defaultSortableChildren=!1,Oi.prototype.containerUpdateTransform=Oi.prototype.updateTransform,Object.defineProperties(Dt,{SORTABLE_CHILDREN:{get(){return Oi.defaultSortableChildren},set(e){Ht("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Oi.defaultSortableChildren=e}}});class Do{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 Do(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 Ci=new oe,Tp=class extends ed{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(),Bo.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),wp.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 Do(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 Do(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,Ci):Ci.copyFrom(e),n.shape.contains(Ci.x,Ci.y))){let i=!1;if(n.holes){for(let o=0;o<n.holes.length;o++)if(n.holes[o].shape.contains(Ci.x,Ci.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,d=f.lineStyle;Ou[f.type].build(f),f.matrix&&this.transformPoints(f.points,f.matrix),(h.visible||d.visible)&&this.processHoles(f.holes);for(let c=0;c<2;c++){const v=c===0?h:d;if(!v.visible)continue;const y=v.texture.baseTexture,_=this.indices.length,b=this.points.length/2;y.wrapMode=Ji.REPEAT,c===0?this.processFill(f):this.processLine(f);const m=this.points.length/2-b;m!==0&&(r&&!this._compareStyles(n,v)&&(r.end(_,b),r=null),r||(r=wp.pop()||new ZE,r.begin(v,_,b),this.batches.push(r),n=v),this.addUvs(this.points,e,v.texture,b,m,v.matrix))}}const i=this.indices.length,o=this.points.length/2;if(r&&r.end(i,o),this.batches.length===0){this.batchable=!0;return}const a=o>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&a===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=a?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 o=n.start+i;this.indicesUint16[o]=this.indicesUint16[o]-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<Tp.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++Kt._globalBatch;for(let d=0;d<this.drawCalls.length;d++)this.drawCalls[d].texArray.clear(),Bo.push(this.drawCalls[d]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=Bo.pop();n||(n=new ru,n.texArray=new lu),n.texArray.count=0,n.start=0,n.size=0,n.type=an.TRIANGLES;let i=0,o=null,a=0,u=!1,f=an.TRIANGLES,h=0;this.drawCalls.push(n);for(let d=0;d<this.batches.length;d++){const p=this.batches[d],c=8,v=p.style,y=v.texture.baseTexture;u!==!!v.native&&(u=!!v.native,f=u?an.LINES:an.TRIANGLES,o=null,i=c,e++),o!==y&&(o=y,y._batchEnabled!==e&&(i===c&&(e++,i=0,n.size>0&&(n=Bo.pop(),n||(n=new ru,n.texArray=new lu),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=Ji.REPEAT,n.texArray.elements[n.texArray.count++]=y,i++)),n.size+=p.size,h+=p.size,a=y._batchLocation,this.addColors(t,v.color,v.alpha,p.attribSize,p.attribStart),this.addTextureIds(r,a,p.attribSize,p.attribStart)}Kt._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),o=new Float32Array(i),a=new Uint32Array(i);let u=0;for(let f=0;f<e.length/2;f++)o[u++]=e[f*2],o[u++]=e[f*2+1],o[u++]=t[f*2],o[u++]=t[f*2+1],a[u++]=r[f],o[u++]=n[f];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?yp.triangulate(e,this):Ou[e.type].triangulate(e,this)}processLine(e){xp(e,this);for(let t=0;t<e.holes.length;t++)xp(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];Ou[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 o=Be.shared.setValue(t).toLittleEndianNumber(),a=Be.shared.setValue(o).toPremultiplied(r);e.length=Math.max(e.length,i+n);for(let u=0;u<n;u++)e[i+u]=a}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,o=null){let a=0;const u=t.length,f=r.frame;for(;a<i;){let d=e[(n+a)*2],p=e[(n+a)*2+1];if(o){const c=o.a*d+o.c*p+o.tx;p=o.b*d+o.d*p+o.ty,d=c}a++,t.push(d/f.width,p/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,o=1e-6,a=r+n*2,u=t.frame,f=u.width/i.width,h=u.height/i.height;let d=u.x/u.width,p=u.y/u.height,c=Math.floor(e[r]+o),v=Math.floor(e[r+1]+o);for(let y=r+2;y<a;y+=2)c=Math.min(c,Math.floor(e[y]+o)),v=Math.min(v,Math.floor(e[y+1]+o));d-=c,p-=v;for(let y=r;y<a;y+=2)e[y]=(e[y]+d)*f,e[y+1]=(e[y+1]+p)*h}};let Ep=Tp;Ep.BATCHABLE_SIZE=100;class Uo{constructor(){this.color=16777215,this.alpha=1,this.texture=Wt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new Uo;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=Wt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Iu extends Uo{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=jn.BUTT,this.join=Sr.MITER,this.miterLimit=10}clone(){const t=new Iu;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={},$o=class extends Oi{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 Uo,this._lineStyle=new Iu,this._matrix=null,this._holeMode=!1,this.state=po.for2d(),this._geometry=e||new Ep,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Be(16777215),this.blendMode=Pt.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new $o(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:Wt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:jn.BUTT,join:Sr.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 hs,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new hs,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),Au.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,o){return this._initCurve(),Su.curveTo(e,t,r,n,i,o,this.currentPath.points),this}arcTo(e,t,r,n,i){this._initCurve(e,t);const o=this.currentPath.points,a=_p.curveTo(e,t,r,n,i,o);if(a){const{cx:u,cy:f,radius:h,startAngle:d,endAngle:p,anticlockwise:c}=a;this.arc(u,f,h,d,p,c)}return this}arc(e,t,r,n,i,o=!1){if(n===i)return this;if(!o&&i<=n?i+=go:o&&n<=i&&(n+=go),i-n===0)return this;const u=e+Math.cos(n)*r,f=t+Math.sin(n)*r,h=this._geometry.closePointEps;let d=this.currentPath?this.currentPath.points:null;if(d){const p=Math.abs(d[d.length-2]-u),c=Math.abs(d[d.length-1]-f);p<h&&c<h||d.push(u,f)}else this.moveTo(u,f),d=this.currentPath.points;return _p.arc(u,f,e,t,r,n,i,o,d),this}beginFill(e=0,t){return this.beginTextureFill({texture:Wt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Be.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:Wt.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 ie(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new iu(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new nu(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new vw(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 hs(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===Ne.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],o=i.style.color,a=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:a,blendMode:t,indices:f,uvs:u,_batchRGB:Be.shared.setValue(o).toRgbArray(),_tintRGB:o,_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,o=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Be.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 a=0,u=o.length;a<u;a++)this._renderDrawCallDirect(e,r.drawCalls[a])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:i,start:o}=t,a=r.count;for(let u=0;u<a;u++)e.texture.bind(r.elements[u],u);e.geometry.draw(n,i,o)}_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 o={tint:new Float32Array([1,1,1,1]),translationMatrix:new $e,default:br.from({uSamplers:i},!0)},a=e.plugins[r]._shader.program;Pu[r]=new ps(a,o)}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,$o._TEMP_POINT),this._geometry.containsPoint($o._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=Be.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,o=t.d,a=t.tx,u=t.ty,f=this._geometry.points,h=this.vertexData;let d=0;for(let p=0;p<f.length;p+=2){const c=f[p],v=f[p+1];h[d++]=r*c+i*v+a,h[d++]=o*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 Nu=$o;Nu.curves=Si,Nu._TEMP_POINT=new oe;var n2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Mu={},i2={get exports(){return Mu},set exports(e){Mu=e}};/*!
1923
+ `),t=[.393,.769,.189,.349,.686,.168,.272,.534,.131];return e.uniforms.uNightVisionMatrix=t,{nightVisionFilter:e}},gp=Et.forwardRef((e,t)=>{const r=mt.useRef(null),n=mt.useRef(null),{src:i,visible:o,transformation:{x:a,y:u,width:f,height:h,anchor:d,colorCorrection:p={},effect:c},pointerdown:v}=e,{blurRadius:y=0}=p,{temperatureFilter:_,sharpnessFilter:b,hueFilter:m,blurFilter:w,adjustmentFilter:T}=_s(p),{nightVisionFilter:x}=XE();return Et.useEffect(()=>()=>{console.log("PixiImageSprite unmounting")},[]),Vt.jsx(ni,{...e,ref:t,children:Vt.jsx(le.Container,{ref:n,children:Vt.jsx(le.Sprite,{image:i,width:f,height:h,anchor:d,ref:r,alpha:o?1:0,x:a,y:u,...o&&{interactive:!0,pointerdown:v},filters:[_,b,m,T,...y>0?[w]:[],...c===Sn.NightVision?[x]:[]]})})})});gp.whyDidYouRender={logOnDifferentValues:!0,customName:"ImageSprite"};const Fo={build(e){const t=e.points;let r,n,i,o,a,u;if(e.type===Ne.CIRC){const y=e.shape;r=y.x,n=y.y,a=u=y.radius,i=o=0}else if(e.type===Ne.ELIP){const y=e.shape;r=y.x,n=y.y,a=y.width,u=y.height,i=o=0}else{const y=e.shape,_=y.width/2,b=y.height/2;r=y.x+_,n=y.y+b,a=u=Math.max(0,Math.min(y.radius,Math.min(_,b))),i=_-a,o=b-u}if(!(a>=0&&u>=0&&i>=0&&o>=0)){t.length=0;return}const f=Math.ceil(2.3*Math.sqrt(a+u)),h=f*8+(i?4:0)+(o?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+o,t[2]=t[4]=r-i,t[5]=t[7]=n-o;return}let d=0,p=f*4+(i?2:0)+2,c=p,v=h;{const y=i+a,_=o,b=r+y,m=r-y,w=n+_;if(t[d++]=b,t[d++]=w,t[--p]=w,t[--p]=m,o){const T=n-_;t[c++]=m,t[c++]=T,t[--v]=T,t[--v]=b}}for(let y=1;y<f;y++){const _=Math.PI/2*(y/f),b=i+Math.cos(_)*a,m=o+Math.sin(_)*u,w=r+b,T=r-b,x=n+m,E=n-m;t[d++]=w,t[d++]=x,t[--p]=x,t[--p]=T,t[c++]=T,t[c++]=E,t[--v]=E,t[--v]=w}{const y=i,_=o+u,b=r+y,m=r-y,w=n+_,T=n-_;t[d++]=b,t[d++]=w,t[--v]=T,t[--v]=b,i&&(t[d++]=m,t[d++]=w,t[--v]=T,t[--v]=m)}},triangulate(e,t){const r=e.points,n=t.points,i=t.indices;if(r.length===0)return;let o=n.length/2;const a=o;let u,f;if(e.type!==Ne.RREC){const d=e.shape;u=d.x,f=d.y}else{const d=e.shape;u=d.x+d.width/2,f=d.y+d.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),o++,n.push(r[0],r[1]);for(let d=2;d<r.length;d+=2)n.push(r[d],r[d+1]),i.push(o++,a,o);i.push(a+1,a,o)}};function mp(e,t=!1){const r=e.length;if(r<6)return;let n=0;for(let i=0,o=e[r-2],a=e[r-1];i<r;i+=2){const u=e[i],f=e[i+1];n+=(u-o)*(f+a),o=u,a=f}if(!t&&n>0||t&&n<=0){const i=r/2;for(let o=i+i%2;o<r;o+=2){const a=r-o-2,u=r-o-1,f=o,h=o+1;[e[a],e[f]]=[e[f],e[a]],[e[u],e[h]]=[e[h],e[u]]}}}const yp={build(e){e.points=e.shape.points.slice()},triangulate(e,t){let r=e.points;const n=e.holes,i=t.points,o=t.indices;if(r.length>=6){mp(r,!1);const a=[];for(let h=0;h<n.length;h++){const d=n[h];mp(d.points,!0),a.push(r.length/2),r=r.concat(d.points)}const u=k_(r,a,2);if(!u)return;const f=i.length/2;for(let h=0;h<u.length;h+=3)o.push(u[h]+f),o.push(u[h+1]+f),o.push(u[h+2]+f);for(let h=0;h<r.length;h++)i.push(r[h])}}},KE={build(e){const t=e.shape,r=t.x,n=t.y,i=t.width,o=t.height,a=e.points;a.length=0,i>=0&&o>=0&&a.push(r,n,r+i,n,r+i,n+o,r,n+o)},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)}},YE={build(e){Fo.build(e)},triangulate(e,t){Fo.triangulate(e,t)}};var Sr=(e=>(e.MITER="miter",e.BEVEL="bevel",e.ROUND="round",e))(Sr||{}),jn=(e=>(e.BUTT="butt",e.ROUND="round",e.SQUARE="square",e))(jn||{});const Si={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 _p{static curveTo(t,r,n,i,o,a){const u=a[a.length-2],h=a[a.length-1]-r,d=u-t,p=i-r,c=n-t,v=Math.abs(h*c-d*p);if(v<1e-8||o===0)return(a[a.length-2]!==t||a[a.length-1]!==r)&&a.push(t,r),null;const y=h*h+d*d,_=p*p+c*c,b=h*p+d*c,m=o*Math.sqrt(y)/v,w=o*Math.sqrt(_)/v,T=m*b/y,x=w*b/_,E=m*c+w*d,I=m*p+w*h,O=d*(w+T),A=h*(w+T),L=c*(m+x),R=p*(m+x),C=Math.atan2(A-I,O-E),P=Math.atan2(R-I,L-E);return{cx:E+t,cy:I+r,radius:o,startAngle:C,endAngle:P,anticlockwise:d*p>c*h}}static arc(t,r,n,i,o,a,u,f,h){const d=u-a,p=Si._segmentsCount(Math.abs(d)*o,Math.ceil(Math.abs(d)/go)*40),c=d/(p*2),v=c*2,y=Math.cos(c),_=Math.sin(c),b=p-1,m=b%1/b;for(let w=0;w<=b;++w){const T=w+m*w,x=c+a+v*T,E=Math.cos(x),I=-Math.sin(x);h.push((y*E+_*I)*o+n,(y*-I+_*E)*o+i)}}}class ZE{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 Su{static curveLength(t,r,n,i,o,a,u,f){let d=0,p=0,c=0,v=0,y=0,_=0,b=0,m=0,w=0,T=0,x=0,E=t,I=r;for(let O=1;O<=10;++O)p=O/10,c=p*p,v=c*p,y=1-p,_=y*y,b=_*y,m=b*t+3*_*p*n+3*y*c*o+v*u,w=b*r+3*_*p*i+3*y*c*a+v*f,T=E-m,x=I-w,E=m,I=w,d+=Math.sqrt(T*T+x*x);return d}static curveTo(t,r,n,i,o,a,u){const f=u[u.length-2],h=u[u.length-1];u.length-=2;const d=Si._segmentsCount(Su.curveLength(f,h,t,r,n,i,o,a));let p=0,c=0,v=0,y=0,_=0;u.push(f,h);for(let b=1,m=0;b<=d;++b)m=b/d,p=1-m,c=p*p,v=c*p,y=m*m,_=y*m,u.push(v*f+3*c*m*t+3*p*y*n+_*o,v*h+3*c*m*r+3*p*y*i+_*a)}}function bp(e,t,r,n,i,o,a,u){const f=e-r*i,h=t-n*i,d=e+r*o,p=t+n*o;let c,v;a?(c=n,v=-r):(c=-n,v=r);const y=f+c,_=h+v,b=d+c,m=p+v;return u.push(y,_,b,m),2}function qn(e,t,r,n,i,o,a,u){const f=r-e,h=n-t;let d=Math.atan2(f,h),p=Math.atan2(i-e,o-t);u&&d<p?d+=Math.PI*2:!u&&d>p&&(p+=Math.PI*2);let c=d;const v=p-d,y=Math.abs(v),_=Math.sqrt(f*f+h*h),b=(15*y*Math.sqrt(_)/Math.PI>>0)+1,m=v/b;if(c+=m,u){a.push(e,t,r,n);for(let w=1,T=c;w<b;w++,T+=m)a.push(e,t,e+Math.sin(T)*_,t+Math.cos(T)*_);a.push(e,t,i,o)}else{a.push(r,n,e,t);for(let w=1,T=c;w<b;w++,T+=m)a.push(e+Math.sin(T)*_,t+Math.cos(T)*_,e,t);a.push(i,o,e,t)}return b*2}function QE(e,t){const r=e.shape;let n=e.points||r.points.slice();const i=t.closePointEps;if(n.length===0)return;const o=e.lineStyle,a=new oe(n[0],n[1]),u=new oe(n[n.length-2],n[n.length-1]),f=r.type!==Ne.POLY||r.closeStroke,h=Math.abs(a.x-u.x)<i&&Math.abs(a.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=(a.x+u.x)*.5,nt=(u.y+a.y)*.5;n.unshift(z,nt),n.push(z,nt)}const d=t.points,p=n.length/2;let c=n.length;const v=d.length/2,y=o.width/2,_=y*y,b=o.miterLimit*o.miterLimit;let m=n[0],w=n[1],T=n[2],x=n[3],E=0,I=0,O=-(w-x),A=m-T,L=0,R=0,C=Math.sqrt(O*O+A*A);O/=C,A/=C,O*=y,A*=y;const P=o.alignment,M=(1-P)*2,F=P*2;f||(o.cap===jn.ROUND?c+=qn(m-O*(M-F)*.5,w-A*(M-F)*.5,m-O*M,w-A*M,m+O*F,w+A*F,d,!0)+2:o.cap===jn.SQUARE&&(c+=bp(m,w,O,A,M,F,!0,d))),d.push(m-O*M,w-A*M,m+O*F,w+A*F);for(let z=1;z<p-1;++z){m=n[(z-1)*2],w=n[(z-1)*2+1],T=n[z*2],x=n[z*2+1],E=n[(z+1)*2],I=n[(z+1)*2+1],O=-(w-x),A=m-T,C=Math.sqrt(O*O+A*A),O/=C,A/=C,O*=y,A*=y,L=-(x-I),R=T-E,C=Math.sqrt(L*L+R*R),L/=C,R/=C,L*=y,R*=y;const nt=T-m,V=w-x,D=T-E,k=I-x,G=nt*D+V*k,j=V*D-k*nt,Q=j<0;if(Math.abs(j)<.001*Math.abs(G)){d.push(T-O*M,x-A*M,T+O*F,x+A*F),G>=0&&(o.join===Sr.ROUND?c+=qn(T,x,T-O*M,x-A*M,T-L*M,x-R*M,d,!1)+4:c+=2,d.push(T-L*F,x-R*F,T+L*M,x+R*M));continue}const K=(-O+m)*(-A+x)-(-O+T)*(-A+w),$=(-L+E)*(-R+x)-(-L+T)*(-R+I),W=(nt*$-D*K)/j,et=(k*K-V*$)/j,Y=(W-T)*(W-T)+(et-x)*(et-x),rt=T+(W-T)*M,ot=x+(et-x)*M,pt=T-(W-T)*F,vt=x-(et-x)*F,_t=Math.min(nt*nt+V*V,D*D+k*k),At=Q?M:F,ne=_t+At*At*_,Ut=Y<=ne;let it=o.join;if(it===Sr.MITER&&Y/_>b&&(it=Sr.BEVEL),Ut)switch(it){case Sr.MITER:{d.push(rt,ot,pt,vt);break}case Sr.BEVEL:{Q?d.push(rt,ot,T+O*F,x+A*F,rt,ot,T+L*F,x+R*F):d.push(T-O*M,x-A*M,pt,vt,T-L*M,x-R*M,pt,vt),c+=2;break}case Sr.ROUND:{Q?(d.push(rt,ot,T+O*F,x+A*F),c+=qn(T,x,T+O*F,x+A*F,T+L*F,x+R*F,d,!0)+4,d.push(rt,ot,T+L*F,x+R*F)):(d.push(T-O*M,x-A*M,pt,vt),c+=qn(T,x,T-O*M,x-A*M,T-L*M,x-R*M,d,!1)+4,d.push(T-L*M,x-R*M,pt,vt));break}}else{switch(d.push(T-O*M,x-A*M,T+O*F,x+A*F),it){case Sr.MITER:{Q?d.push(pt,vt,pt,vt):d.push(rt,ot,rt,ot),c+=2;break}case Sr.ROUND:{Q?c+=qn(T,x,T+O*F,x+A*F,T+L*F,x+R*F,d,!0)+2:c+=qn(T,x,T-O*M,x-A*M,T-L*M,x-R*M,d,!1)+2;break}}d.push(T-L*M,x-R*M,T+L*F,x+R*F),c+=2}}m=n[(p-2)*2],w=n[(p-2)*2+1],T=n[(p-1)*2],x=n[(p-1)*2+1],O=-(w-x),A=m-T,C=Math.sqrt(O*O+A*A),O/=C,A/=C,O*=y,A*=y,d.push(T-O*M,x-A*M,T+O*F,x+A*F),f||(o.cap===jn.ROUND?c+=qn(T-O*(M-F)*.5,x-A*(M-F)*.5,T-O*M,x-A*M,T+O*F,x+A*F,d,!1)+2:o.cap===jn.SQUARE&&(c+=bp(T,x,O,A,M,F,!1,d)));const q=t.indices,Z=Si.epsilon*Si.epsilon;for(let z=v;z<c+v-2;++z)m=d[z*2],w=d[z*2+1],T=d[(z+1)*2],x=d[(z+1)*2+1],E=d[(z+2)*2],I=d[(z+2)*2+1],!(Math.abs(m*(x-I)+T*(I-w)+E*(w-x))<Z)&&q.push(z,z+1,z+2)}function JE(e,t){let r=0;const n=e.shape,i=e.points||n.points,o=n.type!==Ne.POLY||n.closeStroke;if(i.length===0)return;const a=t.points,u=t.indices,f=i.length/2,h=a.length/2;let d=h;for(a.push(i[0],i[1]),r=1;r<f;r++)a.push(i[r*2],i[r*2+1]),u.push(d,d+1),d++;o&&u.push(d,h)}function xp(e,t){e.lineStyle.native?JE(e,t):QE(e,t)}class Au{static curveLength(t,r,n,i,o,a){const u=t-2*n+o,f=r-2*i+a,h=2*n-2*t,d=2*i-2*r,p=4*(u*u+f*f),c=4*(u*h+f*d),v=h*h+d*d,y=2*Math.sqrt(p+c+v),_=Math.sqrt(p),b=2*p*_,m=2*Math.sqrt(v),w=c/_;return(b*y+_*c*(y-m)+(4*v*p-c*c)*Math.log((2*_+w+y)/(w+m)))/(4*b)}static curveTo(t,r,n,i,o){const a=o[o.length-2],u=o[o.length-1],f=Si._segmentsCount(Au.curveLength(a,u,t,r,n,i));let h=0,d=0;for(let p=1;p<=f;++p){const c=p/f;h=a+(t-a)*c,d=u+(r-u)*c,o.push(h+(t+(n-t)*c-h)*c,d+(r+(i-r)*c-d)*c)}}}const Ou={[Ne.POLY]:yp,[Ne.CIRC]:Fo,[Ne.ELIP]:Fo,[Ne.RECT]:KE,[Ne.RREC]:YE},wp=[],Bo=[];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?ie.EMPTY:(t=t||new ie(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:o,d:a,tx:u,ty:f}=t,h=n*r.x+o*r.y+u,d=i*r.x+a*r.y+f;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,d),this.maxY=Math.max(this.maxY,d)}addQuad(t){let r=this.minX,n=this.minY,i=this.maxX,o=this.maxY,a=t[0],u=t[1];r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[2],u=t[3],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[4],u=t[5],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,a=t[6],u=t[7],r=a<r?a:r,n=u<n?u:n,i=a>i?a:i,o=u>o?u:o,this.minX=r,this.minY=n,this.maxX=i,this.maxY=o}addFrame(t,r,n,i,o){this.addFrameMatrix(t.worldTransform,r,n,i,o)}addFrameMatrix(t,r,n,i,o){const a=t.a,u=t.b,f=t.c,h=t.d,d=t.tx,p=t.ty;let c=this.minX,v=this.minY,y=this.maxX,_=this.maxY,b=a*r+f*n+d,m=u*r+h*n+p;c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,b=a*i+f*n+d,m=u*i+h*n+p,c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,b=a*r+f*o+d,m=u*r+h*o+p,c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,b=a*i+f*o+d,m=u*i+h*o+p,c=b<c?b:c,v=m<v?m:v,y=b>y?b:y,_=m>_?m:_,this.minX=c,this.minY=v,this.maxX=y,this.maxY=_}addVertexData(t,r,n){let i=this.minX,o=this.minY,a=this.maxX,u=this.maxY;for(let f=r;f<n;f+=2){const h=t[f],d=t[f+1];i=h<i?h:i,o=d<o?d:o,a=h>a?h:a,u=d>u?d:u}this.minX=i,this.minY=o,this.maxX=a,this.maxY=u}addVertices(t,r,n,i){this.addVerticesMatrix(t.worldTransform,r,n,i)}addVerticesMatrix(t,r,n,i,o=0,a=o){const u=t.a,f=t.b,h=t.c,d=t.d,p=t.tx,c=t.ty;let v=this.minX,y=this.minY,_=this.maxX,b=this.maxY;for(let m=n;m<i;m+=2){const w=r[m],T=r[m+1],x=u*w+h*T+p,E=d*T+f*w+c;v=Math.min(v,x-o),_=Math.max(_,x+o),y=Math.min(y,E-a),b=Math.max(b,E+a)}this.minX=v,this.minY=y,this.maxX=_,this.maxY=b}addBounds(t){const r=this.minX,n=this.minY,i=this.maxX,o=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>o?t.maxY:o}addBoundsMask(t,r){const n=t.minX>r.minX?t.minX:r.minX,i=t.minY>r.minY?t.minY:r.minY,o=t.maxX<r.maxX?t.maxX:r.maxX,a=t.maxY<r.maxY?t.maxY:r.maxY;if(n<=o&&i<=a){const u=this.minX,f=this.minY,h=this.maxX,d=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=a>d?a:d}}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,o=t.maxX<r.x+r.width?t.maxX:r.x+r.width,a=t.maxY<r.y+r.height?t.maxY:r.y+r.height;if(n<=o&&i<=a){const u=this.minX,f=this.minY,h=this.maxX,d=this.maxY;this.minX=n<u?n:u,this.minY=i<f?i:f,this.maxX=o>h?o:h,this.maxY=a>d?a:d}}pad(t=0,r=t){this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=r,this.maxY+=r)}addFramePad(t,r,n,i,o,a){t-=o,r-=a,n+=o,i+=a,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 Ai extends Ws{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new ou,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(Ai.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 ie),r=this._boundsRect),this._bounds.getRectangle(r)}getLocalBounds(t){t||(this._localBoundsRect||(this._localBoundsRect=new ie),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,o=this._boundsID;this._bounds=this._localBounds;const a=this.getBounds(!1,t);return this.parent=n,this.transform=r,this._bounds=i,this._bounds.updateID+=this._boundsID-o,a}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,o=0,a=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=o,this.skew.x=a,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 t2),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*pw}set angle(t){this.transform.rotation=t*cs}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 t2 extends Ai{constructor(){super(...arguments),this.sortDirty=null}}Ai.prototype.displayObjectUpdateTransform=Ai.prototype.updateTransform;const e2=new $e;function r2(e,t){return e.zIndex===t.zIndex?e._lastSortedIndex-t._lastSortedIndex:e.zIndex-t.zIndex}const Ru=class extends Ai{constructor(){super(),this.children=[],this.sortableChildren=Ru.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);co(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,co(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,co(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 o;if(i>0&&i<=n){o=this.children.splice(r,i);for(let a=0;a<o.length;++a)o[a].parent=null,o[a].transform&&(o[a].transform._parentID=-1);this._boundsID++,this.onChildrenChange(e);for(let a=0;a<o.length;++a)o[a].emit("removed",this),this.emit("childRemoved",o[a],this,a);return o}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(r2),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 o=this.children[n];o.visible&&o.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!==Ru.prototype._render&&(r=this.getBounds(!0));const i=e.projection.transform;if(i&&(n?(n=e2.copyFrom(n),n.prepend(i)):n=i),r&&t.intersects(r,n))this._render(e);else if(this.cullArea)return;for(let o=0,a=this.children.length;o<a;++o){const u=this.children[o],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,o,a;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!==Ee.NONE));if(n&&e.batch.flush(),t&&((o=this._enabledFilters)!=null&&o.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&&((a=this._enabledFilters)!=null&&a.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 Oi=Ru;Oi.defaultSortableChildren=!1,Oi.prototype.containerUpdateTransform=Oi.prototype.updateTransform,Object.defineProperties(Dt,{SORTABLE_CHILDREN:{get(){return Oi.defaultSortableChildren},set(e){Ht("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),Oi.defaultSortableChildren=e}}});class Do{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 Do(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 Ci=new oe,Tp=class extends ed{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(),Bo.push(this.drawCalls[e]);this.drawCalls.length=0;for(let e=0;e<this.batches.length;e++){const t=this.batches[e];t.reset(),wp.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 Do(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 Do(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,Ci):Ci.copyFrom(e),n.shape.contains(Ci.x,Ci.y))){let i=!1;if(n.holes){for(let o=0;o<n.holes.length;o++)if(n.holes[o].shape.contains(Ci.x,Ci.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,d=f.lineStyle;Ou[f.type].build(f),f.matrix&&this.transformPoints(f.points,f.matrix),(h.visible||d.visible)&&this.processHoles(f.holes);for(let c=0;c<2;c++){const v=c===0?h:d;if(!v.visible)continue;const y=v.texture.baseTexture,_=this.indices.length,b=this.points.length/2;y.wrapMode=Ji.REPEAT,c===0?this.processFill(f):this.processLine(f);const m=this.points.length/2-b;m!==0&&(r&&!this._compareStyles(n,v)&&(r.end(_,b),r=null),r||(r=wp.pop()||new ZE,r.begin(v,_,b),this.batches.push(r),n=v),this.addUvs(this.points,e,v.texture,b,m,v.matrix))}}const i=this.indices.length,o=this.points.length/2;if(r&&r.end(i,o),this.batches.length===0){this.batchable=!0;return}const a=o>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&a===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=a?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 o=n.start+i;this.indicesUint16[o]=this.indicesUint16[o]-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<Tp.BATCHABLE_SIZE*2}buildDrawCalls(){let e=++Kt._globalBatch;for(let d=0;d<this.drawCalls.length;d++)this.drawCalls[d].texArray.clear(),Bo.push(this.drawCalls[d]);this.drawCalls.length=0;const t=this.colors,r=this.textureIds;let n=Bo.pop();n||(n=new ru,n.texArray=new lu),n.texArray.count=0,n.start=0,n.size=0,n.type=an.TRIANGLES;let i=0,o=null,a=0,u=!1,f=an.TRIANGLES,h=0;this.drawCalls.push(n);for(let d=0;d<this.batches.length;d++){const p=this.batches[d],c=8,v=p.style,y=v.texture.baseTexture;u!==!!v.native&&(u=!!v.native,f=u?an.LINES:an.TRIANGLES,o=null,i=c,e++),o!==y&&(o=y,y._batchEnabled!==e&&(i===c&&(e++,i=0,n.size>0&&(n=Bo.pop(),n||(n=new ru,n.texArray=new lu),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=Ji.REPEAT,n.texArray.elements[n.texArray.count++]=y,i++)),n.size+=p.size,h+=p.size,a=y._batchLocation,this.addColors(t,v.color,v.alpha,p.attribSize,p.attribStart),this.addTextureIds(r,a,p.attribSize,p.attribStart)}Kt._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),o=new Float32Array(i),a=new Uint32Array(i);let u=0;for(let f=0;f<e.length/2;f++)o[u++]=e[f*2],o[u++]=e[f*2+1],o[u++]=t[f*2],o[u++]=t[f*2+1],a[u++]=r[f],o[u++]=n[f];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)}processFill(e){e.holes.length?yp.triangulate(e,this):Ou[e.type].triangulate(e,this)}processLine(e){xp(e,this);for(let t=0;t<e.holes.length;t++)xp(e.holes[t],this)}processHoles(e){for(let t=0;t<e.length;t++){const r=e[t];Ou[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 o=Be.shared.setValue(t).toLittleEndianNumber(),a=Be.shared.setValue(o).toPremultiplied(r);e.length=Math.max(e.length,i+n);for(let u=0;u<n;u++)e[i+u]=a}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,o=null){let a=0;const u=t.length,f=r.frame;for(;a<i;){let d=e[(n+a)*2],p=e[(n+a)*2+1];if(o){const c=o.a*d+o.c*p+o.tx;p=o.b*d+o.d*p+o.ty,d=c}a++,t.push(d/f.width,p/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,o=1e-6,a=r+n*2,u=t.frame,f=u.width/i.width,h=u.height/i.height;let d=u.x/u.width,p=u.y/u.height,c=Math.floor(e[r]+o),v=Math.floor(e[r+1]+o);for(let y=r+2;y<a;y+=2)c=Math.min(c,Math.floor(e[y]+o)),v=Math.min(v,Math.floor(e[y+1]+o));d-=c,p-=v;for(let y=r;y<a;y+=2)e[y]=(e[y]+d)*f,e[y+1]=(e[y+1]+p)*h}};let Ep=Tp;Ep.BATCHABLE_SIZE=100;class Uo{constructor(){this.color=16777215,this.alpha=1,this.texture=Wt.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){const t=new Uo;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=Wt.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}}class Iu extends Uo{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=jn.BUTT,this.join=Sr.MITER,this.miterLimit=10}clone(){const t=new Iu;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={},$o=class extends Oi{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 Uo,this._lineStyle=new Iu,this._matrix=null,this._holeMode=!1,this.state=po.for2d(),this._geometry=e||new Ep,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Be(16777215),this.blendMode=Pt.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new $o(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:Wt.WHITE,color:e!=null&&e.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:jn.BUTT,join:Sr.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 hs,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new hs,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),Au.curveTo(e,t,r,n,i),this}bezierCurveTo(e,t,r,n,i,o){return this._initCurve(),Su.curveTo(e,t,r,n,i,o,this.currentPath.points),this}arcTo(e,t,r,n,i){this._initCurve(e,t);const o=this.currentPath.points,a=_p.curveTo(e,t,r,n,i,o);if(a){const{cx:u,cy:f,radius:h,startAngle:d,endAngle:p,anticlockwise:c}=a;this.arc(u,f,h,d,p,c)}return this}arc(e,t,r,n,i,o=!1){if(n===i)return this;if(!o&&i<=n?i+=go:o&&n<=i&&(n+=go),i-n===0)return this;const u=e+Math.cos(n)*r,f=t+Math.sin(n)*r,h=this._geometry.closePointEps;let d=this.currentPath?this.currentPath.points:null;if(d){const p=Math.abs(d[d.length-2]-u),c=Math.abs(d[d.length-1]-f);p<h&&c<h||d.push(u,f)}else this.moveTo(u,f),d=this.currentPath.points;return _p.arc(u,f,e,t,r,n,i,o,d),this}beginFill(e=0,t){return this.beginTextureFill({texture:Wt.WHITE,color:e,alpha:t})}normalizeColor(e){const t=Be.shared.setValue(e.color??0);e.color=t.toNumber(),e.alpha??(e.alpha=t.alpha)}beginTextureFill(e){const t={texture:Wt.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 ie(e,t,r,n))}drawRoundedRect(e,t,r,n,i){return this.drawShape(new iu(e,t,r,n,i))}drawCircle(e,t,r){return this.drawShape(new nu(e,t,r))}drawEllipse(e,t,r,n){return this.drawShape(new vw(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 hs(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===Ne.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],o=i.style.color,a=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:a,blendMode:t,indices:f,uvs:u,_batchRGB:Be.shared.setValue(o).toRgbArray(),_tintRGB:o,_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,o=r.drawCalls;i.translationMatrix=this.transform.worldTransform,Be.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 a=0,u=o.length;a<u;a++)this._renderDrawCallDirect(e,r.drawCalls[a])}_renderDrawCallDirect(e,t){const{texArray:r,type:n,size:i,start:o}=t,a=r.count;for(let u=0;u<a;u++)e.texture.bind(r.elements[u],u);e.geometry.draw(n,i,o)}_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 o={tint:new Float32Array([1,1,1,1]),translationMatrix:new $e,default:br.from({uSamplers:i},!0)},a=e.plugins[r]._shader.program;Pu[r]=new ps(a,o)}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,$o._TEMP_POINT),this._geometry.containsPoint($o._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=Be.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,o=t.d,a=t.tx,u=t.ty,f=this._geometry.points,h=this.vertexData;let d=0;for(let p=0;p<f.length;p+=2){const c=f[p],v=f[p+1];h[d++]=r*c+i*v+a,h[d++]=o*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 Nu=$o;Nu.curves=Si,Nu._TEMP_POINT=new oe;var n2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Mu={},i2={get exports(){return Mu},set exports(e){Mu=e}};/*!
1924
1924
  * d-path-parser - v1.0.0
1925
1925
  * by Massimo Artizzu (MaxArt2501)
1926
1926
  *
@@ -1931,7 +1931,7 @@ void main() {
1931
1931
  */(function(e,t){(function(r,n){e.exports=n()})(n2,function(){return function(n){for(var i={command:/\s*([achlmqstvz])/gi,number:/\s*([+-]?\d*\.?\d+(?:e[+-]?\d+)?)/gi,comma:/\s*(?:(,)|\s)/g,flag:/\s*([01])/g},o={number:function(_){return+v("number",_)},"coordinate pair":function(_){var b=v("number",_);if(b===null&&!_)return null;v("comma");var m=v("number",!0);return{x:+b,y:+m}},"arc definition":function(_){var b=o["coordinate pair"](_);if(!b&&!_)return null;v("comma");var m=+v("number",!0);v("comma",!0);var w=!!+v("flag",!0);v("comma");var T=!!+v("flag",!0);v("comma");var x=o["coordinate pair"](!0);return{radii:b,rotation:m,large:w,clockwise:T,end:x}}},a=0,u=[];a<n.length;){var f=v("command"),h=f.toUpperCase(),d=f!==h,p;switch(h){case"M":p=y("coordinate pair").map(function(_,b){return b===1&&(f=d?"l":"L"),c({end:_})});break;case"L":case"T":p=y("coordinate pair").map(function(_){return c({end:_})});break;case"C":if(p=y("coordinate pair"),p.length%3)throw Error("Expected coordinate pair triplet at position "+a);p=p.reduce(function(_,b,m){var w=m%3;if(!w)_.push(c({cp1:b}));else{var T=_[_.length-1];T[w===1?"cp2":"end"]=b}return _},[]);break;case"Q":case"S":if(p=y("coordinate pair"),p.length&1)throw Error("Expected coordinate pair couple at position "+a);p=p.reduce(function(_,b,m){var w=m&1;if(!w)_.push(c({cp:b}));else{var T=_[_.length-1];T.end=b}return _},[]);break;case"H":case"V":p=y("number").map(function(_){return c({value:_})});break;case"A":p=y("arc definition").map(c);break;case"Z":p=[{code:"Z"}];break}u.push.apply(u,p)}return u;function c(_){return _.code=f,_.relative=d,_}function v(_,b){i[_].lastIndex=a;var m=i[_].exec(n);if(!m||m.index!==a){if(!b)return null;throw Error("Expected "+_+" at position "+a)}return a=i[_].lastIndex,m[1]}function y(_){for(var b=[],m,w=!0;m=o[_](w);)b.push(m),w=!!v("comma");return b}}})})(i2);const s2=/^\s+/,o2=/\s+$/;function Tt(e,t){if(e=e||"",t=t||{},e instanceof Tt)return e;if(!(this instanceof Tt))return new Tt(e,t);var r=a2(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}Tt.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},getLuminance:function(){var e=this.toRgb(),t,r,n,i,o,a;return t=e.r/255,r=e.g/255,n=e.b/255,t<=.03928?i=t/12.92:i=Math.pow((t+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),n<=.03928?a=n/12.92:a=Math.pow((n+.055)/1.055,2.4),.2126*i+.7152*o+.0722*a},setAlpha:function(e){return this._a=Ip(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Ap(this._r,this._g,this._b);return{h:e.h*360,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Ap(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.v*100);return this._a==1?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=Sp(this._r,this._g,this._b);return{h:e.h*360,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Sp(this._r,this._g,this._b),t=Math.round(e.h*360),r=Math.round(e.s*100),n=Math.round(e.l*100);return this._a==1?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return Op(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return c2(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(ce(this._r,255)*100)+"%",g:Math.round(ce(this._g,255)*100)+"%",b:Math.round(ce(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(ce(this._r,255)*100)+"%, "+Math.round(ce(this._g,255)*100)+"%, "+Math.round(ce(this._b,255)*100)+"%)":"rgba("+Math.round(ce(this._r,255)*100)+"%, "+Math.round(ce(this._g,255)*100)+"%, "+Math.round(ce(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:T2[Op(this._r,this._g,this._b,!0)]||!1},toFilter:function(e){var t="#"+Cp(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=Tt(e);r="#"+Cp(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0,i=!t&&n&&(e==="hex"||e==="hex6"||e==="hex3"||e==="hex4"||e==="hex8"||e==="name");return i?e==="name"&&this._a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},clone:function(){return Tt(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v2,arguments)},brighten:function(){return this._applyModification(g2,arguments)},darken:function(){return this._applyModification(m2,arguments)},desaturate:function(){return this._applyModification(h2,arguments)},saturate:function(){return this._applyModification(d2,arguments)},greyscale:function(){return this._applyModification(p2,arguments)},spin:function(){return this._applyModification(y2,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(x2,arguments)},complement:function(){return this._applyCombination(_2,arguments)},monochromatic:function(){return this._applyCombination(w2,arguments)},splitcomplement:function(){return this._applyCombination(b2,arguments)},triad:function(){return this._applyCombination(Rp,[3])},tetrad:function(){return this._applyCombination(Rp,[4])}},Tt.fromRatio=function(e,t){if(typeof e=="object"){var r={};for(var n in e)e.hasOwnProperty(n)&&(n==="a"?r[n]=e[n]:r[n]=bs(e[n]));e=r}return Tt(e,t)};function a2(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,o=null,a=!1,u=!1;return typeof e=="string"&&(e=O2(e)),typeof e=="object"&&(Kr(e.r)&&Kr(e.g)&&Kr(e.b)?(t=l2(e.r,e.g,e.b),a=!0,u=String(e.r).substr(-1)==="%"?"prgb":"rgb"):Kr(e.h)&&Kr(e.s)&&Kr(e.v)?(n=bs(e.s),i=bs(e.v),t=f2(e.h,n,i),a=!0,u="hsv"):Kr(e.h)&&Kr(e.s)&&Kr(e.l)&&(n=bs(e.s),o=bs(e.l),t=u2(e.h,n,o),a=!0,u="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=Ip(r),{ok:a,format:e.format||u,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function l2(e,t,r){return{r:ce(e,255)*255,g:ce(t,255)*255,b:ce(r,255)*255}}function Sp(e,t,r){e=ce(e,255),t=ce(t,255),r=ce(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o,a,u=(n+i)/2;if(n==i)o=a=0;else{var f=n-i;switch(a=u>.5?f/(2-n-i):f/(n+i),n){case e:o=(t-r)/f+(t<r?6:0);break;case t:o=(r-e)/f+2;break;case r:o=(e-t)/f+4;break}o/=6}return{h:o,s:a,l:u}}function u2(e,t,r){var n,i,o;e=ce(e,360),t=ce(t,100),r=ce(r,100);function a(h,d,p){return p<0&&(p+=1),p>1&&(p-=1),p<1/6?h+(d-h)*6*p:p<1/2?d:p<2/3?h+(d-h)*(2/3-p)*6:h}if(t===0)n=i=o=r;else{var u=r<.5?r*(1+t):r+t-r*t,f=2*r-u;n=a(f,u,e+1/3),i=a(f,u,e),o=a(f,u,e-1/3)}return{r:n*255,g:i*255,b:o*255}}function Ap(e,t,r){e=ce(e,255),t=ce(t,255),r=ce(r,255);var n=Math.max(e,t,r),i=Math.min(e,t,r),o,a,u=n,f=n-i;if(a=n===0?0:f/n,n==i)o=0;else{switch(n){case e:o=(t-r)/f+(t<r?6:0);break;case t:o=(r-e)/f+2;break;case r:o=(e-t)/f+4;break}o/=6}return{h:o,s:a,v:u}}function f2(e,t,r){e=ce(e,360)*6,t=ce(t,100),r=ce(r,100);var n=Math.floor(e),i=e-n,o=r*(1-t),a=r*(1-i*t),u=r*(1-(1-i)*t),f=n%6,h=[r,a,o,o,u,r][f],d=[u,r,r,a,o,o][f],p=[o,o,u,r,r,a][f];return{r:h*255,g:d*255,b:p*255}}function Op(e,t,r,n){var i=[Ar(Math.round(e).toString(16)),Ar(Math.round(t).toString(16)),Ar(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function c2(e,t,r,n,i){var o=[Ar(Math.round(e).toString(16)),Ar(Math.round(t).toString(16)),Ar(Math.round(r).toString(16)),Ar(Pp(n))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Cp(e,t,r,n){var i=[Ar(Pp(n)),Ar(Math.round(e).toString(16)),Ar(Math.round(t).toString(16)),Ar(Math.round(r).toString(16))];return i.join("")}Tt.equals=function(e,t){return!e||!t?!1:Tt(e).toRgbString()==Tt(t).toRgbString()},Tt.random=function(){return Tt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function h2(e,t){t=t===0?0:t||10;var r=Tt(e).toHsl();return r.s-=t/100,r.s=Go(r.s),Tt(r)}function d2(e,t){t=t===0?0:t||10;var r=Tt(e).toHsl();return r.s+=t/100,r.s=Go(r.s),Tt(r)}function p2(e){return Tt(e).desaturate(100)}function v2(e,t){t=t===0?0:t||10;var r=Tt(e).toHsl();return r.l+=t/100,r.l=Go(r.l),Tt(r)}function g2(e,t){t=t===0?0:t||10;var r=Tt(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),Tt(r)}function m2(e,t){t=t===0?0:t||10;var r=Tt(e).toHsl();return r.l-=t/100,r.l=Go(r.l),Tt(r)}function y2(e,t){var r=Tt(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,Tt(r)}function _2(e){var t=Tt(e).toHsl();return t.h=(t.h+180)%360,Tt(t)}function Rp(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=Tt(e).toHsl(),n=[Tt(e)],i=360/t,o=1;o<t;o++)n.push(Tt({h:(r.h+o*i)%360,s:r.s,l:r.l}));return n}function b2(e){var t=Tt(e).toHsl(),r=t.h;return[Tt(e),Tt({h:(r+72)%360,s:t.s,l:t.l}),Tt({h:(r+216)%360,s:t.s,l:t.l})]}function x2(e,t,r){t=t||6,r=r||30;var n=Tt(e).toHsl(),i=360/r,o=[Tt(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,o.push(Tt(n));return o}function w2(e,t){t=t||6;for(var r=Tt(e).toHsv(),n=r.h,i=r.s,o=r.v,a=[],u=1/t;t--;)a.push(Tt({h:n,s:i,v:o})),o=(o+u)%1;return a}Tt.mix=function(e,t,r){r=r===0?0:r||50;var n=Tt(e).toRgb(),i=Tt(t).toRgb(),o=r/100,a={r:(i.r-n.r)*o+n.r,g:(i.g-n.g)*o+n.g,b:(i.b-n.b)*o+n.b,a:(i.a-n.a)*o+n.a};return Tt(a)},Tt.readability=function(e,t){var r=Tt(e),n=Tt(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},Tt.isReadable=function(e,t,r){var n=Tt.readability(e,t),i,o;switch(o=!1,i=C2(r),i.level+i.size){case"AAsmall":case"AAAlarge":o=n>=4.5;break;case"AAlarge":o=n>=3;break;case"AAAsmall":o=n>=7;break}return o},Tt.mostReadable=function(e,t,r){var n=null,i=0,o,a,u,f;r=r||{},a=r.includeFallbackColors,u=r.level,f=r.size;for(var h=0;h<t.length;h++)o=Tt.readability(e,t[h]),o>i&&(i=o,n=Tt(t[h]));return Tt.isReadable(e,n,{level:u,size:f})||!a?n:(r.includeFallbackColors=!1,Tt.mostReadable(e,["#fff","#000"],r))};var ku=Tt.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},T2=Tt.hexNames=E2(ku);function E2(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function Ip(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ce(e,t){S2(e)&&(e="100%");var r=A2(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Go(e){return Math.min(1,Math.max(0,e))}function tr(e){return parseInt(e,16)}function S2(e){return typeof e=="string"&&e.indexOf(".")!=-1&&parseFloat(e)===1}function A2(e){return typeof e=="string"&&e.indexOf("%")!=-1}function Ar(e){return e.length==1?"0"+e:""+e}function bs(e){return e<=1&&(e=e*100+"%"),e}function Pp(e){return Math.round(parseFloat(e)*255).toString(16)}function Np(e){return tr(e)/255}var Or=function(){var e="[-\\+]?\\d+%?",t="[-\\+]?\\d*\\.\\d+%?",r="(?:"+t+")|(?:"+e+")",n="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?",i="[\\s|\\(]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")[,|\\s]+("+r+")\\s*\\)?";return{CSS_UNIT:new RegExp(r),rgb:new RegExp("rgb"+n),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+n),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+n),hsva:new RegExp("hsva"+i),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function Kr(e){return!!Or.CSS_UNIT.exec(e)}function O2(e){e=e.replace(s2,"").replace(o2,"").toLowerCase();var t=!1;if(ku[e])e=ku[e],t=!0;else if(e=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r;return(r=Or.rgb.exec(e))?{r:r[1],g:r[2],b:r[3]}:(r=Or.rgba.exec(e))?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=Or.hsl.exec(e))?{h:r[1],s:r[2],l:r[3]}:(r=Or.hsla.exec(e))?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=Or.hsv.exec(e))?{h:r[1],s:r[2],v:r[3]}:(r=Or.hsva.exec(e))?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=Or.hex8.exec(e))?{r:tr(r[1]),g:tr(r[2]),b:tr(r[3]),a:Np(r[4]),format:t?"name":"hex8"}:(r=Or.hex6.exec(e))?{r:tr(r[1]),g:tr(r[2]),b:tr(r[3]),format:t?"name":"hex"}:(r=Or.hex4.exec(e))?{r:tr(r[1]+""+r[1]),g:tr(r[2]+""+r[2]),b:tr(r[3]+""+r[3]),a:Np(r[4]+""+r[4]),format:t?"name":"hex8"}:(r=Or.hex3.exec(e))?{r:tr(r[1]+""+r[1]),g:tr(r[2]+""+r[2]),b:tr(r[3]+""+r[3]),format:t?"name":"hex"}:!1}function C2(e){var t,r;return e=e||{level:"AA",size:"small"},t=(e.level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),t!=="AA"&&t!=="AAA"&&(t="AA"),r!=="small"&&r!=="large"&&(r="small"),{level:t,size:r}}var R2=function(){function e(t,r){var n=[],i=!0,o=!1,a=void 0;try{for(var u=t[Symbol.iterator](),f;!(i=(f=u.next()).done)&&(n.push(f.value),!(r&&n.length===r));i=!0);}catch(h){o=!0,a=h}finally{try{!i&&u.return&&u.return()}finally{if(o)throw a}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),xs=Math.PI*2,Lu=function(t,r,n,i,o,a,u){var f=t.x,h=t.y;f*=r,h*=n;var d=i*f-o*h,p=o*f+i*h;return{x:d+a,y:p+u}},I2=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),i=Math.cos(t),o=Math.sin(t),a=Math.cos(t+r),u=Math.sin(t+r);return[{x:i-o*n,y:o+i*n},{x:a+u*n,y:u-a*n},{x:a,y:u}]},Mp=function(t,r,n,i){var o=t*i-r*n<0?-1:1,a=t*n+r*i;return a>1&&(a=1),a<-1&&(a=-1),o*Math.acos(a)},P2=function(t,r,n,i,o,a,u,f,h,d,p,c){var v=Math.pow(o,2),y=Math.pow(a,2),_=Math.pow(p,2),b=Math.pow(c,2),m=v*y-v*b-y*_;m<0&&(m=0),m/=v*b+y*_,m=Math.sqrt(m)*(u===f?-1:1);var w=m*o/a*c,T=m*-a/o*p,x=d*w-h*T+(t+n)/2,E=h*w+d*T+(r+i)/2,I=(p-w)/o,O=(c-T)/a,A=(-p-w)/o,L=(-c-T)/a,R=Mp(1,0,I,O),C=Mp(I,O,A,L);return f===0&&C>0&&(C-=xs),f===1&&C<0&&(C+=xs),[x,E,R,C]},kp=function(t){var r=t.px,n=t.py,i=t.cx,o=t.cy,a=t.rx,u=t.ry,f=t.xAxisRotation,h=f===void 0?0:f,d=t.largeArcFlag,p=d===void 0?0:d,c=t.sweepFlag,v=c===void 0?0:c,y=[];if(a===0||u===0)return[];var _=Math.sin(h*xs/360),b=Math.cos(h*xs/360),m=b*(r-i)/2+_*(n-o)/2,w=-_*(r-i)/2+b*(n-o)/2;if(m===0&&w===0)return[];a=Math.abs(a),u=Math.abs(u);var T=Math.pow(m,2)/Math.pow(a,2)+Math.pow(w,2)/Math.pow(u,2);T>1&&(a*=Math.sqrt(T),u*=Math.sqrt(T));var x=P2(r,n,i,o,a,u,p,v,_,b,m,w),E=R2(x,4),I=E[0],O=E[1],A=E[2],L=E[3],R=Math.abs(L)/(xs/4);Math.abs(1-R)<1e-7&&(R=1);var C=Math.max(Math.ceil(R),1);L/=C;for(var P=0;P<C;P++)y.push(I2(A,L)),A+=L;return y.map(function(M){var F=Lu(M[0],a,u,b,_,I,O),q=F.x,Z=F.y,z=Lu(M[1],a,u,b,_,I,O),nt=z.x,V=z.y,D=Lu(M[2],a,u,b,_,I,O),k=D.x,G=D.y;return{x1:q,y1:Z,x2:nt,y2:V,x:k,y:G}})};class N2 extends Nu{constructor(t){super(),this.lineColor=null,t&&this.drawSVG(t)}drawSVG(t){if(typeof t=="string"){const r=document.createElement("div");r.innerHTML=t.trim(),t=r.querySelector("svg")}if(!t)throw new Error("Missing <svg> element in SVG constructor");return this._svgFill(t),this._svgChildren(t.children),this}_svgChildren(t,r=!1){for(let n=0;n<t.length;n++){const i=t[n];switch(this._svgFill(i,r),i.nodeName.toLowerCase()){case"path":{this._svgPath(i);break}case"circle":case"ellipse":{this._svgCircle(i);break}case"rect":{this._svgRect(i);break}case"polygon":{this._svgPoly(i,!0);break}case"polyline":{this._svgPoly(i);break}case"g":break;default:{console.info(`[PIXI.SVG] <${i.nodeName}> elements unsupported`);break}}this._svgChildren(i.children,!0)}}_hexToUint(t){if(t[0]==="#")return t=t.substr(1),t.length===3&&(t=t.replace(/([a-f0-9])/ig,"$1$1")),parseInt(t,16);const{r,g:n,b:i}=Tt(t).toRgb();return(r<<16)+(n<<8)+i}_svgCircle(t){let r="r",n="r";const i=t.nodeName==="elipse";i&&(r+="x",n+="y");const o=parseFloat(t.getAttribute(n)),a=parseFloat(t.getAttribute(r)),u=t.getAttribute("cx"),f=t.getAttribute("cy");let h=0,d=0;u!==null&&(h=parseFloat(u)),f!==null&&(d=parseFloat(f)),i?this.drawEllipse(h,d,o,a):this.drawCircle(h,d,o)}_svgRect(t){const r=parseFloat(t.getAttribute("x")),n=parseFloat(t.getAttribute("y")),i=parseFloat(t.getAttribute("width")),o=parseFloat(t.getAttribute("height")),a=parseFloat(t.getAttribute("rx"));a?this.drawRoundedRect(r,n,i,o,a):this.drawRect(r,n,i,o)}_convertStyleName(t){return t.trim().replace("-width","Width").replace(/.*-(line)?/,"")}_svgStyle(t){const r=t.getAttribute("style"),n=t.getAttribute("opacity"),i={fill:t.getAttribute("fill"),opacity:n||t.getAttribute("fill-opacity"),stroke:t.getAttribute("stroke"),strokeOpacity:n||t.getAttribute("stroke-opacity"),strokeWidth:t.getAttribute("stroke-width"),cap:t.getAttribute("stroke-linecap"),join:t.getAttribute("stroke-linejoin"),miterLimit:t.getAttribute("stroke-miterlimit")};return r!==null&&r.split(";").forEach(o=>{const[a,u]=o.split(":");if(a){const f=this._convertStyleName(a);i[f]||(i[f]=u.trim())}}),i}_svgPoly(t,r){const n=t.getAttribute("points").split(/[ ,]/g).map(i=>parseInt(i,10));this.drawPolygon(n),r&&this.closePath()}_svgFill(t,r){const{fill:n,opacity:i,stroke:o,strokeOpacity:a,strokeWidth:u,cap:f,join:h,miterLimit:d}=this._svgStyle(t),c=u!==null?parseFloat(u):o!==null?1:0,v=o!==null?this._hexToUint(o):this.lineColor;n?n==="none"?this.beginFill(0,0):this.beginFill(this._hexToUint(n),i!==null?parseFloat(i):1):r||this.beginFill(0),this.lineStyle({width:o===null&&u===null&&r?this.line.width:c,alpha:a===null?this.line.alpha:parseFloat(a),color:o===null&&r?this.line.color:v,cap:f===null&&r?this.line.cap:f,join:h===null&&r?this.line.join:h,miterLimit:d===null&&r?this.line.miterLimit:parseFloat(d)}),t.getAttribute("fill-rule")&&console.info('[PIXI.SVG] "fill-rule" attribute is not supported')}_svgPath(t){const r=t.getAttribute("d");let n=0,i=0;const o=Mu(r.trim());for(let a=0;a<o.length;a++){const u=o[a];switch(u.code){case"m":{this.moveTo(n+=u.end.x,i+=u.end.y);break}case"M":{this.moveTo(n=u.end.x,i=u.end.y);break}case"H":{this.lineTo(n=u.value,i);break}case"h":{this.lineTo(n+=u.value,i);break}case"V":{this.lineTo(n,i=u.value);break}case"v":{this.lineTo(n,i+=u.value);break}case"Z":{this.closePath();break}case"L":{this.lineTo(n=u.end.x,i=u.end.y);break}case"l":{this.lineTo(n+=u.end.x,i+=u.end.y);break}case"C":{this.bezierCurveTo(u.cp1.x,u.cp1.y,u.cp2.x,u.cp2.y,n=u.end.x,i=u.end.y);break}case"c":{const f=n,h=i;this.bezierCurveTo(f+u.cp1.x,h+u.cp1.y,f+u.cp2.x,h+u.cp2.y,n+=u.end.x,i+=u.end.y);break}case"s":case"q":{const f=n,h=i;this.quadraticCurveTo(f+u.cp.x,h+u.cp.y,n+=u.end.x,i+=u.end.y);break}case"S":case"Q":{this.quadraticCurveTo(u.cp.x,u.cp.y,n=u.end.x,i=u.end.y);break}case"a":{kp({px:n,py:i,cx:n+=u.end.x,cy:i+=u.end.y,rx:u.radii.x,ry:u.radii.y,xAxisRotation:u.rotation,largeArcFlag:u.large?1:0,sweepFlag:u.clockwise?1:0}).forEach(({x1:f,y1:h,x2:d,y2:p,x:c,y:v})=>this.bezierCurveTo(f,h,d,p,c,v));break}case"A":{kp({px:n,py:i,cx:n=u.end.x,cy:i=u.end.y,rx:u.radii.x,ry:u.radii.y,xAxisRotation:u.rotation,largeArcFlag:u.large?1:0,sweepFlag:u.clockwise?1:0}).forEach(({x1:f,y1:h,x2:d,y2:p,x:c,y:v})=>this.bezierCurveTo(f,h,d,p,c,v));break}default:{console.info("[PIXI.SVG] Draw command not supported:",u.code,u);break}}}}}var jo={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},M2=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function k2(e){return e===10||e===13||e===8232||e===8233||e===32||e===9||e===11||e===12||e===160||e>=5760&&M2.indexOf(e)>=0}function L2(e){switch(e|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:case 114:return!0}return!1}function F2(e){return(e|32)===97}function Ri(e){return e>=48&&e<=57}function B2(e){return e>=48&&e<=57||e===43||e===45||e===46}function D2(e){this.index=0,this.path=e,this.max=e.length,this.result=[],this.param=0,this.err="",this.segmentStart=0,this.data=[]}function qo(e){for(;e.index<e.max&&k2(e.path.charCodeAt(e.index));)e.index++}function U2(e){var t=e.path.charCodeAt(e.index);if(t===48){e.param=0,e.index++;return}if(t===49){e.param=1,e.index++;return}e.err="SvgPath: arc flag can be 0 or 1 only (at pos "+e.index+")"}function $2(e){var t=e.index,r=t,n=e.max,i=!1,o=!1,a=!1,u=!1,f;if(r>=n){e.err="SvgPath: missed param (at pos "+r+")";return}if(f=e.path.charCodeAt(r),(f===43||f===45)&&(r++,f=r<n?e.path.charCodeAt(r):0),!Ri(f)&&f!==46){e.err="SvgPath: param should start with 0..9 or `.` (at pos "+r+")";return}if(f!==46){if(i=f===48,r++,f=r<n?e.path.charCodeAt(r):0,i&&r<n&&f&&Ri(f)){e.err="SvgPath: numbers started with `0` such as `09` are illegal (at pos "+t+")";return}for(;r<n&&Ri(e.path.charCodeAt(r));)r++,o=!0;f=r<n?e.path.charCodeAt(r):0}if(f===46){for(u=!0,r++;Ri(e.path.charCodeAt(r));)r++,a=!0;f=r<n?e.path.charCodeAt(r):0}if(f===101||f===69){if(u&&!o&&!a){e.err="SvgPath: invalid float exponent (at pos "+r+")";return}if(r++,f=r<n?e.path.charCodeAt(r):0,(f===43||f===45)&&r++,r<n&&Ri(e.path.charCodeAt(r)))for(;r<n&&Ri(e.path.charCodeAt(r));)r++;else{e.err="SvgPath: invalid float exponent (at pos "+r+")";return}}e.index=r,e.param=parseFloat(e.path.slice(t,r))+0}function Fu(e){var t,r;t=e.path[e.segmentStart],r=t.toLowerCase();var n=e.data;if(r==="m"&&n.length>2&&(e.result.push([t,n[0],n[1]]),n=n.slice(2),r="l",t=t==="m"?"l":"L"),r==="r")e.result.push([t].concat(n));else for(;n.length>=jo[r]&&(e.result.push([t].concat(n.splice(0,jo[r]))),!!jo[r]););}function G2(e){var t=e.max,r,n,i,o,a;if(e.segmentStart=e.index,r=e.path.charCodeAt(e.index),n=F2(r),!L2(r)){e.err="SvgPath: bad command "+e.path[e.index]+" (at pos "+e.index+")";return}if(o=jo[e.path[e.index].toLowerCase()],e.index++,qo(e),e.data=[],!o){Fu(e);return}for(i=!1;;){for(a=o;a>0;a--){if(n&&(a===3||a===4)?U2(e):$2(e),e.err.length){Fu(e);return}e.data.push(e.param),qo(e),i=!1,e.index<t&&e.path.charCodeAt(e.index)===44&&(e.index++,qo(e),i=!0)}if(!i&&(e.index>=e.max||!B2(e.path.charCodeAt(e.index))))break}Fu(e)}var j2=function(t){var r=new D2(t),n=r.max;for(qo(r);r.index<n&&!r.err.length;)G2(r);return r.result.length&&("mM".indexOf(r.result[0][0])<0?(r.err="SvgPath: string should start with `M` or `m`",r.result=[]):r.result[0][0]="M"),{err:r.err,segments:r.result}};function q2(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}function Cr(){if(!(this instanceof Cr))return new Cr;this.queue=[],this.cache=null}Cr.prototype.matrix=function(e){return e[0]===1&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===0&&e[5]===0?this:(this.cache=null,this.queue.push(e),this)},Cr.prototype.translate=function(e,t){return(e!==0||t!==0)&&(this.cache=null,this.queue.push([1,0,0,1,e,t])),this},Cr.prototype.scale=function(e,t){return(e!==1||t!==1)&&(this.cache=null,this.queue.push([e,0,0,t,0,0])),this},Cr.prototype.rotate=function(e,t,r){var n,i,o;return e!==0&&(this.translate(t,r),n=e*Math.PI/180,i=Math.cos(n),o=Math.sin(n),this.queue.push([i,o,-o,i,0,0]),this.cache=null,this.translate(-t,-r)),this},Cr.prototype.skewX=function(e){return e!==0&&(this.cache=null,this.queue.push([1,0,Math.tan(e*Math.PI/180),1,0,0])),this},Cr.prototype.skewY=function(e){return e!==0&&(this.cache=null,this.queue.push([1,Math.tan(e*Math.PI/180),0,1,0,0])),this},Cr.prototype.toArray=function(){if(this.cache)return this.cache;if(!this.queue.length)return this.cache=[1,0,0,1,0,0],this.cache;if(this.cache=this.queue[0],this.queue.length===1)return this.cache;for(var e=1;e<this.queue.length;e++)this.cache=q2(this.cache,this.queue[e]);return this.cache},Cr.prototype.calc=function(e,t,r){var n;return this.queue.length?(this.cache||(this.cache=this.toArray()),n=this.cache,[e*n[0]+t*n[2]+(r?0:n[4]),e*n[1]+t*n[3]+(r?0:n[5])]):[e,t]};var Lp=Cr,z2=Lp,H2={matrix:!0,scale:!0,rotate:!0,translate:!0,skewX:!0,skewY:!0},V2=/\s*(matrix|translate|scale|rotate|skewX|skewY)\s*\(\s*(.+?)\s*\)[\s,]*/,W2=/[\s,]+/,X2=function(t){var r=new z2,n,i;return t.split(V2).forEach(function(o){if(o.length){if(typeof H2[o]<"u"){n=o;return}switch(i=o.split(W2).map(function(a){return+a||0}),n){case"matrix":i.length===6&&r.matrix(i);return;case"scale":i.length===1?r.scale(i[0],i[0]):i.length===2&&r.scale(i[0],i[1]);return;case"rotate":i.length===1?r.rotate(i[0],0,0):i.length===3&&r.rotate(i[0],i[1],i[2]);return;case"translate":i.length===1?r.translate(i[0],0):i.length===2&&r.translate(i[0],i[1]);return;case"skewX":i.length===1&&r.skewX(i[0]);return;case"skewY":i.length===1&&r.skewY(i[0]);return}}}),r},ws=Math.PI*2;function Fp(e,t,r,n){var i=e*n-t*r<0?-1:1,o=e*r+t*n;return o>1&&(o=1),o<-1&&(o=-1),i*Math.acos(o)}function K2(e,t,r,n,i,o,a,u,f,h){var d=h*(e-r)/2+f*(t-n)/2,p=-f*(e-r)/2+h*(t-n)/2,c=a*a,v=u*u,y=d*d,_=p*p,b=c*v-c*_-v*y;b<0&&(b=0),b/=c*_+v*y,b=Math.sqrt(b)*(i===o?-1:1);var m=b*a/u*p,w=b*-u/a*d,T=h*m-f*w+(e+r)/2,x=f*m+h*w+(t+n)/2,E=(d-m)/a,I=(p-w)/u,O=(-d-m)/a,A=(-p-w)/u,L=Fp(1,0,E,I),R=Fp(E,I,O,A);return o===0&&R>0&&(R-=ws),o===1&&R<0&&(R+=ws),[T,x,L,R]}function Y2(e,t){var r=1.3333333333333333*Math.tan(t/4),n=Math.cos(e),i=Math.sin(e),o=Math.cos(e+t),a=Math.sin(e+t);return[n,i,n-i*r,i+n*r,o+a*r,a-o*r,o,a]}var Z2=function(t,r,n,i,o,a,u,f,h){var d=Math.sin(h*ws/360),p=Math.cos(h*ws/360),c=p*(t-n)/2+d*(r-i)/2,v=-d*(t-n)/2+p*(r-i)/2;if(c===0&&v===0)return[];if(u===0||f===0)return[];u=Math.abs(u),f=Math.abs(f);var y=c*c/(u*u)+v*v/(f*f);y>1&&(u*=Math.sqrt(y),f*=Math.sqrt(y));var _=K2(t,r,n,i,o,a,u,f,d,p),b=[],m=_[2],w=_[3],T=Math.max(Math.ceil(Math.abs(w)/(ws/4)),1);w/=T;for(var x=0;x<T;x++)b.push(Y2(m,w)),m+=w;return b.map(function(E){for(var I=0;I<E.length;I+=2){var O=E[I+0],A=E[I+1];O*=u,A*=f;var L=p*O-d*A,R=d*O+p*A;E[I+0]=L+_[0],E[I+1]=R+_[1]}return E})},Ts=1e-10,Bp=Math.PI/180;function Es(e,t,r){if(!(this instanceof Es))return new Es(e,t,r);this.rx=e,this.ry=t,this.ax=r}Es.prototype.transform=function(e){var t=Math.cos(this.ax*Bp),r=Math.sin(this.ax*Bp),n=[this.rx*(e[0]*t+e[2]*r),this.rx*(e[1]*t+e[3]*r),this.ry*(-e[0]*r+e[2]*t),this.ry*(-e[1]*r+e[3]*t)],i=n[0]*n[0]+n[2]*n[2],o=n[1]*n[1]+n[3]*n[3],a=((n[0]-n[3])*(n[0]-n[3])+(n[2]+n[1])*(n[2]+n[1]))*((n[0]+n[3])*(n[0]+n[3])+(n[2]-n[1])*(n[2]-n[1])),u=(i+o)/2;if(a<Ts*u)return this.rx=this.ry=Math.sqrt(u),this.ax=0,this;var f=n[0]*n[1]+n[2]*n[3];a=Math.sqrt(a);var h=u+a/2,d=u-a/2;return this.ax=Math.abs(f)<Ts&&Math.abs(h-o)<Ts?90:Math.atan(Math.abs(f)>Math.abs(h-o)?(h-i)/f:f/(h-o))*180/Math.PI,this.ax>=0?(this.rx=Math.sqrt(h),this.ry=Math.sqrt(d)):(this.ax+=90,this.rx=Math.sqrt(d),this.ry=Math.sqrt(h)),this},Es.prototype.isDegenerate=function(){return this.rx<Ts*this.ry||this.ry<Ts*this.rx};var Q2=Es,J2=j2,tS=X2,pn=Lp,eS=Z2,rS=Q2;function ge(e){if(!(this instanceof ge))return new ge(e);var t=J2(e);this.segments=t.segments,this.err=t.err,this.__stack=[]}ge.from=function(e){if(typeof e=="string")return new ge(e);if(e instanceof ge){var t=new ge("");return t.err=e.err,t.segments=e.segments.map(function(r){return r.slice()}),t.__stack=e.__stack.map(function(r){return pn().matrix(r.toArray())}),t}throw new Error("SvgPath.from: invalid param type "+e)},ge.prototype.__matrix=function(e){var t=this,r;e.queue.length&&this.iterate(function(n,i,o,a){var u,f,h,d;switch(n[0]){case"v":u=e.calc(0,n[1],!0),f=u[0]===0?["v",u[1]]:["l",u[0],u[1]];break;case"V":u=e.calc(o,n[1],!1),f=u[0]===e.calc(o,a,!1)[0]?["V",u[1]]:["L",u[0],u[1]];break;case"h":u=e.calc(n[1],0,!0),f=u[1]===0?["h",u[0]]:["l",u[0],u[1]];break;case"H":u=e.calc(n[1],a,!1),f=u[1]===e.calc(o,a,!1)[1]?["H",u[0]]:["L",u[0],u[1]];break;case"a":case"A":var p=e.toArray(),c=rS(n[1],n[2],n[3]).transform(p);if(p[0]*p[3]-p[1]*p[2]<0&&(n[5]=n[5]?"0":"1"),u=e.calc(n[6],n[7],n[0]==="a"),n[0]==="A"&&n[6]===o&&n[7]===a||n[0]==="a"&&n[6]===0&&n[7]===0){f=[n[0]==="a"?"l":"L",u[0],u[1]];break}c.isDegenerate()?f=[n[0]==="a"?"l":"L",u[0],u[1]]:f=[n[0],c.rx,c.ry,c.ax,n[4],n[5],u[0],u[1]];break;case"m":d=i>0,u=e.calc(n[1],n[2],d),f=["m",u[0],u[1]];break;default:for(h=n[0],f=[h],d=h.toLowerCase()===h,r=1;r<n.length;r+=2)u=e.calc(n[r],n[r+1],d),f.push(u[0],u[1])}t.segments[i]=f},!0)},ge.prototype.__evaluateStack=function(){var e,t;if(this.__stack.length){if(this.__stack.length===1){this.__matrix(this.__stack[0]),this.__stack=[];return}for(e=pn(),t=this.__stack.length;--t>=0;)e.matrix(this.__stack[t].toArray());this.__matrix(e),this.__stack=[]}},ge.prototype.toString=function(){var e="",t="",r=!1;this.__evaluateStack();for(var n=0,i=this.segments.length;n<i;n++){var o=this.segments[n],a=o[0];a!==t||a==="m"||a==="M"?(a==="m"&&t==="z"&&(e+=" "),e+=a,r=!1):r=!0;for(var u=1;u<o.length;u++){var f=o[u];u===1?r&&f>=0&&(e+=" "):f>=0&&(e+=" "),e+=f}t=a}return e},ge.prototype.translate=function(e,t){return this.__stack.push(pn().translate(e,t||0)),this},ge.prototype.scale=function(e,t){return this.__stack.push(pn().scale(e,!t&&t!==0?e:t)),this},ge.prototype.rotate=function(e,t,r){return this.__stack.push(pn().rotate(e,t||0,r||0)),this},ge.prototype.skewX=function(e){return this.__stack.push(pn().skewX(e)),this},ge.prototype.skewY=function(e){return this.__stack.push(pn().skewY(e)),this},ge.prototype.matrix=function(e){return this.__stack.push(pn().matrix(e)),this},ge.prototype.transform=function(e){return e.trim()?(this.__stack.push(tS(e)),this):this},ge.prototype.round=function(e){var t=0,r=0,n=0,i=0,o;return e=e||0,this.__evaluateStack(),this.segments.forEach(function(a){var u=a[0].toLowerCase()===a[0];switch(a[0]){case"H":case"h":u&&(a[1]+=n),n=a[1]-a[1].toFixed(e),a[1]=+a[1].toFixed(e);return;case"V":case"v":u&&(a[1]+=i),i=a[1]-a[1].toFixed(e),a[1]=+a[1].toFixed(e);return;case"Z":case"z":n=t,i=r;return;case"M":case"m":u&&(a[1]+=n,a[2]+=i),n=a[1]-a[1].toFixed(e),i=a[2]-a[2].toFixed(e),t=n,r=i,a[1]=+a[1].toFixed(e),a[2]=+a[2].toFixed(e);return;case"A":case"a":u&&(a[6]+=n,a[7]+=i),n=a[6]-a[6].toFixed(e),i=a[7]-a[7].toFixed(e),a[1]=+a[1].toFixed(e),a[2]=+a[2].toFixed(e),a[3]=+a[3].toFixed(e+2),a[6]=+a[6].toFixed(e),a[7]=+a[7].toFixed(e);return;default:o=a.length,u&&(a[o-2]+=n,a[o-1]+=i),n=a[o-2]-a[o-2].toFixed(e),i=a[o-1]-a[o-1].toFixed(e),a.forEach(function(f,h){h&&(a[h]=+a[h].toFixed(e))});return}}),this},ge.prototype.iterate=function(e,t){var r=this.segments,n={},i=!1,o=0,a=0,u=0,f=0,h,d,p;if(t||this.__evaluateStack(),r.forEach(function(c,v){var y=e(c,v,o,a);Array.isArray(y)&&(n[v]=y,i=!0);var _=c[0]===c[0].toLowerCase();switch(c[0]){case"m":case"M":o=c[1]+(_?o:0),a=c[2]+(_?a:0),u=o,f=a;return;case"h":case"H":o=c[1]+(_?o:0);return;case"v":case"V":a=c[1]+(_?a:0);return;case"z":case"Z":o=u,a=f;return;default:o=c[c.length-2]+(_?o:0),a=c[c.length-1]+(_?a:0)}}),!i)return this;for(p=[],h=0;h<r.length;h++)if(typeof n[h]<"u")for(d=0;d<n[h].length;d++)p.push(n[h][d]);else p.push(r[h]);return this.segments=p,this},ge.prototype.abs=function(){return this.iterate(function(e,t,r,n){var i=e[0],o=i.toUpperCase(),a;if(i!==o)switch(e[0]=o,i){case"v":e[1]+=n;return;case"a":e[6]+=r,e[7]+=n;return;default:for(a=1;a<e.length;a++)e[a]+=a%2?r:n}},!0),this},ge.prototype.rel=function(){return this.iterate(function(e,t,r,n){var i=e[0],o=i.toLowerCase(),a;if(i!==o&&!(t===0&&i==="M"))switch(e[0]=o,i){case"V":e[1]-=n;return;case"A":e[6]-=r,e[7]-=n;return;default:for(a=1;a<e.length;a++)e[a]-=a%2?r:n}},!0),this},ge.prototype.unarc=function(){return this.iterate(function(e,t,r,n){var i,o,a,u=[],f=e[0];return f!=="A"&&f!=="a"?null:(f==="a"?(o=r+e[6],a=n+e[7]):(o=e[6],a=e[7]),i=eS(r,n,o,a,e[4],e[5],e[1],e[2],e[3]),i.length===0?[[e[0]==="a"?"l":"L",e[6],e[7]]]:(i.forEach(function(h){u.push(["C",h[2],h[3],h[4],h[5],h[6],h[7]])}),u))}),this},ge.prototype.unshort=function(){var e=this.segments,t,r,n,i,o;return this.iterate(function(a,u,f,h){var d=a[0],p=d.toUpperCase(),c;u&&(p==="T"?(c=d==="t",n=e[u-1],n[0]==="Q"?(t=n[1]-f,r=n[2]-h):n[0]==="q"?(t=n[1]-n[3],r=n[2]-n[4]):(t=0,r=0),i=-t,o=-r,c||(i+=f,o+=h),e[u]=[c?"q":"Q",i,o,a[1],a[2]]):p==="S"&&(c=d==="s",n=e[u-1],n[0]==="C"?(t=n[3]-f,r=n[4]-h):n[0]==="c"?(t=n[3]-n[5],r=n[4]-n[6]):(t=0,r=0),i=-t,o=-r,c||(i+=f,o+=h),e[u]=[c?"c":"C",i,o,a[1],a[2],a[3],a[4]]))}),this};var nS=ge,iS=nS;const sS=En(iS),oS=Et.forwardRef((e,t)=>{const[r,n]=Et.useState(null),i=mt.useRef(null),o=mt.useRef(null),a=mt.useRef(null),{path:u,visible:f,transformation:{x:h,y:d,width:p,height:c,anchor:v,hexColor:y,fill:_,stroke:b="none",strokeWidth:m=0,colorCorrection:w={}},pointerdown:T,pointerup:x}=e,E=le.useApp(),{temperatureFilter:I,sharpnessFilter:O,hueFilter:A,blurFilter:L,adjustmentFilter:R}=_s(w),{blurRadius:C=0}=w;return Et.useEffect(()=>{const P=sS(u).scale(5).translate(0,0).toString(),M=`<svg xmlns="http://www.w3.org/2000/svg" width="${p}" height="${c}">
1932
1932
  <path stroke="${b}" stroke-width="${m}" fill="${y||_}" d="${P}">
1933
1933
  </path>
1934
- </svg>`,F=new N2(M),q=E.renderer.generateTexture(F);return n(q),()=>{}},[E,u,b,m,y,_]),Vt.jsx(ni,{...e,ref:t,children:Vt.jsx(le.Container,{ref:o,children:Vt.jsx(le.Container,{ref:a,children:r&&Vt.jsx(le.Sprite,{texture:r,width:p,height:c,anchor:v,ref:i,x:h,y:d,alpha:f?1:0,...f&&{interactive:!0,pointerdown:T,pointerup:x},filters:[I,O,A,R,...C>0?[L]:[]]})})})})});var aS=Mr,lS=function(){return aS.Date.now()},uS=lS,fS=/\s/;function cS(e){for(var t=e.length;t--&&fS.test(e.charAt(t)););return t}var hS=cS,dS=hS,pS=/^\s+/;function vS(e){return e&&e.slice(0,dS(e)+1).replace(pS,"")}var gS=vS,mS=Yi,yS=Qi,_S="[object Symbol]";function bS(e){return typeof e=="symbol"||yS(e)&&mS(e)==_S}var zo=bS,xS=gS,Dp=Zi,wS=zo,Up=0/0,TS=/^[-+]0x[0-9a-f]+$/i,ES=/^0b[01]+$/i,SS=/^0o[0-7]+$/i,AS=parseInt;function OS(e){if(typeof e=="number")return e;if(wS(e))return Up;if(Dp(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Dp(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=xS(e);var r=ES.test(e);return r||SS.test(e)?AS(e.slice(2),r?2:8):TS.test(e)?Up:+e}var CS=OS,RS=Zi,Bu=uS,$p=CS,IS="Expected a function",PS=Math.max,NS=Math.min;function MS(e,t,r){var n,i,o,a,u,f,h=0,d=!1,p=!1,c=!0;if(typeof e!="function")throw new TypeError(IS);t=$p(t)||0,RS(r)&&(d=!!r.leading,p="maxWait"in r,o=p?PS($p(r.maxWait)||0,t):o,c="trailing"in r?!!r.trailing:c);function v(I){var O=n,A=i;return n=i=void 0,h=I,a=e.apply(A,O),a}function y(I){return h=I,u=setTimeout(m,t),d?v(I):a}function _(I){var O=I-f,A=I-h,L=t-O;return p?NS(L,o-A):L}function b(I){var O=I-f,A=I-h;return f===void 0||O>=t||O<0||p&&A>=o}function m(){var I=Bu();if(b(I))return w(I);u=setTimeout(m,_(I))}function w(I){return u=void 0,c&&n?v(I):(n=i=void 0,a)}function T(){u!==void 0&&clearTimeout(u),h=0,n=f=i=u=void 0}function x(){return u===void 0?a:w(Bu())}function E(){var I=Bu(),O=b(I);if(n=arguments,i=this,f=I,O){if(u===void 0)return y(f);if(p)return clearTimeout(u),u=setTimeout(m,t),v(f)}return u===void 0&&(u=setTimeout(m,t)),a}return E.cancel=T,E.flush=x,E}var kS=MS;const Ii=En(kS),LS=e=>{const t={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=Et.useState(!1),n=mt.useRef(null),i=mt.useRef(t),o=mt.useRef(null),{tl:a,dragModeRef:u}=mt.useContext(An);console.log("audio props",e);const{uniqueId:f,src:h,startAt:d,endAt:p,mute:c,speed:v,audioStartAt:y,audioEndAt:_,visible:b}=e,m=Et.useRef(null);Ze(Oe.PAUSE,()=>{var A;n.current&&m.current&&((A=m.current)==null||A.pause(),i.current.isPlaying=!1)}),Et.useEffect(()=>{m.current&&(u.current?(m.current.pause(),i.current.isPlaying=!1,i.current.isDragging=!0):i.current.isDragging=!1)},[u]);const w=(A,L)=>{var R,C;n.current&&((R=m.current)==null||R.play({volume:!c&&b?1:0,start:A,end:L,speed:v||1}),u.current?((C=m.current)==null||C.pause(),i.current.isPlaying=!1,i.current.completed=!1):(i.current.isPlaying=!0,i.current.completed=!1))},T=Ii((A,L)=>{var R;m.current&&((R=m.current)==null||R.play({volume:!c&&b?1:0,start:A,end:L,speed:v||1}),i.current.isPlaying=!0)},100),x=Ii(()=>{m.current&&(m.current.pause(),i.current.isPlaying=!1)},300),E=()=>{var A;n.current&&((A=m.current)==null||A.stop(),i.current.isPlaying=!1,i.current.completed=!0)},I=(A,L)=>{var C,P,M,F;const R=A+((C=o.current)==null?void 0:C.time());m.current&&u.current?(T(R,L),x(),i.current.isPlaying=!1):n.current&&!i.current.isPlaying&&m.current&&((P=m.current)==null||P.refresh(),(M=m.current)==null||M.refreshPaused(),(F=m.current)==null||F.resume(),i.current.isPlaying=!0)},O=()=>{};return mt.useEffect(()=>{let A=_e.context(()=>{});if(n.current&&a.current){const L={duration:Number(_)-Number(y),onStart:w,onComplete:E,onStartParams:[y,_],onCompleteParams:[],onInterrupt:O,onUpdate:I,onUpdateParams:[y,_]};A=_e.context(()=>{o.current=_e.from(n.current,L,y),a.current.to(n.current,{alpha:1,duration:.01},d).to(n.current,{alpha:0,duration:.1},Number(p)-.09),a.current.add(o.current,d)})}return()=>{o.current&&(o.current.kill(),_e.killTweensOf(o.current)),A.revert()}},[d,p,y,_]),Et.useEffect(()=>{n.current&&r(!0)},[]),Et.useEffect(()=>{n.current&&m.current&&(i.current.mute=!c&&b?1:0,i.current.speed=v,m.current.volume=c?0:1)},[b,c,v]),Et.useEffect(()=>(rl(h)||(m.current=ly.Sound.from({url:h,preload:!0,singleInstance:!0,loaded:()=>{console.log("audio loaded"),i.current.loaded=!0}})),()=>{m.current&&m.current.pause&&m.current.pause()}),[f,h]),Vt.jsx(le.Container,{ref:n})};function FS(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Gp=FS;function BS(){this.__data__=[],this.size=0}var DS=BS;function US(e,t){return e===t||e!==e&&t!==t}var jp=US,$S=jp;function GS(e,t){for(var r=e.length;r--;)if($S(e[r][0],t))return r;return-1}var Ho=GS,jS=Ho,qS=Array.prototype,zS=qS.splice;function HS(e){var t=this.__data__,r=jS(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():zS.call(t,r,1),--this.size,!0}var VS=HS,WS=Ho;function XS(e){var t=this.__data__,r=WS(t,e);return r<0?void 0:t[r][1]}var KS=XS,YS=Ho;function ZS(e){return YS(this.__data__,e)>-1}var QS=ZS,JS=Ho;function tA(e,t){var r=this.__data__,n=JS(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var eA=tA,rA=DS,nA=VS,iA=KS,sA=QS,oA=eA;function Pi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Pi.prototype.clear=rA,Pi.prototype.delete=nA,Pi.prototype.get=iA,Pi.prototype.has=sA,Pi.prototype.set=oA;var Vo=Pi,aA=Vo;function lA(){this.__data__=new aA,this.size=0}var uA=lA;function fA(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var cA=fA;function hA(e){return this.__data__.get(e)}var dA=hA;function pA(e){return this.__data__.has(e)}var vA=pA,gA=ei,mA=gA(Object,"create"),Wo=mA,qp=Wo;function yA(){this.__data__=qp?qp(null):{},this.size=0}var _A=yA;function bA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var xA=bA,wA=Wo,TA="__lodash_hash_undefined__",EA=Object.prototype,SA=EA.hasOwnProperty;function AA(e){var t=this.__data__;if(wA){var r=t[e];return r===TA?void 0:r}return SA.call(t,e)?t[e]:void 0}var OA=AA,CA=Wo,RA=Object.prototype,IA=RA.hasOwnProperty;function PA(e){var t=this.__data__;return CA?t[e]!==void 0:IA.call(t,e)}var NA=PA,MA=Wo,kA="__lodash_hash_undefined__";function LA(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=MA&&t===void 0?kA:t,this}var FA=LA,BA=_A,DA=xA,UA=OA,$A=NA,GA=FA;function Ni(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ni.prototype.clear=BA,Ni.prototype.delete=DA,Ni.prototype.get=UA,Ni.prototype.has=$A,Ni.prototype.set=GA;var jA=Ni,zp=jA,qA=Vo,zA=Va;function HA(){this.size=0,this.__data__={hash:new zp,map:new(zA||qA),string:new zp}}var VA=HA;function WA(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var XA=WA,KA=XA;function YA(e,t){var r=e.__data__;return KA(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Xo=YA,ZA=Xo;function QA(e){var t=ZA(this,e).delete(e);return this.size-=t?1:0,t}var JA=QA,tO=Xo;function eO(e){return tO(this,e).get(e)}var rO=eO,nO=Xo;function iO(e){return nO(this,e).has(e)}var sO=iO,oO=Xo;function aO(e,t){var r=oO(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var lO=aO,uO=VA,fO=JA,cO=rO,hO=sO,dO=lO;function Mi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mi.prototype.clear=uO,Mi.prototype.delete=fO,Mi.prototype.get=cO,Mi.prototype.has=hO,Mi.prototype.set=dO;var Du=Mi,pO=Vo,vO=Va,gO=Du,mO=200;function yO(e,t){var r=this.__data__;if(r instanceof pO){var n=r.__data__;if(!vO||n.length<mO-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new gO(n)}return r.set(e,t),this.size=r.size,this}var _O=yO,bO=Vo,xO=uA,wO=cA,TO=dA,EO=vA,SO=_O;function ki(e){var t=this.__data__=new bO(e);this.size=t.size}ki.prototype.clear=xO,ki.prototype.delete=wO,ki.prototype.get=TO,ki.prototype.has=EO,ki.prototype.set=SO;var Hp=ki,AO="__lodash_hash_undefined__";function OO(e){return this.__data__.set(e,AO),this}var CO=OO;function RO(e){return this.__data__.has(e)}var IO=RO,PO=Du,NO=CO,MO=IO;function Ko(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new PO;++t<r;)this.add(e[t])}Ko.prototype.add=Ko.prototype.push=NO,Ko.prototype.has=MO;var kO=Ko;function LO(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var FO=LO;function BO(e,t){return e.has(t)}var DO=BO,UO=kO,$O=FO,GO=DO,jO=1,qO=2;function zO(e,t,r,n,i,o){var a=r&jO,u=e.length,f=t.length;if(u!=f&&!(a&&f>u))return!1;var h=o.get(e),d=o.get(t);if(h&&d)return h==t&&d==e;var p=-1,c=!0,v=r&qO?new UO:void 0;for(o.set(e,t),o.set(t,e);++p<u;){var y=e[p],_=t[p];if(n)var b=a?n(_,y,p,t,e,o):n(y,_,p,e,t,o);if(b!==void 0){if(b)continue;c=!1;break}if(v){if(!$O(t,function(m,w){if(!GO(v,w)&&(y===m||i(y,m,r,n,o)))return v.push(w)})){c=!1;break}}else if(!(y===_||i(y,_,r,n,o))){c=!1;break}}return o.delete(e),o.delete(t),c}var Vp=zO,HO=Mr,VO=HO.Uint8Array,WO=VO;function XO(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var KO=XO;function YO(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var ZO=YO,Wp=js,Xp=WO,QO=jp,JO=Vp,tC=KO,eC=ZO,rC=1,nC=2,iC="[object Boolean]",sC="[object Date]",oC="[object Error]",aC="[object Map]",lC="[object Number]",uC="[object RegExp]",fC="[object Set]",cC="[object String]",hC="[object Symbol]",dC="[object ArrayBuffer]",pC="[object DataView]",Kp=Wp?Wp.prototype:void 0,Uu=Kp?Kp.valueOf:void 0;function vC(e,t,r,n,i,o,a){switch(r){case pC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case dC:return!(e.byteLength!=t.byteLength||!o(new Xp(e),new Xp(t)));case iC:case sC:case lC:return QO(+e,+t);case oC:return e.name==t.name&&e.message==t.message;case uC:case cC:return e==t+"";case aC:var u=tC;case fC:var f=n&rC;if(u||(u=eC),e.size!=t.size&&!f)return!1;var h=a.get(e);if(h)return h==t;n|=nC,a.set(e,t);var d=JO(u(e),u(t),n,i,o,a);return a.delete(e),d;case hC:if(Uu)return Uu.call(e)==Uu.call(t)}return!1}var gC=vC;function mC(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var yC=mC,_C=yC,bC=kr;function xC(e,t,r){var n=t(e);return bC(e)?n:_C(n,r(e))}var wC=xC;function TC(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}var EC=TC;function SC(){return[]}var AC=SC,OC=EC,CC=AC,RC=Object.prototype,IC=RC.propertyIsEnumerable,Yp=Object.getOwnPropertySymbols,PC=Yp?function(e){return e==null?[]:(e=Object(e),OC(Yp(e),function(t){return IC.call(e,t)}))}:CC,NC=PC;function MC(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var kC=MC,LC=9007199254740991,FC=/^(?:0|[1-9]\d*)$/;function BC(e,t){var r=typeof e;return t=t??LC,!!t&&(r=="number"||r!="symbol"&&FC.test(e))&&e>-1&&e%1==0&&e<t}var Zp=BC,DC=kC,UC=Qa,$C=kr,GC=tl,jC=Zp,qC=el,zC=Object.prototype,HC=zC.hasOwnProperty;function VC(e,t){var r=$C(e),n=!r&&UC(e),i=!r&&!n&&GC(e),o=!r&&!n&&!i&&qC(e),a=r||n||i||o,u=a?DC(e.length,String):[],f=u.length;for(var h in e)(t||HC.call(e,h))&&!(a&&(h=="length"||i&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||jC(h,f)))&&u.push(h);return u}var WC=VC,XC=WC,KC=vc,YC=qs;function ZC(e){return YC(e)?XC(e):KC(e)}var $u=ZC,QC=wC,JC=NC,tR=$u;function eR(e){return QC(e,tR,JC)}var rR=eR,Qp=rR,nR=1,iR=Object.prototype,sR=iR.hasOwnProperty;function oR(e,t,r,n,i,o){var a=r&nR,u=Qp(e),f=u.length,h=Qp(t),d=h.length;if(f!=d&&!a)return!1;for(var p=f;p--;){var c=u[p];if(!(a?c in t:sR.call(t,c)))return!1}var v=o.get(e),y=o.get(t);if(v&&y)return v==t&&y==e;var _=!0;o.set(e,t),o.set(t,e);for(var b=a;++p<f;){c=u[p];var m=e[c],w=t[c];if(n)var T=a?n(w,m,c,t,e,o):n(m,w,c,e,t,o);if(!(T===void 0?m===w||i(m,w,r,n,o):T)){_=!1;break}b||(b=c=="constructor")}if(_&&!b){var x=e.constructor,E=t.constructor;x!=E&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof E=="function"&&E instanceof E)&&(_=!1)}return o.delete(e),o.delete(t),_}var aR=oR,Gu=Hp,lR=Vp,uR=gC,fR=aR,Jp=Ic,tv=kr,ev=tl,cR=el,hR=1,rv="[object Arguments]",nv="[object Array]",Yo="[object Object]",dR=Object.prototype,iv=dR.hasOwnProperty;function pR(e,t,r,n,i,o){var a=tv(e),u=tv(t),f=a?nv:Jp(e),h=u?nv:Jp(t);f=f==rv?Yo:f,h=h==rv?Yo:h;var d=f==Yo,p=h==Yo,c=f==h;if(c&&ev(e)){if(!ev(t))return!1;a=!0,d=!1}if(c&&!d)return o||(o=new Gu),a||cR(e)?lR(e,t,r,n,i,o):uR(e,t,f,r,n,i,o);if(!(r&hR)){var v=d&&iv.call(e,"__wrapped__"),y=p&&iv.call(t,"__wrapped__");if(v||y){var _=v?e.value():e,b=y?t.value():t;return o||(o=new Gu),i(_,b,r,n,o)}}return c?(o||(o=new Gu),fR(e,t,r,n,i,o)):!1}var vR=pR,gR=vR,sv=Qi;function ov(e,t,r,n,i){return e===t?!0:e==null||t==null||!sv(e)&&!sv(t)?e!==e&&t!==t:gR(e,t,r,n,ov,i)}var av=ov,mR=Hp,yR=av,_R=1,bR=2;function xR(e,t,r,n){var i=r.length,o=i,a=!n;if(e==null)return!o;for(e=Object(e);i--;){var u=r[i];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<o;){u=r[i];var f=u[0],h=e[f],d=u[1];if(a&&u[2]){if(h===void 0&&!(f in e))return!1}else{var p=new mR;if(n)var c=n(h,d,f,e,t,p);if(!(c===void 0?yR(d,h,_R|bR,n,p):c))return!1}}return!0}var wR=xR,TR=Zi;function ER(e){return e===e&&!TR(e)}var lv=ER,SR=lv,AR=$u;function OR(e){for(var t=AR(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,SR(i)]}return t}var CR=OR;function RR(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var uv=RR,IR=wR,PR=CR,NR=uv;function MR(e){var t=PR(e);return t.length==1&&t[0][2]?NR(t[0][0],t[0][1]):function(r){return r===e||IR(r,e,t)}}var kR=MR,LR=kr,FR=zo,BR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,DR=/^\w*$/;function UR(e,t){if(LR(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||FR(e)?!0:DR.test(e)||!BR.test(e)||t!=null&&e in Object(t)}var ju=UR,fv=Du,$R="Expected a function";function qu(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError($R);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(qu.Cache||fv),r}qu.Cache=fv;var GR=qu,jR=GR,qR=500;function zR(e){var t=jR(e,function(n){return r.size===qR&&r.clear(),n}),r=t.cache;return t}var HR=zR,VR=HR,WR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,XR=/\\(\\)?/g,KR=VR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(WR,function(r,n,i,o){t.push(i?o.replace(XR,"$1"):n||r)}),t}),YR=KR,cv=js,ZR=Gp,QR=kr,JR=zo,tI=1/0,hv=cv?cv.prototype:void 0,dv=hv?hv.toString:void 0;function pv(e){if(typeof e=="string")return e;if(QR(e))return ZR(e,pv)+"";if(JR(e))return dv?dv.call(e):"";var t=e+"";return t=="0"&&1/e==-tI?"-0":t}var eI=pv,rI=eI;function nI(e){return e==null?"":rI(e)}var iI=nI,sI=kr,oI=ju,aI=YR,lI=iI;function uI(e,t){return sI(e)?e:oI(e,t)?[e]:aI(lI(e))}var vv=uI,fI=zo,cI=1/0;function hI(e){if(typeof e=="string"||fI(e))return e;var t=e+"";return t=="0"&&1/e==-cI?"-0":t}var Zo=hI,dI=vv,pI=Zo;function vI(e,t){t=dI(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[pI(t[r++])];return r&&r==n?e:void 0}var gv=vI,gI=gv;function mI(e,t,r){var n=e==null?void 0:gI(e,t);return n===void 0?r:n}var yI=mI;function _I(e,t){return e!=null&&t in Object(e)}var bI=_I,xI=vv,wI=Qa,TI=kr,EI=Zp,SI=Ja,AI=Zo;function OI(e,t,r){t=xI(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=AI(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&SI(i)&&EI(a,i)&&(TI(e)||wI(e)))}var CI=OI,RI=bI,II=CI;function PI(e,t){return e!=null&&II(e,t,RI)}var NI=PI,MI=av,kI=yI,LI=NI,FI=ju,BI=lv,DI=uv,UI=Zo,$I=1,GI=2;function jI(e,t){return FI(e)&&BI(t)?DI(UI(e),t):function(r){var n=kI(r,e);return n===void 0&&n===t?LI(r,e):MI(t,n,$I|GI)}}var qI=jI;function zI(e){return e}var HI=zI;function VI(e){return function(t){return t==null?void 0:t[e]}}var WI=VI,XI=gv;function KI(e){return function(t){return XI(t,e)}}var YI=KI,ZI=WI,QI=YI,JI=ju,tP=Zo;function eP(e){return JI(e)?ZI(tP(e)):QI(e)}var rP=eP,nP=kR,iP=qI,sP=HI,oP=kr,aP=rP;function lP(e){return typeof e=="function"?e:e==null?sP:typeof e=="object"?oP(e)?iP(e[0],e[1]):nP(e):aP(e)}var uP=lP;function fP(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),u=a.length;u--;){var f=a[e?u:++i];if(r(o[f],f,o)===!1)break}return t}}var cP=fP,hP=cP,dP=hP(),pP=dP,vP=pP,gP=$u;function mP(e,t){return e&&vP(e,t,gP)}var yP=mP,_P=qs;function bP(e,t){return function(r,n){if(r==null)return r;if(!_P(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Object(r);(t?o--:++o<i)&&n(a[o],o,a)!==!1;);return r}}var xP=bP,wP=yP,TP=xP,EP=TP(wP),SP=EP,AP=SP,OP=qs;function CP(e,t){var r=-1,n=OP(e)?Array(e.length):[];return AP(e,function(i,o,a){n[++r]=t(i,o,a)}),n}var RP=CP,IP=Gp,PP=uP,NP=RP,MP=kr;function kP(e,t){var r=MP(e)?IP:NP;return r(e,PP(t))}var LP=kP;const FP=En(LP);var zn={},mv={},Yr={};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.loop=Yr.conditional=Yr.parse=void 0;var BP=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n;if(Array.isArray(r))r.forEach(function(a){return e(t,a,n,i)});else if(typeof r=="function")r(t,n,i,e);else{var o=Object.keys(r)[0];Array.isArray(r[o])?(i[o]={},e(t,r[o],n,i[o])):i[o]=r[o](t,n,i,e)}return n};Yr.parse=BP;var DP=function(t,r){return function(n,i,o,a){r(n,i,o)&&a(n,t,i,o)}};Yr.conditional=DP;var UP=function(t,r){return function(n,i,o,a){for(var u=[],f=n.pos;r(n,i,o);){var h={};if(a(n,t,i,h),n.pos===f)break;f=n.pos,u.push(h)}return u}};Yr.loop=UP;var be={};Object.defineProperty(be,"__esModule",{value:!0}),be.readBits=be.readArray=be.readUnsigned=be.readString=be.peekBytes=be.readBytes=be.peekByte=be.readByte=be.buildStream=void 0;var $P=function(t){return{data:t,pos:0}};be.buildStream=$P;var yv=function(){return function(t){return t.data[t.pos++]}};be.readByte=yv;var GP=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+t]}};be.peekByte=GP;var Qo=function(t){return function(r){return r.data.subarray(r.pos,r.pos+=t)}};be.readBytes=Qo;var jP=function(t){return function(r){return r.data.subarray(r.pos,r.pos+t)}};be.peekBytes=jP;var qP=function(t){return function(r){return Array.from(Qo(t)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};be.readString=qP;var zP=function(t){return function(r){var n=Qo(2)(r);return t?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};be.readUnsigned=zP;var HP=function(t,r){return function(n,i,o){for(var a=typeof r=="function"?r(n,i,o):r,u=Qo(t),f=new Array(a),h=0;h<a;h++)f[h]=u(n);return f}};be.readArray=HP;var VP=function(t,r,n){for(var i=0,o=0;o<n;o++)i+=t[r+o]&&Math.pow(2,n-o-1);return i},WP=function(t){return function(r){for(var n=yv()(r),i=new Array(8),o=0;o<8;o++)i[7-o]=!!(n&1<<o);return Object.keys(t).reduce(function(a,u){var f=t[u];return f.length?a[u]=VP(i,f.index,f.length):a[u]=i[f.index],a},{})}};be.readBits=WP,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Yr,r=be,n={blocks:function(c){for(var v=0,y=[],_=c.data.length,b=0,m=(0,r.readByte)()(c);m!==v&&m;m=(0,r.readByte)()(c)){if(c.pos+m>=_){var w=_-c.pos;y.push((0,r.readBytes)(w)(c)),b+=w;break}y.push((0,r.readBytes)(m)(c)),b+=m}for(var T=new Uint8Array(b),x=0,E=0;E<y.length;E++)T.set(y[E],x),x+=y[E].length;return T}},i=(0,t.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===249}),o=(0,t.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,t.conditional)({lct:(0,r.readArray)(3,function(p,c,v){return Math.pow(2,v.descriptor.lct.size+1)})},function(p,c,v){return v.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(p){return(0,r.peekByte)()(p)===44}),a=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(c,v,y){return(0,r.readBytes)(y.text.blockSize)(c)}},n]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===1}),u=(0,t.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(c,v,y){return(0,r.readString)(y.blockSize)(c)}},n]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===255}),f=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===254}),h=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,t.conditional)({gct:(0,r.readArray)(3,function(p,c){return Math.pow(2,c.lsd.gct.size+1)})},function(p,c){return c.lsd.gct.exists}),{frames:(0,t.loop)([i,u,f,o,a],function(p){var c=(0,r.peekByte)()(p);return c===33||c===44})}],d=h;e.default=d}(mv);var Jo={};Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.deinterlace=void 0;var XP=function(t,r){for(var n=new Array(t.length),i=t.length/r,o=function(c,v){var y=t.slice(v*r,(v+1)*r);n.splice.apply(n,[c*r,r].concat(y))},a=[0,4,2,1],u=[8,8,4,2],f=0,h=0;h<4;h++)for(var d=a[h];d<i;d+=u[h])o(d,f),f++;return n};Jo.deinterlace=XP;var ta={};Object.defineProperty(ta,"__esModule",{value:!0}),ta.lzw=void 0;var KP=function(t,r,n){var i=4096,o=-1,a=n,u,f,h,d,p,c,v,I,y,_,E,b,O,A,R,L,m=new Array(n),w=new Array(i),T=new Array(i),x=new Array(i+1);for(b=t,f=1<<b,p=f+1,u=f+2,v=o,d=b+1,h=(1<<d)-1,y=0;y<f;y++)w[y]=0,T[y]=y;var E,I,O,A,L,R;for(E=I=O=A=L=R=0,_=0;_<a;){if(A===0){if(I<d){E+=r[R]<<I,I+=8,R++;continue}if(y=E&h,E>>=d,I-=d,y>u||y==p)break;if(y==f){d=b+1,h=(1<<d)-1,u=f+2,v=o;continue}if(v==o){x[A++]=T[y],v=y,O=y;continue}for(c=y,y==u&&(x[A++]=O,y=v);y>f;)x[A++]=T[y],y=w[y];O=T[y]&255,x[A++]=O,u<i&&(w[u]=v,T[u]=O,u++,!(u&h)&&u<i&&(d++,h+=u)),v=c}A--,m[L++]=x[A],_++}for(_=L;_<a;_++)m[_]=0;return m};ta.lzw=KP,Object.defineProperty(zn,"__esModule",{value:!0}),zn.decompressFrames=zn.decompressFrame=zn.parseGIF=void 0;var YP=eN(mv),ZP=Yr,QP=be,JP=Jo,tN=ta;function eN(e){return e&&e.__esModule?e:{default:e}}var rN=function(t){var r=new Uint8Array(t);return(0,ZP.parse)((0,QP.buildStream)(r),YP.default)};zn.parseGIF=rN;var nN=function(t){for(var r=t.pixels.length,n=new Uint8ClampedArray(r*4),i=0;i<r;i++){var o=i*4,a=t.pixels[i],u=t.colorTable[a]||[0,0,0];n[o]=u[0],n[o+1]=u[1],n[o+2]=u[2],n[o+3]=a!==t.transparentIndex?255:0}return n},_v=function(t,r,n){if(!t.image){console.warn("gif frame does not have associated image.");return}var i=t.image,o=i.descriptor.width*i.descriptor.height,a=(0,tN.lzw)(i.data.minCodeSize,i.data.blocks,o);i.descriptor.lct.interlaced&&(a=(0,JP.deinterlace)(a,i.descriptor.width));var u={pixels:a,dims:{top:t.image.descriptor.top,left:t.image.descriptor.left,width:t.image.descriptor.width,height:t.image.descriptor.height}};return i.descriptor.lct&&i.descriptor.lct.exists?u.colorTable=i.lct:u.colorTable=r,t.gce&&(u.delay=(t.gce.delay||10)*10,u.disposalType=t.gce.extras.disposal,t.gce.extras.transparentColorGiven&&(u.transparentIndex=t.gce.transparentColorIndex)),n&&(u.patch=nN(u)),u};zn.decompressFrame=_v;var iN=function(t,r){return t.frames.filter(function(n){return n.image}).map(function(n){return _v(n,t.gct,r)})};zn.decompressFrames=iN;const bv=(e,t={})=>{typeof t=="function"&&(t=t(e));const r=t.loaded&&e.loaded!==t.loaded,{playing:n,...i}=t,o={...e,...i};return r&&Object.assign(o,{playing:o.autoPlay&&o.loaded}),(t.delays!=null||t.frames!=null)&&Object.assign(o,{length:o.frames.length}),(t.index!=null||t.frames!=null)&&Object.assign(o,{index:o.length===0?0:(o.length+o.index)%o.length}),t.playing!=null&&Object.assign(o,o.loaded?{playing:n}:{autoPlay:n}),o},sN=e=>bv({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},e),oN=e=>mt.useReducer(bv,e,sN);var aN='function e(e){var r={exports:{}};return e(r,r.exports),r.exports}var r=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loop=r.conditional=r.parse=void 0;r.parse=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(t))t.forEach((function(t){return e(r,t,n,a)}));else if("function"==typeof t)t(r,n,a,e);else{var i=Object.keys(t)[0];Array.isArray(t[i])?(a[i]={},e(r,t[i],n,a[i])):a[i]=t[i](r,n,a,e)}return n};r.conditional=function(e,r){return function(t,n,a,i){r(t,n,a)&&i(t,e,n,a)}};r.loop=function(e,r){return function(t,n,a,i){for(var o=[];r(t,n,a);){var s={};i(t,e,n,s),o.push(s)}return o}}})),t=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.readBits=r.readArray=r.readUnsigned=r.readString=r.peekBytes=r.readBytes=r.peekByte=r.readByte=r.buildStream=void 0;r.buildStream=function(e){return{data:e,pos:0}};var t=function(){return function(e){return e.data[e.pos++]}};r.readByte=t;r.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(r){return r.data[r.pos+e]}};var n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};r.readBytes=n;r.peekBytes=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};r.readString=function(e){return function(r){return Array.from(n(e)(r)).map((function(e){return String.fromCharCode(e)})).join("")}};r.readUnsigned=function(e){return function(r){var t=n(2)(r);return e?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};r.readArray=function(e,r){return function(t,a,i){for(var o="function"==typeof r?r(t,a,i):r,s=n(e),d=new Array(o),c=0;c<o;c++)d[c]=s(t);return d}};r.readBits=function(e){return function(r){for(var t=function(e){return e.data[e.pos++]}(r),n=new Array(8),a=0;a<8;a++)n[7-a]=!!(t&1<<a);return Object.keys(e).reduce((function(r,t){var a=e[t];return a.length?r[t]=function(e,r,t){for(var n=0,a=0;a<t;a++)n+=e[r+a]&&Math.pow(2,t-a-1);return n}(n,a.index,a.length):r[t]=n[a.index],r}),{})}}})),n=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={blocks:function(e){for(var r=[],n=e.data.length,a=0,i=(0,t.readByte)()(e);0!==i;i=(0,t.readByte)()(e)){if(e.pos+i>=n){var o=n-e.pos;r.push((0,t.readBytes)(o)(e)),a+=o;break}r.push((0,t.readBytes)(i)(e)),a+=i}for(var s=new Uint8Array(a),d=0,c=0;c<r.length;c++)s.set(r[c],d),d+=r[c].length;return s}},i=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&249===r[1]})),o=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,(function(e,r,t){return Math.pow(2,t.descriptor.lct.size+1)}))},(function(e,r,t){return t.descriptor.lct.exists})),{data:[{minCodeSize:(0,t.readByte)()},a]}]},(function(e){return 44===(0,t.peekByte)()(e)})),s=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(e,r,n){return(0,t.readBytes)(n.text.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&1===r[1]})),d=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(e,r,n){return(0,t.readString)(n.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&255===r[1]})),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&254===r[1]})),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,(function(e,r){return Math.pow(2,r.lsd.gct.size+1)}))},(function(e,r){return r.lsd.gct.exists})),{frames:(0,r.loop)([i,d,c,o,s],(function(e){var r=(0,t.peekByte)()(e);return 33===r||44===r}))}];n.default=u})),a=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.deinterlace=void 0;r.deinterlace=function(e,r){for(var t=new Array(e.length),n=e.length/r,a=function(n,a){var i=e.slice(a*r,(a+1)*r);t.splice.apply(t,[n*r,r].concat(i))},i=[0,4,2,1],o=[8,8,4,2],s=0,d=0;d<4;d++)for(var c=i[d];c<n;c+=o[d])a(c,s),s++;return t}})),i=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lzw=void 0;r.lzw=function(e,r,t){var n,a,i,o,s,d,c,u,l,f,p,g,y,h,v,m,x=4096,B=t,w=new Array(t),b=new Array(x),k=new Array(x),A=new Array(4097);for(s=(a=1<<(f=e))+1,n=a+2,c=-1,i=(1<<(o=f+1))-1,u=0;u<a;u++)b[u]=0,k[u]=u;for(p=g=y=h=v=m=0,l=0;l<B;){if(0===h){if(g<o){p+=r[m]<<g,g+=8,m++;continue}if(u=p&i,p>>=o,g-=o,u>n||u==s)break;if(u==a){i=(1<<(o=f+1))-1,n=a+2,c=-1;continue}if(-1==c){A[h++]=k[u],c=u,y=u;continue}for(d=u,u==n&&(A[h++]=y,u=c);u>a;)A[h++]=k[u],u=b[u];y=255&k[u],A[h++]=y,n<x&&(b[n]=c,k[n]=y,0==(++n&i)&&n<x&&(o++,i+=n)),c=d}h--,w[v++]=A[h],l++}for(l=v;l<B;l++)w[l]=0;return w}})),o=e((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFrames=o.decompressFrame=o.parseGIF=void 0;var s,d=(s=n)&&s.__esModule?s:{default:s};o.parseGIF=function(e){var n=new Uint8Array(e);return(0,r.parse)((0,t.buildStream)(n),d.default)};var c=function(e,r,t){if(e.image){var n=e.image,o=n.descriptor.width*n.descriptor.height,s=(0,i.lzw)(n.data.minCodeSize,n.data.blocks,o);n.descriptor.lct.interlaced&&(s=(0,a.deinterlace)(s,n.descriptor.width));var d={pixels:s,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?d.colorTable=n.lct:d.colorTable=r,e.gce&&(d.delay=10*(e.gce.delay||10),d.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(d.transparentIndex=e.gce.transparentColorIndex)),t&&(d.patch=function(e){for(var r=e.pixels.length,t=new Uint8ClampedArray(4*r),n=0;n<r;n++){var a=4*n,i=e.pixels[n],o=e.colorTable[i]||[0,0,0];t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=i!==e.transparentIndex?255:0}return t}(d)),d}console.warn("gif frame does not have associated image.")};o.decompressFrame=c;o.decompressFrames=function(e,r){return e.frames.filter((function(e){return e.image})).map((function(t){return c(t,e.gct,r)}))}}));const s=(e,r,t)=>{const{width:n,height:a,top:i,left:o}=r.dims,s=i*t.width+o;for(let i=0;i<a;i++)for(let a=0;a<n;a++){const o=i*n+a,d=r.pixels[o];if(d!==r.transparentIndex){const n=s+i*t.width+a,o=r.colorTable[d]||[0,0,0];e[4*n]=o[0],e[4*n+1]=o[1],e[4*n+2]=o[2],e[4*n+3]=255}}return e},d=new Map;self.addEventListener("message",(e=>{const{type:r,src:t}=e.data||e;switch(r){case"parse":if(!d.has(t)){const e=new AbortController,r={signal:e.signal};d.set(t,e),((e,{signal:r})=>fetch(e,{signal:r}).then((e=>{if(!e.headers.get("Content-Type").includes("image/gif"))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()})).then((e=>o.parseGIF(e))).then((e=>((e=>{let r=null;for(const t of e.frames)r=t.gce?t.gce:r,"image"in t&&!("gce"in t)&&(t.gce=r)})(e),e))).then((e=>Promise.all([o.decompressFrames(e,!1),{width:e.lsd.width,height:e.lsd.height}]))).then((([e,r])=>{const t=[],n=r.width*r.height*4;for(let a=0;a<e.length;++a){const i=e[a],o=0===a||2===e[a-1].disposalType?new Uint8ClampedArray(n):t[a-1].slice();t.push(s(o,i,r))}return{...r,loaded:!0,delays:e.map((e=>e.delay)),frames:t}})))(t,r).then((e=>{self.postMessage(Object.assign(e,{src:t}),e.frames.map((e=>e.buffer)))})).catch((e=>{self.postMessage({src:t,error:e,loaded:!0})})).finally((()=>{d.delete(t)}))}break;case"cancel":if(d.has(t)){d.get(t).abort(),d.delete(t)}}}));\n';function lN(e){const t=new Blob([aN],{type:"application/javascript"}),r=URL.createObjectURL(t),n=new Worker(r,e);return URL.revokeObjectURL(r),n}const uN=e=>({...e,frames:e.frames.map(t=>{const r=new ImageData(e.width,e.height);return r.data.set(new Uint8ClampedArray(t)),r})}),fN=(e,t)=>{const r={};return()=>(r.instance||(r.instance=e()),mt.useLayoutEffect(()=>(r.timeout?(clearTimeout(r.timeout),delete r.timeout):r.usageCount=(r.usageCount||0)+1,()=>{r.timeout=setTimeout(()=>{r.usageCount=r.usageCount-1,r.usageCount===0&&(t&&t(r.instance),delete r.instance,delete r.timeout)})}),[r,t]),r.instance)},cN=e=>{const t=mt.useRef(e);return mt.useEffect(()=>{t.current=e},[e]),t},hN=e=>{const t=cN(e);return mt.useCallback(r=>t.current&&t.current(r),[])},dN=fN(()=>new lN,e=>e.terminate()),pN=(e,t)=>{const r=hN(t),n=dN();mt.useEffect(()=>{if(typeof e=="string"){const i=o=>{const a=o.data||o;if(a.src===e){const u=a.error?a:uN(a);r(u)}};return n.addEventListener("message",i),n.postMessage({src:e,type:"parse"}),()=>{n.postMessage({src:e,type:"cancel"}),n.removeEventListener("message",i)}}},[n,e])},vN=({isPlaying:e,forwardRef:t,...r})=>{const n=Et.useRef(null);return Et.useImperativeHandle(t,()=>n.current,[n]),Et.useEffect(()=>{if(n.current===null)return;const i=n.current;i[e?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[e]),Vt.jsx(le.AnimatedSprite,{ref:n,...r,isPlaying:e})},xv=Et.memo(vN);var ea={exports:{}};/**
1934
+ </svg>`,F=new N2(M),q=E.renderer.generateTexture(F);return n(q),()=>{}},[E,u,b,m,y,_]),Vt.jsx(ni,{...e,ref:t,children:Vt.jsx(le.Container,{ref:o,children:Vt.jsx(le.Container,{ref:a,children:r&&Vt.jsx(le.Sprite,{texture:r,width:p,height:c,anchor:v,ref:i,x:h,y:d,alpha:f?1:0,...f&&{interactive:!0,pointerdown:T,pointerup:x},filters:[I,O,A,R,...C>0?[L]:[]]})})})})});var aS=Mr,lS=function(){return aS.Date.now()},uS=lS,fS=/\s/;function cS(e){for(var t=e.length;t--&&fS.test(e.charAt(t)););return t}var hS=cS,dS=hS,pS=/^\s+/;function vS(e){return e&&e.slice(0,dS(e)+1).replace(pS,"")}var gS=vS,mS=Yi,yS=Qi,_S="[object Symbol]";function bS(e){return typeof e=="symbol"||yS(e)&&mS(e)==_S}var zo=bS,xS=gS,Dp=Zi,wS=zo,Up=0/0,TS=/^[-+]0x[0-9a-f]+$/i,ES=/^0b[01]+$/i,SS=/^0o[0-7]+$/i,AS=parseInt;function OS(e){if(typeof e=="number")return e;if(wS(e))return Up;if(Dp(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Dp(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=xS(e);var r=ES.test(e);return r||SS.test(e)?AS(e.slice(2),r?2:8):TS.test(e)?Up:+e}var CS=OS,RS=Zi,Bu=uS,$p=CS,IS="Expected a function",PS=Math.max,NS=Math.min;function MS(e,t,r){var n,i,o,a,u,f,h=0,d=!1,p=!1,c=!0;if(typeof e!="function")throw new TypeError(IS);t=$p(t)||0,RS(r)&&(d=!!r.leading,p="maxWait"in r,o=p?PS($p(r.maxWait)||0,t):o,c="trailing"in r?!!r.trailing:c);function v(I){var O=n,A=i;return n=i=void 0,h=I,a=e.apply(A,O),a}function y(I){return h=I,u=setTimeout(m,t),d?v(I):a}function _(I){var O=I-f,A=I-h,L=t-O;return p?NS(L,o-A):L}function b(I){var O=I-f,A=I-h;return f===void 0||O>=t||O<0||p&&A>=o}function m(){var I=Bu();if(b(I))return w(I);u=setTimeout(m,_(I))}function w(I){return u=void 0,c&&n?v(I):(n=i=void 0,a)}function T(){u!==void 0&&clearTimeout(u),h=0,n=f=i=u=void 0}function x(){return u===void 0?a:w(Bu())}function E(){var I=Bu(),O=b(I);if(n=arguments,i=this,f=I,O){if(u===void 0)return y(f);if(p)return clearTimeout(u),u=setTimeout(m,t),v(f)}return u===void 0&&(u=setTimeout(m,t)),a}return E.cancel=T,E.flush=x,E}var kS=MS;const Ii=En(kS),LS=e=>{const t={isPlaying:!1,progress:0,speed:1,mute:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1},[,r]=Et.useState(!1),n=mt.useRef(null),i=mt.useRef(t),o=mt.useRef(null),{tl:a,dragModeRef:u}=mt.useContext(An),{uniqueId:f,src:h,startAt:d,endAt:p,mute:c,speed:v,audioStartAt:y,audioEndAt:_,visible:b}=e,m=Et.useRef(null);Ze(Oe.PAUSE,()=>{var A;n.current&&m.current&&((A=m.current)==null||A.pause(),i.current.isPlaying=!1)}),Et.useEffect(()=>{m.current&&(u.current?(m.current.pause(),i.current.isPlaying=!1,i.current.isDragging=!0):i.current.isDragging=!1)},[u]);const w=(A,L)=>{var R,C;n.current&&((R=m.current)==null||R.play({volume:!c&&b?1:0,start:A,end:L,speed:v||1}),u.current?((C=m.current)==null||C.pause(),i.current.isPlaying=!1,i.current.completed=!1):(i.current.isPlaying=!0,i.current.completed=!1))},T=Ii((A,L)=>{var R;m.current&&((R=m.current)==null||R.play({volume:!c&&b?1:0,start:A,end:L,speed:v||1}),i.current.isPlaying=!0)},100),x=Ii(()=>{m.current&&(m.current.pause(),i.current.isPlaying=!1)},300),E=()=>{var A;n.current&&((A=m.current)==null||A.stop(),i.current.isPlaying=!1,i.current.completed=!0)},I=(A,L)=>{var C,P,M,F;const R=A+((C=o.current)==null?void 0:C.time());m.current&&u.current?(T(R,L),x(),i.current.isPlaying=!1):n.current&&!i.current.isPlaying&&m.current&&((P=m.current)==null||P.refresh(),(M=m.current)==null||M.refreshPaused(),(F=m.current)==null||F.resume(),i.current.isPlaying=!0)},O=()=>{};return mt.useEffect(()=>{let A=_e.context(()=>{});if(n.current&&a.current){const L={duration:Number(_)-Number(y),onStart:w,onComplete:E,onStartParams:[y,_],onCompleteParams:[],onInterrupt:O,onUpdate:I,onUpdateParams:[y,_]};A=_e.context(()=>{o.current=_e.from(n.current,L,y),a.current.to(n.current,{alpha:1,duration:.01},d).to(n.current,{alpha:0,duration:.1},Number(p)-.09),a.current.add(o.current,d)})}return()=>{o.current&&(o.current.kill(),_e.killTweensOf(o.current)),A.revert()}},[d,p,y,_]),Et.useEffect(()=>{n.current&&r(!0)},[]),Et.useEffect(()=>{n.current&&m.current&&(i.current.mute=!c&&b?1:0,i.current.speed=v,m.current.volume=c?0:1)},[b,c,v]),Et.useEffect(()=>(rl(h)||(m.current=ly.Sound.from({url:h,preload:!0,singleInstance:!0,loaded:()=>{console.log("audio loaded"),i.current.loaded=!0}})),()=>{m.current&&m.current.pause&&m.current.pause()}),[f,h]),Vt.jsx(le.Container,{ref:n})};function FS(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Gp=FS;function BS(){this.__data__=[],this.size=0}var DS=BS;function US(e,t){return e===t||e!==e&&t!==t}var jp=US,$S=jp;function GS(e,t){for(var r=e.length;r--;)if($S(e[r][0],t))return r;return-1}var Ho=GS,jS=Ho,qS=Array.prototype,zS=qS.splice;function HS(e){var t=this.__data__,r=jS(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():zS.call(t,r,1),--this.size,!0}var VS=HS,WS=Ho;function XS(e){var t=this.__data__,r=WS(t,e);return r<0?void 0:t[r][1]}var KS=XS,YS=Ho;function ZS(e){return YS(this.__data__,e)>-1}var QS=ZS,JS=Ho;function tA(e,t){var r=this.__data__,n=JS(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var eA=tA,rA=DS,nA=VS,iA=KS,sA=QS,oA=eA;function Pi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Pi.prototype.clear=rA,Pi.prototype.delete=nA,Pi.prototype.get=iA,Pi.prototype.has=sA,Pi.prototype.set=oA;var Vo=Pi,aA=Vo;function lA(){this.__data__=new aA,this.size=0}var uA=lA;function fA(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var cA=fA;function hA(e){return this.__data__.get(e)}var dA=hA;function pA(e){return this.__data__.has(e)}var vA=pA,gA=ei,mA=gA(Object,"create"),Wo=mA,qp=Wo;function yA(){this.__data__=qp?qp(null):{},this.size=0}var _A=yA;function bA(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var xA=bA,wA=Wo,TA="__lodash_hash_undefined__",EA=Object.prototype,SA=EA.hasOwnProperty;function AA(e){var t=this.__data__;if(wA){var r=t[e];return r===TA?void 0:r}return SA.call(t,e)?t[e]:void 0}var OA=AA,CA=Wo,RA=Object.prototype,IA=RA.hasOwnProperty;function PA(e){var t=this.__data__;return CA?t[e]!==void 0:IA.call(t,e)}var NA=PA,MA=Wo,kA="__lodash_hash_undefined__";function LA(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=MA&&t===void 0?kA:t,this}var FA=LA,BA=_A,DA=xA,UA=OA,$A=NA,GA=FA;function Ni(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ni.prototype.clear=BA,Ni.prototype.delete=DA,Ni.prototype.get=UA,Ni.prototype.has=$A,Ni.prototype.set=GA;var jA=Ni,zp=jA,qA=Vo,zA=Va;function HA(){this.size=0,this.__data__={hash:new zp,map:new(zA||qA),string:new zp}}var VA=HA;function WA(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var XA=WA,KA=XA;function YA(e,t){var r=e.__data__;return KA(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Xo=YA,ZA=Xo;function QA(e){var t=ZA(this,e).delete(e);return this.size-=t?1:0,t}var JA=QA,tO=Xo;function eO(e){return tO(this,e).get(e)}var rO=eO,nO=Xo;function iO(e){return nO(this,e).has(e)}var sO=iO,oO=Xo;function aO(e,t){var r=oO(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var lO=aO,uO=VA,fO=JA,cO=rO,hO=sO,dO=lO;function Mi(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Mi.prototype.clear=uO,Mi.prototype.delete=fO,Mi.prototype.get=cO,Mi.prototype.has=hO,Mi.prototype.set=dO;var Du=Mi,pO=Vo,vO=Va,gO=Du,mO=200;function yO(e,t){var r=this.__data__;if(r instanceof pO){var n=r.__data__;if(!vO||n.length<mO-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new gO(n)}return r.set(e,t),this.size=r.size,this}var _O=yO,bO=Vo,xO=uA,wO=cA,TO=dA,EO=vA,SO=_O;function ki(e){var t=this.__data__=new bO(e);this.size=t.size}ki.prototype.clear=xO,ki.prototype.delete=wO,ki.prototype.get=TO,ki.prototype.has=EO,ki.prototype.set=SO;var Hp=ki,AO="__lodash_hash_undefined__";function OO(e){return this.__data__.set(e,AO),this}var CO=OO;function RO(e){return this.__data__.has(e)}var IO=RO,PO=Du,NO=CO,MO=IO;function Ko(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new PO;++t<r;)this.add(e[t])}Ko.prototype.add=Ko.prototype.push=NO,Ko.prototype.has=MO;var kO=Ko;function LO(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var FO=LO;function BO(e,t){return e.has(t)}var DO=BO,UO=kO,$O=FO,GO=DO,jO=1,qO=2;function zO(e,t,r,n,i,o){var a=r&jO,u=e.length,f=t.length;if(u!=f&&!(a&&f>u))return!1;var h=o.get(e),d=o.get(t);if(h&&d)return h==t&&d==e;var p=-1,c=!0,v=r&qO?new UO:void 0;for(o.set(e,t),o.set(t,e);++p<u;){var y=e[p],_=t[p];if(n)var b=a?n(_,y,p,t,e,o):n(y,_,p,e,t,o);if(b!==void 0){if(b)continue;c=!1;break}if(v){if(!$O(t,function(m,w){if(!GO(v,w)&&(y===m||i(y,m,r,n,o)))return v.push(w)})){c=!1;break}}else if(!(y===_||i(y,_,r,n,o))){c=!1;break}}return o.delete(e),o.delete(t),c}var Vp=zO,HO=Mr,VO=HO.Uint8Array,WO=VO;function XO(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var KO=XO;function YO(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var ZO=YO,Wp=js,Xp=WO,QO=jp,JO=Vp,tC=KO,eC=ZO,rC=1,nC=2,iC="[object Boolean]",sC="[object Date]",oC="[object Error]",aC="[object Map]",lC="[object Number]",uC="[object RegExp]",fC="[object Set]",cC="[object String]",hC="[object Symbol]",dC="[object ArrayBuffer]",pC="[object DataView]",Kp=Wp?Wp.prototype:void 0,Uu=Kp?Kp.valueOf:void 0;function vC(e,t,r,n,i,o,a){switch(r){case pC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case dC:return!(e.byteLength!=t.byteLength||!o(new Xp(e),new Xp(t)));case iC:case sC:case lC:return QO(+e,+t);case oC:return e.name==t.name&&e.message==t.message;case uC:case cC:return e==t+"";case aC:var u=tC;case fC:var f=n&rC;if(u||(u=eC),e.size!=t.size&&!f)return!1;var h=a.get(e);if(h)return h==t;n|=nC,a.set(e,t);var d=JO(u(e),u(t),n,i,o,a);return a.delete(e),d;case hC:if(Uu)return Uu.call(e)==Uu.call(t)}return!1}var gC=vC;function mC(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var yC=mC,_C=yC,bC=kr;function xC(e,t,r){var n=t(e);return bC(e)?n:_C(n,r(e))}var wC=xC;function TC(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}var EC=TC;function SC(){return[]}var AC=SC,OC=EC,CC=AC,RC=Object.prototype,IC=RC.propertyIsEnumerable,Yp=Object.getOwnPropertySymbols,PC=Yp?function(e){return e==null?[]:(e=Object(e),OC(Yp(e),function(t){return IC.call(e,t)}))}:CC,NC=PC;function MC(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var kC=MC,LC=9007199254740991,FC=/^(?:0|[1-9]\d*)$/;function BC(e,t){var r=typeof e;return t=t??LC,!!t&&(r=="number"||r!="symbol"&&FC.test(e))&&e>-1&&e%1==0&&e<t}var Zp=BC,DC=kC,UC=Qa,$C=kr,GC=tl,jC=Zp,qC=el,zC=Object.prototype,HC=zC.hasOwnProperty;function VC(e,t){var r=$C(e),n=!r&&UC(e),i=!r&&!n&&GC(e),o=!r&&!n&&!i&&qC(e),a=r||n||i||o,u=a?DC(e.length,String):[],f=u.length;for(var h in e)(t||HC.call(e,h))&&!(a&&(h=="length"||i&&(h=="offset"||h=="parent")||o&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||jC(h,f)))&&u.push(h);return u}var WC=VC,XC=WC,KC=vc,YC=qs;function ZC(e){return YC(e)?XC(e):KC(e)}var $u=ZC,QC=wC,JC=NC,tR=$u;function eR(e){return QC(e,tR,JC)}var rR=eR,Qp=rR,nR=1,iR=Object.prototype,sR=iR.hasOwnProperty;function oR(e,t,r,n,i,o){var a=r&nR,u=Qp(e),f=u.length,h=Qp(t),d=h.length;if(f!=d&&!a)return!1;for(var p=f;p--;){var c=u[p];if(!(a?c in t:sR.call(t,c)))return!1}var v=o.get(e),y=o.get(t);if(v&&y)return v==t&&y==e;var _=!0;o.set(e,t),o.set(t,e);for(var b=a;++p<f;){c=u[p];var m=e[c],w=t[c];if(n)var T=a?n(w,m,c,t,e,o):n(m,w,c,e,t,o);if(!(T===void 0?m===w||i(m,w,r,n,o):T)){_=!1;break}b||(b=c=="constructor")}if(_&&!b){var x=e.constructor,E=t.constructor;x!=E&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof E=="function"&&E instanceof E)&&(_=!1)}return o.delete(e),o.delete(t),_}var aR=oR,Gu=Hp,lR=Vp,uR=gC,fR=aR,Jp=Ic,tv=kr,ev=tl,cR=el,hR=1,rv="[object Arguments]",nv="[object Array]",Yo="[object Object]",dR=Object.prototype,iv=dR.hasOwnProperty;function pR(e,t,r,n,i,o){var a=tv(e),u=tv(t),f=a?nv:Jp(e),h=u?nv:Jp(t);f=f==rv?Yo:f,h=h==rv?Yo:h;var d=f==Yo,p=h==Yo,c=f==h;if(c&&ev(e)){if(!ev(t))return!1;a=!0,d=!1}if(c&&!d)return o||(o=new Gu),a||cR(e)?lR(e,t,r,n,i,o):uR(e,t,f,r,n,i,o);if(!(r&hR)){var v=d&&iv.call(e,"__wrapped__"),y=p&&iv.call(t,"__wrapped__");if(v||y){var _=v?e.value():e,b=y?t.value():t;return o||(o=new Gu),i(_,b,r,n,o)}}return c?(o||(o=new Gu),fR(e,t,r,n,i,o)):!1}var vR=pR,gR=vR,sv=Qi;function ov(e,t,r,n,i){return e===t?!0:e==null||t==null||!sv(e)&&!sv(t)?e!==e&&t!==t:gR(e,t,r,n,ov,i)}var av=ov,mR=Hp,yR=av,_R=1,bR=2;function xR(e,t,r,n){var i=r.length,o=i,a=!n;if(e==null)return!o;for(e=Object(e);i--;){var u=r[i];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++i<o;){u=r[i];var f=u[0],h=e[f],d=u[1];if(a&&u[2]){if(h===void 0&&!(f in e))return!1}else{var p=new mR;if(n)var c=n(h,d,f,e,t,p);if(!(c===void 0?yR(d,h,_R|bR,n,p):c))return!1}}return!0}var wR=xR,TR=Zi;function ER(e){return e===e&&!TR(e)}var lv=ER,SR=lv,AR=$u;function OR(e){for(var t=AR(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,SR(i)]}return t}var CR=OR;function RR(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var uv=RR,IR=wR,PR=CR,NR=uv;function MR(e){var t=PR(e);return t.length==1&&t[0][2]?NR(t[0][0],t[0][1]):function(r){return r===e||IR(r,e,t)}}var kR=MR,LR=kr,FR=zo,BR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,DR=/^\w*$/;function UR(e,t){if(LR(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||FR(e)?!0:DR.test(e)||!BR.test(e)||t!=null&&e in Object(t)}var ju=UR,fv=Du,$R="Expected a function";function qu(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError($R);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(qu.Cache||fv),r}qu.Cache=fv;var GR=qu,jR=GR,qR=500;function zR(e){var t=jR(e,function(n){return r.size===qR&&r.clear(),n}),r=t.cache;return t}var HR=zR,VR=HR,WR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,XR=/\\(\\)?/g,KR=VR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(WR,function(r,n,i,o){t.push(i?o.replace(XR,"$1"):n||r)}),t}),YR=KR,cv=js,ZR=Gp,QR=kr,JR=zo,tI=1/0,hv=cv?cv.prototype:void 0,dv=hv?hv.toString:void 0;function pv(e){if(typeof e=="string")return e;if(QR(e))return ZR(e,pv)+"";if(JR(e))return dv?dv.call(e):"";var t=e+"";return t=="0"&&1/e==-tI?"-0":t}var eI=pv,rI=eI;function nI(e){return e==null?"":rI(e)}var iI=nI,sI=kr,oI=ju,aI=YR,lI=iI;function uI(e,t){return sI(e)?e:oI(e,t)?[e]:aI(lI(e))}var vv=uI,fI=zo,cI=1/0;function hI(e){if(typeof e=="string"||fI(e))return e;var t=e+"";return t=="0"&&1/e==-cI?"-0":t}var Zo=hI,dI=vv,pI=Zo;function vI(e,t){t=dI(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[pI(t[r++])];return r&&r==n?e:void 0}var gv=vI,gI=gv;function mI(e,t,r){var n=e==null?void 0:gI(e,t);return n===void 0?r:n}var yI=mI;function _I(e,t){return e!=null&&t in Object(e)}var bI=_I,xI=vv,wI=Qa,TI=kr,EI=Zp,SI=Ja,AI=Zo;function OI(e,t,r){t=xI(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=AI(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&SI(i)&&EI(a,i)&&(TI(e)||wI(e)))}var CI=OI,RI=bI,II=CI;function PI(e,t){return e!=null&&II(e,t,RI)}var NI=PI,MI=av,kI=yI,LI=NI,FI=ju,BI=lv,DI=uv,UI=Zo,$I=1,GI=2;function jI(e,t){return FI(e)&&BI(t)?DI(UI(e),t):function(r){var n=kI(r,e);return n===void 0&&n===t?LI(r,e):MI(t,n,$I|GI)}}var qI=jI;function zI(e){return e}var HI=zI;function VI(e){return function(t){return t==null?void 0:t[e]}}var WI=VI,XI=gv;function KI(e){return function(t){return XI(t,e)}}var YI=KI,ZI=WI,QI=YI,JI=ju,tP=Zo;function eP(e){return JI(e)?ZI(tP(e)):QI(e)}var rP=eP,nP=kR,iP=qI,sP=HI,oP=kr,aP=rP;function lP(e){return typeof e=="function"?e:e==null?sP:typeof e=="object"?oP(e)?iP(e[0],e[1]):nP(e):aP(e)}var uP=lP;function fP(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),u=a.length;u--;){var f=a[e?u:++i];if(r(o[f],f,o)===!1)break}return t}}var cP=fP,hP=cP,dP=hP(),pP=dP,vP=pP,gP=$u;function mP(e,t){return e&&vP(e,t,gP)}var yP=mP,_P=qs;function bP(e,t){return function(r,n){if(r==null)return r;if(!_P(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Object(r);(t?o--:++o<i)&&n(a[o],o,a)!==!1;);return r}}var xP=bP,wP=yP,TP=xP,EP=TP(wP),SP=EP,AP=SP,OP=qs;function CP(e,t){var r=-1,n=OP(e)?Array(e.length):[];return AP(e,function(i,o,a){n[++r]=t(i,o,a)}),n}var RP=CP,IP=Gp,PP=uP,NP=RP,MP=kr;function kP(e,t){var r=MP(e)?IP:NP;return r(e,PP(t))}var LP=kP;const FP=En(LP);var zn={},mv={},Yr={};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.loop=Yr.conditional=Yr.parse=void 0;var BP=function e(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:n;if(Array.isArray(r))r.forEach(function(a){return e(t,a,n,i)});else if(typeof r=="function")r(t,n,i,e);else{var o=Object.keys(r)[0];Array.isArray(r[o])?(i[o]={},e(t,r[o],n,i[o])):i[o]=r[o](t,n,i,e)}return n};Yr.parse=BP;var DP=function(t,r){return function(n,i,o,a){r(n,i,o)&&a(n,t,i,o)}};Yr.conditional=DP;var UP=function(t,r){return function(n,i,o,a){for(var u=[],f=n.pos;r(n,i,o);){var h={};if(a(n,t,i,h),n.pos===f)break;f=n.pos,u.push(h)}return u}};Yr.loop=UP;var be={};Object.defineProperty(be,"__esModule",{value:!0}),be.readBits=be.readArray=be.readUnsigned=be.readString=be.peekBytes=be.readBytes=be.peekByte=be.readByte=be.buildStream=void 0;var $P=function(t){return{data:t,pos:0}};be.buildStream=$P;var yv=function(){return function(t){return t.data[t.pos++]}};be.readByte=yv;var GP=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(r){return r.data[r.pos+t]}};be.peekByte=GP;var Qo=function(t){return function(r){return r.data.subarray(r.pos,r.pos+=t)}};be.readBytes=Qo;var jP=function(t){return function(r){return r.data.subarray(r.pos,r.pos+t)}};be.peekBytes=jP;var qP=function(t){return function(r){return Array.from(Qo(t)(r)).map(function(n){return String.fromCharCode(n)}).join("")}};be.readString=qP;var zP=function(t){return function(r){var n=Qo(2)(r);return t?(n[1]<<8)+n[0]:(n[0]<<8)+n[1]}};be.readUnsigned=zP;var HP=function(t,r){return function(n,i,o){for(var a=typeof r=="function"?r(n,i,o):r,u=Qo(t),f=new Array(a),h=0;h<a;h++)f[h]=u(n);return f}};be.readArray=HP;var VP=function(t,r,n){for(var i=0,o=0;o<n;o++)i+=t[r+o]&&Math.pow(2,n-o-1);return i},WP=function(t){return function(r){for(var n=yv()(r),i=new Array(8),o=0;o<8;o++)i[7-o]=!!(n&1<<o);return Object.keys(t).reduce(function(a,u){var f=t[u];return f.length?a[u]=VP(i,f.index,f.length):a[u]=i[f.index],a},{})}};be.readBits=WP,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Yr,r=be,n={blocks:function(c){for(var v=0,y=[],_=c.data.length,b=0,m=(0,r.readByte)()(c);m!==v&&m;m=(0,r.readByte)()(c)){if(c.pos+m>=_){var w=_-c.pos;y.push((0,r.readBytes)(w)(c)),b+=w;break}y.push((0,r.readBytes)(m)(c)),b+=m}for(var T=new Uint8Array(b),x=0,E=0;E<y.length;E++)T.set(y[E],x),x+=y[E].length;return T}},i=(0,t.conditional)({gce:[{codes:(0,r.readBytes)(2)},{byteSize:(0,r.readByte)()},{extras:(0,r.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,r.readUnsigned)(!0)},{transparentColorIndex:(0,r.readByte)()},{terminator:(0,r.readByte)()}]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===249}),o=(0,t.conditional)({image:[{code:(0,r.readByte)()},{descriptor:[{left:(0,r.readUnsigned)(!0)},{top:(0,r.readUnsigned)(!0)},{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{lct:(0,r.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,t.conditional)({lct:(0,r.readArray)(3,function(p,c,v){return Math.pow(2,v.descriptor.lct.size+1)})},function(p,c,v){return v.descriptor.lct.exists}),{data:[{minCodeSize:(0,r.readByte)()},n]}]},function(p){return(0,r.peekByte)()(p)===44}),a=(0,t.conditional)({text:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{preData:function(c,v,y){return(0,r.readBytes)(y.text.blockSize)(c)}},n]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===1}),u=(0,t.conditional)({application:[{codes:(0,r.readBytes)(2)},{blockSize:(0,r.readByte)()},{id:function(c,v,y){return(0,r.readString)(y.blockSize)(c)}},n]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===255}),f=(0,t.conditional)({comment:[{codes:(0,r.readBytes)(2)},n]},function(p){var c=(0,r.peekBytes)(2)(p);return c[0]===33&&c[1]===254}),h=[{header:[{signature:(0,r.readString)(3)},{version:(0,r.readString)(3)}]},{lsd:[{width:(0,r.readUnsigned)(!0)},{height:(0,r.readUnsigned)(!0)},{gct:(0,r.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,r.readByte)()},{pixelAspectRatio:(0,r.readByte)()}]},(0,t.conditional)({gct:(0,r.readArray)(3,function(p,c){return Math.pow(2,c.lsd.gct.size+1)})},function(p,c){return c.lsd.gct.exists}),{frames:(0,t.loop)([i,u,f,o,a],function(p){var c=(0,r.peekByte)()(p);return c===33||c===44})}],d=h;e.default=d}(mv);var Jo={};Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.deinterlace=void 0;var XP=function(t,r){for(var n=new Array(t.length),i=t.length/r,o=function(c,v){var y=t.slice(v*r,(v+1)*r);n.splice.apply(n,[c*r,r].concat(y))},a=[0,4,2,1],u=[8,8,4,2],f=0,h=0;h<4;h++)for(var d=a[h];d<i;d+=u[h])o(d,f),f++;return n};Jo.deinterlace=XP;var ta={};Object.defineProperty(ta,"__esModule",{value:!0}),ta.lzw=void 0;var KP=function(t,r,n){var i=4096,o=-1,a=n,u,f,h,d,p,c,v,I,y,_,E,b,O,A,R,L,m=new Array(n),w=new Array(i),T=new Array(i),x=new Array(i+1);for(b=t,f=1<<b,p=f+1,u=f+2,v=o,d=b+1,h=(1<<d)-1,y=0;y<f;y++)w[y]=0,T[y]=y;var E,I,O,A,L,R;for(E=I=O=A=L=R=0,_=0;_<a;){if(A===0){if(I<d){E+=r[R]<<I,I+=8,R++;continue}if(y=E&h,E>>=d,I-=d,y>u||y==p)break;if(y==f){d=b+1,h=(1<<d)-1,u=f+2,v=o;continue}if(v==o){x[A++]=T[y],v=y,O=y;continue}for(c=y,y==u&&(x[A++]=O,y=v);y>f;)x[A++]=T[y],y=w[y];O=T[y]&255,x[A++]=O,u<i&&(w[u]=v,T[u]=O,u++,!(u&h)&&u<i&&(d++,h+=u)),v=c}A--,m[L++]=x[A],_++}for(_=L;_<a;_++)m[_]=0;return m};ta.lzw=KP,Object.defineProperty(zn,"__esModule",{value:!0}),zn.decompressFrames=zn.decompressFrame=zn.parseGIF=void 0;var YP=eN(mv),ZP=Yr,QP=be,JP=Jo,tN=ta;function eN(e){return e&&e.__esModule?e:{default:e}}var rN=function(t){var r=new Uint8Array(t);return(0,ZP.parse)((0,QP.buildStream)(r),YP.default)};zn.parseGIF=rN;var nN=function(t){for(var r=t.pixels.length,n=new Uint8ClampedArray(r*4),i=0;i<r;i++){var o=i*4,a=t.pixels[i],u=t.colorTable[a]||[0,0,0];n[o]=u[0],n[o+1]=u[1],n[o+2]=u[2],n[o+3]=a!==t.transparentIndex?255:0}return n},_v=function(t,r,n){if(!t.image){console.warn("gif frame does not have associated image.");return}var i=t.image,o=i.descriptor.width*i.descriptor.height,a=(0,tN.lzw)(i.data.minCodeSize,i.data.blocks,o);i.descriptor.lct.interlaced&&(a=(0,JP.deinterlace)(a,i.descriptor.width));var u={pixels:a,dims:{top:t.image.descriptor.top,left:t.image.descriptor.left,width:t.image.descriptor.width,height:t.image.descriptor.height}};return i.descriptor.lct&&i.descriptor.lct.exists?u.colorTable=i.lct:u.colorTable=r,t.gce&&(u.delay=(t.gce.delay||10)*10,u.disposalType=t.gce.extras.disposal,t.gce.extras.transparentColorGiven&&(u.transparentIndex=t.gce.transparentColorIndex)),n&&(u.patch=nN(u)),u};zn.decompressFrame=_v;var iN=function(t,r){return t.frames.filter(function(n){return n.image}).map(function(n){return _v(n,t.gct,r)})};zn.decompressFrames=iN;const bv=(e,t={})=>{typeof t=="function"&&(t=t(e));const r=t.loaded&&e.loaded!==t.loaded,{playing:n,...i}=t,o={...e,...i};return r&&Object.assign(o,{playing:o.autoPlay&&o.loaded}),(t.delays!=null||t.frames!=null)&&Object.assign(o,{length:o.frames.length}),(t.index!=null||t.frames!=null)&&Object.assign(o,{index:o.length===0?0:(o.length+o.index)%o.length}),t.playing!=null&&Object.assign(o,o.loaded?{playing:n}:{autoPlay:n}),o},sN=e=>bv({autoPlay:!0,playing:!1,frames:[],delays:[],index:0,length:0,loaded:!1},e),oN=e=>mt.useReducer(bv,e,sN);var aN='function e(e){var r={exports:{}};return e(r,r.exports),r.exports}var r=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.loop=r.conditional=r.parse=void 0;r.parse=function e(r,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;if(Array.isArray(t))t.forEach((function(t){return e(r,t,n,a)}));else if("function"==typeof t)t(r,n,a,e);else{var i=Object.keys(t)[0];Array.isArray(t[i])?(a[i]={},e(r,t[i],n,a[i])):a[i]=t[i](r,n,a,e)}return n};r.conditional=function(e,r){return function(t,n,a,i){r(t,n,a)&&i(t,e,n,a)}};r.loop=function(e,r){return function(t,n,a,i){for(var o=[];r(t,n,a);){var s={};i(t,e,n,s),o.push(s)}return o}}})),t=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.readBits=r.readArray=r.readUnsigned=r.readString=r.peekBytes=r.readBytes=r.peekByte=r.readByte=r.buildStream=void 0;r.buildStream=function(e){return{data:e,pos:0}};var t=function(){return function(e){return e.data[e.pos++]}};r.readByte=t;r.peekByte=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return function(r){return r.data[r.pos+e]}};var n=function(e){return function(r){return r.data.subarray(r.pos,r.pos+=e)}};r.readBytes=n;r.peekBytes=function(e){return function(r){return r.data.subarray(r.pos,r.pos+e)}};r.readString=function(e){return function(r){return Array.from(n(e)(r)).map((function(e){return String.fromCharCode(e)})).join("")}};r.readUnsigned=function(e){return function(r){var t=n(2)(r);return e?(t[1]<<8)+t[0]:(t[0]<<8)+t[1]}};r.readArray=function(e,r){return function(t,a,i){for(var o="function"==typeof r?r(t,a,i):r,s=n(e),d=new Array(o),c=0;c<o;c++)d[c]=s(t);return d}};r.readBits=function(e){return function(r){for(var t=function(e){return e.data[e.pos++]}(r),n=new Array(8),a=0;a<8;a++)n[7-a]=!!(t&1<<a);return Object.keys(e).reduce((function(r,t){var a=e[t];return a.length?r[t]=function(e,r,t){for(var n=0,a=0;a<t;a++)n+=e[r+a]&&Math.pow(2,t-a-1);return n}(n,a.index,a.length):r[t]=n[a.index],r}),{})}}})),n=e((function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={blocks:function(e){for(var r=[],n=e.data.length,a=0,i=(0,t.readByte)()(e);0!==i;i=(0,t.readByte)()(e)){if(e.pos+i>=n){var o=n-e.pos;r.push((0,t.readBytes)(o)(e)),a+=o;break}r.push((0,t.readBytes)(i)(e)),a+=i}for(var s=new Uint8Array(a),d=0,c=0;c<r.length;c++)s.set(r[c],d),d+=r[c].length;return s}},i=(0,r.conditional)({gce:[{codes:(0,t.readBytes)(2)},{byteSize:(0,t.readByte)()},{extras:(0,t.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,t.readUnsigned)(!0)},{transparentColorIndex:(0,t.readByte)()},{terminator:(0,t.readByte)()}]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&249===r[1]})),o=(0,r.conditional)({image:[{code:(0,t.readByte)()},{descriptor:[{left:(0,t.readUnsigned)(!0)},{top:(0,t.readUnsigned)(!0)},{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{lct:(0,t.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,r.conditional)({lct:(0,t.readArray)(3,(function(e,r,t){return Math.pow(2,t.descriptor.lct.size+1)}))},(function(e,r,t){return t.descriptor.lct.exists})),{data:[{minCodeSize:(0,t.readByte)()},a]}]},(function(e){return 44===(0,t.peekByte)()(e)})),s=(0,r.conditional)({text:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{preData:function(e,r,n){return(0,t.readBytes)(n.text.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&1===r[1]})),d=(0,r.conditional)({application:[{codes:(0,t.readBytes)(2)},{blockSize:(0,t.readByte)()},{id:function(e,r,n){return(0,t.readString)(n.blockSize)(e)}},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&255===r[1]})),c=(0,r.conditional)({comment:[{codes:(0,t.readBytes)(2)},a]},(function(e){var r=(0,t.peekBytes)(2)(e);return 33===r[0]&&254===r[1]})),u=[{header:[{signature:(0,t.readString)(3)},{version:(0,t.readString)(3)}]},{lsd:[{width:(0,t.readUnsigned)(!0)},{height:(0,t.readUnsigned)(!0)},{gct:(0,t.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,t.readByte)()},{pixelAspectRatio:(0,t.readByte)()}]},(0,r.conditional)({gct:(0,t.readArray)(3,(function(e,r){return Math.pow(2,r.lsd.gct.size+1)}))},(function(e,r){return r.lsd.gct.exists})),{frames:(0,r.loop)([i,d,c,o,s],(function(e){var r=(0,t.peekByte)()(e);return 33===r||44===r}))}];n.default=u})),a=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.deinterlace=void 0;r.deinterlace=function(e,r){for(var t=new Array(e.length),n=e.length/r,a=function(n,a){var i=e.slice(a*r,(a+1)*r);t.splice.apply(t,[n*r,r].concat(i))},i=[0,4,2,1],o=[8,8,4,2],s=0,d=0;d<4;d++)for(var c=i[d];c<n;c+=o[d])a(c,s),s++;return t}})),i=e((function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.lzw=void 0;r.lzw=function(e,r,t){var n,a,i,o,s,d,c,u,l,f,p,g,y,h,v,m,x=4096,B=t,w=new Array(t),b=new Array(x),k=new Array(x),A=new Array(4097);for(s=(a=1<<(f=e))+1,n=a+2,c=-1,i=(1<<(o=f+1))-1,u=0;u<a;u++)b[u]=0,k[u]=u;for(p=g=y=h=v=m=0,l=0;l<B;){if(0===h){if(g<o){p+=r[m]<<g,g+=8,m++;continue}if(u=p&i,p>>=o,g-=o,u>n||u==s)break;if(u==a){i=(1<<(o=f+1))-1,n=a+2,c=-1;continue}if(-1==c){A[h++]=k[u],c=u,y=u;continue}for(d=u,u==n&&(A[h++]=y,u=c);u>a;)A[h++]=k[u],u=b[u];y=255&k[u],A[h++]=y,n<x&&(b[n]=c,k[n]=y,0==(++n&i)&&n<x&&(o++,i+=n)),c=d}h--,w[v++]=A[h],l++}for(l=v;l<B;l++)w[l]=0;return w}})),o=e((function(e,o){Object.defineProperty(o,"__esModule",{value:!0}),o.decompressFrames=o.decompressFrame=o.parseGIF=void 0;var s,d=(s=n)&&s.__esModule?s:{default:s};o.parseGIF=function(e){var n=new Uint8Array(e);return(0,r.parse)((0,t.buildStream)(n),d.default)};var c=function(e,r,t){if(e.image){var n=e.image,o=n.descriptor.width*n.descriptor.height,s=(0,i.lzw)(n.data.minCodeSize,n.data.blocks,o);n.descriptor.lct.interlaced&&(s=(0,a.deinterlace)(s,n.descriptor.width));var d={pixels:s,dims:{top:e.image.descriptor.top,left:e.image.descriptor.left,width:e.image.descriptor.width,height:e.image.descriptor.height}};return n.descriptor.lct&&n.descriptor.lct.exists?d.colorTable=n.lct:d.colorTable=r,e.gce&&(d.delay=10*(e.gce.delay||10),d.disposalType=e.gce.extras.disposal,e.gce.extras.transparentColorGiven&&(d.transparentIndex=e.gce.transparentColorIndex)),t&&(d.patch=function(e){for(var r=e.pixels.length,t=new Uint8ClampedArray(4*r),n=0;n<r;n++){var a=4*n,i=e.pixels[n],o=e.colorTable[i]||[0,0,0];t[a]=o[0],t[a+1]=o[1],t[a+2]=o[2],t[a+3]=i!==e.transparentIndex?255:0}return t}(d)),d}console.warn("gif frame does not have associated image.")};o.decompressFrame=c;o.decompressFrames=function(e,r){return e.frames.filter((function(e){return e.image})).map((function(t){return c(t,e.gct,r)}))}}));const s=(e,r,t)=>{const{width:n,height:a,top:i,left:o}=r.dims,s=i*t.width+o;for(let i=0;i<a;i++)for(let a=0;a<n;a++){const o=i*n+a,d=r.pixels[o];if(d!==r.transparentIndex){const n=s+i*t.width+a,o=r.colorTable[d]||[0,0,0];e[4*n]=o[0],e[4*n+1]=o[1],e[4*n+2]=o[2],e[4*n+3]=255}}return e},d=new Map;self.addEventListener("message",(e=>{const{type:r,src:t}=e.data||e;switch(r){case"parse":if(!d.has(t)){const e=new AbortController,r={signal:e.signal};d.set(t,e),((e,{signal:r})=>fetch(e,{signal:r}).then((e=>{if(!e.headers.get("Content-Type").includes("image/gif"))throw Error(`Wrong content type: "${e.headers.get("Content-Type")}"`);return e.arrayBuffer()})).then((e=>o.parseGIF(e))).then((e=>((e=>{let r=null;for(const t of e.frames)r=t.gce?t.gce:r,"image"in t&&!("gce"in t)&&(t.gce=r)})(e),e))).then((e=>Promise.all([o.decompressFrames(e,!1),{width:e.lsd.width,height:e.lsd.height}]))).then((([e,r])=>{const t=[],n=r.width*r.height*4;for(let a=0;a<e.length;++a){const i=e[a],o=0===a||2===e[a-1].disposalType?new Uint8ClampedArray(n):t[a-1].slice();t.push(s(o,i,r))}return{...r,loaded:!0,delays:e.map((e=>e.delay)),frames:t}})))(t,r).then((e=>{self.postMessage(Object.assign(e,{src:t}),e.frames.map((e=>e.buffer)))})).catch((e=>{self.postMessage({src:t,error:e,loaded:!0})})).finally((()=>{d.delete(t)}))}break;case"cancel":if(d.has(t)){d.get(t).abort(),d.delete(t)}}}));\n';function lN(e){const t=new Blob([aN],{type:"application/javascript"}),r=URL.createObjectURL(t),n=new Worker(r,e);return URL.revokeObjectURL(r),n}const uN=e=>({...e,frames:e.frames.map(t=>{const r=new ImageData(e.width,e.height);return r.data.set(new Uint8ClampedArray(t)),r})}),fN=(e,t)=>{const r={};return()=>(r.instance||(r.instance=e()),mt.useLayoutEffect(()=>(r.timeout?(clearTimeout(r.timeout),delete r.timeout):r.usageCount=(r.usageCount||0)+1,()=>{r.timeout=setTimeout(()=>{r.usageCount=r.usageCount-1,r.usageCount===0&&(t&&t(r.instance),delete r.instance,delete r.timeout)})}),[r,t]),r.instance)},cN=e=>{const t=mt.useRef(e);return mt.useEffect(()=>{t.current=e},[e]),t},hN=e=>{const t=cN(e);return mt.useCallback(r=>t.current&&t.current(r),[])},dN=fN(()=>new lN,e=>e.terminate()),pN=(e,t)=>{const r=hN(t),n=dN();mt.useEffect(()=>{if(typeof e=="string"){const i=o=>{const a=o.data||o;if(a.src===e){const u=a.error?a:uN(a);r(u)}};return n.addEventListener("message",i),n.postMessage({src:e,type:"parse"}),()=>{n.postMessage({src:e,type:"cancel"}),n.removeEventListener("message",i)}}},[n,e])},vN=({isPlaying:e,forwardRef:t,...r})=>{const n=Et.useRef(null);return Et.useImperativeHandle(t,()=>n.current,[n]),Et.useEffect(()=>{if(n.current===null)return;const i=n.current;i[e?"gotoAndPlay":"gotoAndStop"](i.currentFrame)},[e]),Vt.jsx(le.AnimatedSprite,{ref:n,...r,isPlaying:e})},xv=Et.memo(vN);var ea={exports:{}};/**
1935
1935
  * @license
1936
1936
  * Lodash <https://lodash.com/>
1937
1937
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
@@ -1957,7 +1957,7 @@ __p += '`),zt&&(ht+=`' +
1957
1957
  function print() { __p += __j.call(arguments, '') }
1958
1958
  `:`;
1959
1959
  `)+ht+`return __p
1960
- }`;var Ft=ty(function(){return Yt(U,wt+"return "+ht).apply(r,H)});if(Ft.source=ht,Qf(Ft))throw Ft;return Ft}function f4(s){return Jt(s).toLowerCase()}function c4(s){return Jt(s).toUpperCase()}function h4(s,l,g){if(s=Jt(s),s&&(g||l===r))return ug(s);if(!s||!(l=nr(l)))return s;var S=Rr(s),N=Rr(l),U=fg(S,N),H=cg(S,N)+1;return wn(S,U,H).join("")}function d4(s,l,g){if(s=Jt(s),s&&(g||l===r))return s.slice(0,dg(s)+1);if(!s||!(l=nr(l)))return s;var S=Rr(s),N=cg(S,Rr(l))+1;return wn(S,0,N).join("")}function p4(s,l,g){if(s=Jt(s),s&&(g||l===r))return s.replace(Zu,"");if(!s||!(l=nr(l)))return s;var S=Rr(s),N=fg(S,Rr(l));return wn(S,N).join("")}function v4(s,l){var g=R,S=C;if(me(l)){var N="separator"in l?l.separator:N;g="length"in l?Lt(l.length):g,S="omission"in l?nr(l.omission):S}s=Jt(s);var U=s.length;if(Bi(s)){var H=Rr(s);U=H.length}if(g>=U)return s;var X=g-Di(S);if(X<1)return S;var tt=H?wn(H,0,X).join(""):s.slice(0,X);if(N===r)return tt+S;if(H&&(X+=tt.length-X),Jf(N)){if(s.slice(X).search(N)){var ft,ct=tt;for(N.global||(N=vf(N.source,Jt(Pv.exec(N))+"g")),N.lastIndex=0;ft=N.exec(ct);)var ht=ft.index;tt=tt.slice(0,ht===r?X:ht)}}else if(s.indexOf(nr(N),X)!=X){var yt=tt.lastIndexOf(N);yt>-1&&(tt=tt.slice(0,yt))}return tt+S}function g4(s){return s=Jt(s),s&&ON.test(s)?s.replace(Cv,HM):s}var m4=Hi(function(s,l,g){return s+(g?" ":"")+l.toUpperCase()}),rc=em("toUpperCase");function Jm(s,l,g){return s=Jt(s),l=g?r:l,l===r?$M(s)?XM(s):PM(s):s.match(l)||[]}var ty=Bt(function(s,l){try{return er(s,r,l)}catch(g){return Qf(g)?g:new Nt(g)}}),y4=en(function(s,l){return cr(l,function(g){g=qr(g),Jr(s,g,Yf(s[g],s))}),s});function _4(s){var l=s==null?0:s.length,g=Ot();return s=l?de(s,function(S){if(typeof S[1]!="function")throw new hr(a);return[g(S[0]),S[1]]}):[],Bt(function(S){for(var N=-1;++N<l;){var U=s[N];if(er(U[0],this,S))return er(U[1],this,S)}})}function b4(s){return H3(pr(s,p))}function nc(s){return function(){return s}}function x4(s,l){return s==null||s!==s?l:s}var w4=nm(),T4=nm(!0);function Ke(s){return s}function ic(s){return Mg(typeof s=="function"?s:pr(s,p))}function E4(s){return Lg(pr(s,p))}function S4(s,l){return Fg(s,pr(l,p))}var A4=Bt(function(s,l){return function(g){return ks(g,s,l)}}),O4=Bt(function(s,l){return function(g){return ks(s,g,l)}});function sc(s,l,g){var S=Pe(l),N=Ea(l,S);g==null&&!(me(l)&&(N.length||!S.length))&&(g=l,l=s,s=this,N=Ea(l,Pe(l)));var U=!(me(g)&&"chain"in g)||!!g.chain,H=nn(s);return cr(N,function(X){var tt=l[X];s[X]=tt,H&&(s.prototype[X]=function(){var ft=this.__chain__;if(U||ft){var ct=s(this.__wrapped__),ht=ct.__actions__=Ve(this.__actions__);return ht.push({func:tt,args:arguments,thisArg:s}),ct.__chain__=ft,ct}return tt.apply(s,gn([this.value()],arguments))})}),s}function C4(){return Me._===this&&(Me._=t3),this}function oc(){}function R4(s){return s=Lt(s),Bt(function(l){return Bg(l,s)})}var I4=Bf(de),P4=Bf(ig),N4=Bf(lf);function ey(s){return zf(s)?uf(qr(s)):lk(s)}function M4(s){return function(l){return s==null?r:Yn(s,l)}}var k4=sm(),L4=sm(!0);function ac(){return[]}function lc(){return!1}function F4(){return{}}function B4(){return""}function D4(){return!0}function U4(s,l){if(s=Lt(s),s<1||s>nt)return[];var g=k,S=De(s,k);l=Ot(l),s-=k;for(var N=hf(S,l);++g<s;)l(g);return N}function $4(s){return kt(s)?de(s,qr):ir(s)?[s]:Ve(xm(Jt(s)))}function G4(s){var l=++QM;return Jt(s)+l}var j4=Ia(function(s,l){return s+l},0),q4=Df("ceil"),z4=Ia(function(s,l){return s/l},1),H4=Df("floor");function V4(s){return s&&s.length?Ta(s,Ke,Tf):r}function W4(s,l){return s&&s.length?Ta(s,Ot(l,2),Tf):r}function X4(s){return ag(s,Ke)}function K4(s,l){return ag(s,Ot(l,2))}function Y4(s){return s&&s.length?Ta(s,Ke,Of):r}function Z4(s,l){return s&&s.length?Ta(s,Ot(l,2),Of):r}var Q4=Ia(function(s,l){return s*l},1),J4=Df("round"),tB=Ia(function(s,l){return s-l},0);function eB(s){return s&&s.length?cf(s,Ke):0}function rB(s,l){return s&&s.length?cf(s,Ot(l,2)):0}return B.after=EL,B.ary=Nm,B.assign=cF,B.assignIn=Vm,B.assignInWith=qa,B.assignWith=hF,B.at=dF,B.before=Mm,B.bind=Yf,B.bindAll=y4,B.bindKey=km,B.castArray=FL,B.chain=Rm,B.chunk=Hk,B.compact=Vk,B.concat=Wk,B.cond=_4,B.conforms=b4,B.constant=nc,B.countBy=eL,B.create=pF,B.curry=Lm,B.curryRight=Fm,B.debounce=Bm,B.defaults=vF,B.defaultsDeep=gF,B.defer=SL,B.delay=AL,B.difference=Xk,B.differenceBy=Kk,B.differenceWith=Yk,B.drop=Zk,B.dropRight=Qk,B.dropRightWhile=Jk,B.dropWhile=t5,B.fill=e5,B.filter=nL,B.flatMap=oL,B.flatMapDeep=aL,B.flatMapDepth=lL,B.flatten=Sm,B.flattenDeep=r5,B.flattenDepth=n5,B.flip=OL,B.flow=w4,B.flowRight=T4,B.fromPairs=i5,B.functions=TF,B.functionsIn=EF,B.groupBy=uL,B.initial=o5,B.intersection=a5,B.intersectionBy=l5,B.intersectionWith=u5,B.invert=AF,B.invertBy=OF,B.invokeMap=cL,B.iteratee=ic,B.keyBy=hL,B.keys=Pe,B.keysIn=Xe,B.map=Ba,B.mapKeys=RF,B.mapValues=IF,B.matches=E4,B.matchesProperty=S4,B.memoize=Ua,B.merge=PF,B.mergeWith=Wm,B.method=A4,B.methodOf=O4,B.mixin=sc,B.negate=$a,B.nthArg=R4,B.omit=NF,B.omitBy=MF,B.once=CL,B.orderBy=dL,B.over=I4,B.overArgs=RL,B.overEvery=P4,B.overSome=N4,B.partial=Zf,B.partialRight=Dm,B.partition=pL,B.pick=kF,B.pickBy=Xm,B.property=ey,B.propertyOf=M4,B.pull=d5,B.pullAll=Om,B.pullAllBy=p5,B.pullAllWith=v5,B.pullAt=g5,B.range=k4,B.rangeRight=L4,B.rearg=IL,B.reject=mL,B.remove=m5,B.rest=PL,B.reverse=Xf,B.sampleSize=_L,B.set=FF,B.setWith=BF,B.shuffle=bL,B.slice=y5,B.sortBy=TL,B.sortedUniq=S5,B.sortedUniqBy=A5,B.split=o4,B.spread=NL,B.tail=O5,B.take=C5,B.takeRight=R5,B.takeRightWhile=I5,B.takeWhile=P5,B.tap=V5,B.throttle=ML,B.thru=Fa,B.toArray=qm,B.toPairs=Km,B.toPairsIn=Ym,B.toPath=$4,B.toPlainObject=Hm,B.transform=DF,B.unary=kL,B.union=N5,B.unionBy=M5,B.unionWith=k5,B.uniq=L5,B.uniqBy=F5,B.uniqWith=B5,B.unset=UF,B.unzip=Kf,B.unzipWith=Cm,B.update=$F,B.updateWith=GF,B.values=Xi,B.valuesIn=jF,B.without=D5,B.words=Jm,B.wrap=LL,B.xor=U5,B.xorBy=$5,B.xorWith=G5,B.zip=j5,B.zipObject=q5,B.zipObjectDeep=z5,B.zipWith=H5,B.entries=Km,B.entriesIn=Ym,B.extend=Vm,B.extendWith=qa,sc(B,B),B.add=j4,B.attempt=ty,B.camelCase=VF,B.capitalize=Zm,B.ceil=q4,B.clamp=qF,B.clone=BL,B.cloneDeep=UL,B.cloneDeepWith=$L,B.cloneWith=DL,B.conformsTo=GL,B.deburr=Qm,B.defaultTo=x4,B.divide=z4,B.endsWith=WF,B.eq=Pr,B.escape=XF,B.escapeRegExp=KF,B.every=rL,B.find=iL,B.findIndex=Tm,B.findKey=mF,B.findLast=sL,B.findLastIndex=Em,B.findLastKey=yF,B.floor=H4,B.forEach=Im,B.forEachRight=Pm,B.forIn=_F,B.forInRight=bF,B.forOwn=xF,B.forOwnRight=wF,B.get=tc,B.gt=jL,B.gte=qL,B.has=SF,B.hasIn=ec,B.head=Am,B.identity=Ke,B.includes=fL,B.indexOf=s5,B.inRange=zF,B.invoke=CF,B.isArguments=Jn,B.isArray=kt,B.isArrayBuffer=zL,B.isArrayLike=We,B.isArrayLikeObject=xe,B.isBoolean=HL,B.isBuffer=Tn,B.isDate=VL,B.isElement=WL,B.isEmpty=XL,B.isEqual=KL,B.isEqualWith=YL,B.isError=Qf,B.isFinite=ZL,B.isFunction=nn,B.isInteger=Um,B.isLength=Ga,B.isMap=$m,B.isMatch=QL,B.isMatchWith=JL,B.isNaN=tF,B.isNative=eF,B.isNil=nF,B.isNull=rF,B.isNumber=Gm,B.isObject=me,B.isObjectLike=ye,B.isPlainObject=$s,B.isRegExp=Jf,B.isSafeInteger=iF,B.isSet=jm,B.isString=ja,B.isSymbol=ir,B.isTypedArray=Wi,B.isUndefined=sF,B.isWeakMap=oF,B.isWeakSet=aF,B.join=f5,B.kebabCase=YF,B.last=gr,B.lastIndexOf=c5,B.lowerCase=ZF,B.lowerFirst=QF,B.lt=lF,B.lte=uF,B.max=V4,B.maxBy=W4,B.mean=X4,B.meanBy=K4,B.min=Y4,B.minBy=Z4,B.stubArray=ac,B.stubFalse=lc,B.stubObject=F4,B.stubString=B4,B.stubTrue=D4,B.multiply=Q4,B.nth=h5,B.noConflict=C4,B.noop=oc,B.now=Da,B.pad=JF,B.padEnd=t4,B.padStart=e4,B.parseInt=r4,B.random=HF,B.reduce=vL,B.reduceRight=gL,B.repeat=n4,B.replace=i4,B.result=LF,B.round=J4,B.runInContext=J,B.sample=yL,B.size=xL,B.snakeCase=s4,B.some=wL,B.sortedIndex=_5,B.sortedIndexBy=b5,B.sortedIndexOf=x5,B.sortedLastIndex=w5,B.sortedLastIndexBy=T5,B.sortedLastIndexOf=E5,B.startCase=a4,B.startsWith=l4,B.subtract=tB,B.sum=eB,B.sumBy=rB,B.template=u4,B.times=U4,B.toFinite=sn,B.toInteger=Lt,B.toLength=zm,B.toLower=f4,B.toNumber=mr,B.toSafeInteger=fF,B.toString=Jt,B.toUpper=c4,B.trim=h4,B.trimEnd=d4,B.trimStart=p4,B.truncate=v4,B.unescape=g4,B.uniqueId=G4,B.upperCase=m4,B.upperFirst=rc,B.each=Im,B.eachRight=Pm,B.first=Am,sc(B,function(){var s={};return Gr(B,function(l,g){ee.call(B.prototype,g)||(s[g]=l)}),s}(),{chain:!1}),B.VERSION=n,cr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){B[s].placeholder=B}),cr(["drop","take"],function(s,l){jt.prototype[s]=function(g){g=g===r?1:Ae(Lt(g),0);var S=this.__filtered__&&!l?new jt(this):this.clone();return S.__filtered__?S.__takeCount__=De(g,S.__takeCount__):S.__views__.push({size:De(g,k),type:s+(S.__dir__<0?"Right":"")}),S},jt.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),cr(["filter","map","takeWhile"],function(s,l){var g=l+1,S=g==F||g==Z;jt.prototype[s]=function(N){var U=this.clone();return U.__iteratees__.push({iteratee:Ot(N,3),type:g}),U.__filtered__=U.__filtered__||S,U}}),cr(["head","last"],function(s,l){var g="take"+(l?"Right":"");jt.prototype[s]=function(){return this[g](1).value()[0]}}),cr(["initial","tail"],function(s,l){var g="drop"+(l?"":"Right");jt.prototype[s]=function(){return this.__filtered__?new jt(this):this[g](1)}}),jt.prototype.compact=function(){return this.filter(Ke)},jt.prototype.find=function(s){return this.filter(s).head()},jt.prototype.findLast=function(s){return this.reverse().find(s)},jt.prototype.invokeMap=Bt(function(s,l){return typeof s=="function"?new jt(this):this.map(function(g){return ks(g,s,l)})}),jt.prototype.reject=function(s){return this.filter($a(Ot(s)))},jt.prototype.slice=function(s,l){s=Lt(s);var g=this;return g.__filtered__&&(s>0||l<0)?new jt(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),l!==r&&(l=Lt(l),g=l<0?g.dropRight(-l):g.take(l-s)),g)},jt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},jt.prototype.toArray=function(){return this.take(k)},Gr(jt.prototype,function(s,l){var g=/^(?:filter|find|map|reject)|While$/.test(l),S=/^(?:head|last)$/.test(l),N=B[S?"take"+(l=="last"?"Right":""):l],U=S||/^find/.test(l);N&&(B.prototype[l]=function(){var H=this.__wrapped__,X=S?[1]:arguments,tt=H instanceof jt,ft=X[0],ct=tt||kt(H),ht=function($t){var zt=N.apply(B,gn([$t],X));return S&&yt?zt[0]:zt};ct&&g&&typeof ft=="function"&&ft.length!=1&&(tt=ct=!1);var yt=this.__chain__,wt=!!this.__actions__.length,Ct=U&&!yt,Ft=tt&&!wt;if(!U&&ct){H=Ft?H:new jt(this);var Rt=s.apply(H,X);return Rt.__actions__.push({func:Fa,args:[ht],thisArg:r}),new dr(Rt,yt)}return Ct&&Ft?s.apply(this,X):(Rt=this.thru(ht),Ct?S?Rt.value()[0]:Rt.value():Rt)})}),cr(["pop","push","shift","sort","splice","unshift"],function(s){var l=la[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",S=/^(?:pop|shift)$/.test(s);B.prototype[s]=function(){var N=arguments;if(S&&!this.__chain__){var U=this.value();return l.apply(kt(U)?U:[],N)}return this[g](function(H){return l.apply(kt(H)?H:[],N)})}}),Gr(jt.prototype,function(s,l){var g=B[l];if(g){var S=g.name+"";ee.call(ji,S)||(ji[S]=[]),ji[S].push({name:l,func:g})}}),ji[Ra(r,m).name]=[{name:"wrapper",func:r}],jt.prototype.clone=g3,jt.prototype.reverse=m3,jt.prototype.value=y3,B.prototype.at=W5,B.prototype.chain=X5,B.prototype.commit=K5,B.prototype.next=Y5,B.prototype.plant=Q5,B.prototype.reverse=J5,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=tL,B.prototype.first=B.prototype.head,Os&&(B.prototype[Os]=Z5),B},Ui=KM();Hn?((Hn.exports=Ui)._=Ui,nf._=Ui):Me._=Ui}).call(Ye)}(ea,ea.exports);var wv=ea.exports;const gN={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},Tv=Et.forwardRef((e,t)=>{const[r,n]=Et.useState([]),[,i]=Et.useState(0),[o,a]=Et.useState([]),[,u]=mt.useState(!1),[f,h]=oN({autoPlay:!1}),d=mt.useRef(null),p=mt.useRef(null),c=mt.useRef(gN),v=mt.useRef(),{tl:y,dragModeRef:_}=mt.useContext(An),{frames:b,delays:m}=f,{src:w,startAt:T,endAt:x,frameStartAt:E,frameEndAt:I,loop:O,visible:A,transformation:{width:L=0,height:R=0,x:C,y:P,animation:M,colorCorrection:F={}},pointerdown:q}=e,{temperatureFilter:Z,sharpnessFilter:z,hueFilter:nt,blurFilter:V,adjustmentFilter:D}=_s(F),{blurRadius:k=0}=F,G=.1;pN(w,h),Ze(Oe.PAUSE,()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)}),Et.useEffect(()=>{c.current&&d.current&&(_.current?(d.current.stop(),c.current.isPlaying=!1,c.current.isDragging=!0):c.current.isDragging=!1)},[_]),Et.useEffect(()=>{if(!rl(b)){const rt=FP(b,vt=>{const{data:_t,width:At,height:ne}=vt,Ut=new Uint8Array(_t);return zr.Texture.fromBuffer(Ut,At,ne)}),ot=rt.map((vt,_t)=>({texture:vt,time:m[_t]}));n(rt),a(ot);let pt=0;m.forEach(vt=>{pt+=vt*10}),i(pt),c.current.totalDuration=pt,c.current.totalFrames=b.length}},[b,m]);const j=wv.debounce(rt=>{if(d.current){let ot=rt===0?0:rt/G;ot=isNaN(ot)?0:ot;const pt=c.current.totalFrames;ot=ot>pt?pt:ot,ot>=pt?(d.current.gotoAndStop(0),c.current.isPlaying=!1):(d.current.gotoAndPlay(ot||0),c.current.isPlaying=!0)}},20),Q=wv.debounce(()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},50),K=rt=>{if(d.current){let ot=rt===0?0:rt/G;ot=isNaN(ot)?0:ot;const pt=c.current.totalFrames;ot=ot>pt?pt:ot,ot>=pt?(d.current.gotoAndStop(0),c.current.isPlaying=!1):(d.current.gotoAndPlay(ot||0),c.current.isPlaying=!0)}},$=()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},W=()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},et=rt=>{var pt;const ot=rt+((pt=v.current)==null?void 0:pt.time());d.current&&_.current?(j(ot),Q(),c.current.isPlaying=!1):v.current&&d.current&&!c.current.isPlaying&&v.current.isActive()&&y.current.isActive()&&(j(ot),c.current.isPlaying=!0)},Y=()=>{u(!0)};return mt.useEffect(()=>{let rt=_e.context(()=>{});if(p.current&&y.current){const ot={duration:Number(I)-Number(E),onStart:K,onComplete:$,onStartParams:[E,I],onCompleteParams:[],onInterrupt:W,onUpdate:et,onUpdateParams:[E,I]};v.current&&v.current.kill(),rt=_e.context(()=>{v.current=_e.from(p.current,ot,E),y.current.add(v.current,T)})}return()=>{console.log("PixiGif Sprite Component cleanup"),v.current&&(v.current.kill(),_e.killTweensOf(v.current)),rt.revert()}},[M,T,x,E,I]),Vt.jsx(ni,{...e,ref:t,ignoreTlForVideo:!0,isGif:!0,children:Vt.jsx(le.Container,{ref:p,children:r&&r.length>0&&Vt.jsx(xv,{x:C,y:P,width:L,height:R,animationSpeed:1,alpha:A?1:0,loop:O,textures:o,onComplete:Y,anchor:.5,forwardRef:d,...A&&{interactive:!0,pointerdown:q},filters:[Z,z,nt,D,...k>0?[V]:[]]})})})});Tv.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiGifSprite"};var Ev={exports:{}};/*!
1960
+ }`;var Ft=ty(function(){return Yt(U,wt+"return "+ht).apply(r,H)});if(Ft.source=ht,Qf(Ft))throw Ft;return Ft}function f4(s){return Jt(s).toLowerCase()}function c4(s){return Jt(s).toUpperCase()}function h4(s,l,g){if(s=Jt(s),s&&(g||l===r))return ug(s);if(!s||!(l=nr(l)))return s;var S=Rr(s),N=Rr(l),U=fg(S,N),H=cg(S,N)+1;return wn(S,U,H).join("")}function d4(s,l,g){if(s=Jt(s),s&&(g||l===r))return s.slice(0,dg(s)+1);if(!s||!(l=nr(l)))return s;var S=Rr(s),N=cg(S,Rr(l))+1;return wn(S,0,N).join("")}function p4(s,l,g){if(s=Jt(s),s&&(g||l===r))return s.replace(Zu,"");if(!s||!(l=nr(l)))return s;var S=Rr(s),N=fg(S,Rr(l));return wn(S,N).join("")}function v4(s,l){var g=R,S=C;if(me(l)){var N="separator"in l?l.separator:N;g="length"in l?Lt(l.length):g,S="omission"in l?nr(l.omission):S}s=Jt(s);var U=s.length;if(Bi(s)){var H=Rr(s);U=H.length}if(g>=U)return s;var X=g-Di(S);if(X<1)return S;var tt=H?wn(H,0,X).join(""):s.slice(0,X);if(N===r)return tt+S;if(H&&(X+=tt.length-X),Jf(N)){if(s.slice(X).search(N)){var ft,ct=tt;for(N.global||(N=vf(N.source,Jt(Pv.exec(N))+"g")),N.lastIndex=0;ft=N.exec(ct);)var ht=ft.index;tt=tt.slice(0,ht===r?X:ht)}}else if(s.indexOf(nr(N),X)!=X){var yt=tt.lastIndexOf(N);yt>-1&&(tt=tt.slice(0,yt))}return tt+S}function g4(s){return s=Jt(s),s&&ON.test(s)?s.replace(Cv,HM):s}var m4=Hi(function(s,l,g){return s+(g?" ":"")+l.toUpperCase()}),rc=em("toUpperCase");function Jm(s,l,g){return s=Jt(s),l=g?r:l,l===r?$M(s)?XM(s):PM(s):s.match(l)||[]}var ty=Bt(function(s,l){try{return er(s,r,l)}catch(g){return Qf(g)?g:new Nt(g)}}),y4=en(function(s,l){return cr(l,function(g){g=qr(g),Jr(s,g,Yf(s[g],s))}),s});function _4(s){var l=s==null?0:s.length,g=Ot();return s=l?de(s,function(S){if(typeof S[1]!="function")throw new hr(a);return[g(S[0]),S[1]]}):[],Bt(function(S){for(var N=-1;++N<l;){var U=s[N];if(er(U[0],this,S))return er(U[1],this,S)}})}function b4(s){return H3(pr(s,p))}function nc(s){return function(){return s}}function x4(s,l){return s==null||s!==s?l:s}var w4=nm(),T4=nm(!0);function Ke(s){return s}function ic(s){return Mg(typeof s=="function"?s:pr(s,p))}function E4(s){return Lg(pr(s,p))}function S4(s,l){return Fg(s,pr(l,p))}var A4=Bt(function(s,l){return function(g){return ks(g,s,l)}}),O4=Bt(function(s,l){return function(g){return ks(s,g,l)}});function sc(s,l,g){var S=Pe(l),N=Ea(l,S);g==null&&!(me(l)&&(N.length||!S.length))&&(g=l,l=s,s=this,N=Ea(l,Pe(l)));var U=!(me(g)&&"chain"in g)||!!g.chain,H=nn(s);return cr(N,function(X){var tt=l[X];s[X]=tt,H&&(s.prototype[X]=function(){var ft=this.__chain__;if(U||ft){var ct=s(this.__wrapped__),ht=ct.__actions__=Ve(this.__actions__);return ht.push({func:tt,args:arguments,thisArg:s}),ct.__chain__=ft,ct}return tt.apply(s,gn([this.value()],arguments))})}),s}function C4(){return Me._===this&&(Me._=t3),this}function oc(){}function R4(s){return s=Lt(s),Bt(function(l){return Bg(l,s)})}var I4=Bf(de),P4=Bf(ig),N4=Bf(lf);function ey(s){return zf(s)?uf(qr(s)):lk(s)}function M4(s){return function(l){return s==null?r:Yn(s,l)}}var k4=sm(),L4=sm(!0);function ac(){return[]}function lc(){return!1}function F4(){return{}}function B4(){return""}function D4(){return!0}function U4(s,l){if(s=Lt(s),s<1||s>nt)return[];var g=k,S=De(s,k);l=Ot(l),s-=k;for(var N=hf(S,l);++g<s;)l(g);return N}function $4(s){return kt(s)?de(s,qr):ir(s)?[s]:Ve(xm(Jt(s)))}function G4(s){var l=++QM;return Jt(s)+l}var j4=Ia(function(s,l){return s+l},0),q4=Df("ceil"),z4=Ia(function(s,l){return s/l},1),H4=Df("floor");function V4(s){return s&&s.length?Ta(s,Ke,Tf):r}function W4(s,l){return s&&s.length?Ta(s,Ot(l,2),Tf):r}function X4(s){return ag(s,Ke)}function K4(s,l){return ag(s,Ot(l,2))}function Y4(s){return s&&s.length?Ta(s,Ke,Of):r}function Z4(s,l){return s&&s.length?Ta(s,Ot(l,2),Of):r}var Q4=Ia(function(s,l){return s*l},1),J4=Df("round"),tB=Ia(function(s,l){return s-l},0);function eB(s){return s&&s.length?cf(s,Ke):0}function rB(s,l){return s&&s.length?cf(s,Ot(l,2)):0}return B.after=EL,B.ary=Nm,B.assign=cF,B.assignIn=Vm,B.assignInWith=qa,B.assignWith=hF,B.at=dF,B.before=Mm,B.bind=Yf,B.bindAll=y4,B.bindKey=km,B.castArray=FL,B.chain=Rm,B.chunk=Hk,B.compact=Vk,B.concat=Wk,B.cond=_4,B.conforms=b4,B.constant=nc,B.countBy=eL,B.create=pF,B.curry=Lm,B.curryRight=Fm,B.debounce=Bm,B.defaults=vF,B.defaultsDeep=gF,B.defer=SL,B.delay=AL,B.difference=Xk,B.differenceBy=Kk,B.differenceWith=Yk,B.drop=Zk,B.dropRight=Qk,B.dropRightWhile=Jk,B.dropWhile=t5,B.fill=e5,B.filter=nL,B.flatMap=oL,B.flatMapDeep=aL,B.flatMapDepth=lL,B.flatten=Sm,B.flattenDeep=r5,B.flattenDepth=n5,B.flip=OL,B.flow=w4,B.flowRight=T4,B.fromPairs=i5,B.functions=TF,B.functionsIn=EF,B.groupBy=uL,B.initial=o5,B.intersection=a5,B.intersectionBy=l5,B.intersectionWith=u5,B.invert=AF,B.invertBy=OF,B.invokeMap=cL,B.iteratee=ic,B.keyBy=hL,B.keys=Pe,B.keysIn=Xe,B.map=Ba,B.mapKeys=RF,B.mapValues=IF,B.matches=E4,B.matchesProperty=S4,B.memoize=Ua,B.merge=PF,B.mergeWith=Wm,B.method=A4,B.methodOf=O4,B.mixin=sc,B.negate=$a,B.nthArg=R4,B.omit=NF,B.omitBy=MF,B.once=CL,B.orderBy=dL,B.over=I4,B.overArgs=RL,B.overEvery=P4,B.overSome=N4,B.partial=Zf,B.partialRight=Dm,B.partition=pL,B.pick=kF,B.pickBy=Xm,B.property=ey,B.propertyOf=M4,B.pull=d5,B.pullAll=Om,B.pullAllBy=p5,B.pullAllWith=v5,B.pullAt=g5,B.range=k4,B.rangeRight=L4,B.rearg=IL,B.reject=mL,B.remove=m5,B.rest=PL,B.reverse=Xf,B.sampleSize=_L,B.set=FF,B.setWith=BF,B.shuffle=bL,B.slice=y5,B.sortBy=TL,B.sortedUniq=S5,B.sortedUniqBy=A5,B.split=o4,B.spread=NL,B.tail=O5,B.take=C5,B.takeRight=R5,B.takeRightWhile=I5,B.takeWhile=P5,B.tap=V5,B.throttle=ML,B.thru=Fa,B.toArray=qm,B.toPairs=Km,B.toPairsIn=Ym,B.toPath=$4,B.toPlainObject=Hm,B.transform=DF,B.unary=kL,B.union=N5,B.unionBy=M5,B.unionWith=k5,B.uniq=L5,B.uniqBy=F5,B.uniqWith=B5,B.unset=UF,B.unzip=Kf,B.unzipWith=Cm,B.update=$F,B.updateWith=GF,B.values=Xi,B.valuesIn=jF,B.without=D5,B.words=Jm,B.wrap=LL,B.xor=U5,B.xorBy=$5,B.xorWith=G5,B.zip=j5,B.zipObject=q5,B.zipObjectDeep=z5,B.zipWith=H5,B.entries=Km,B.entriesIn=Ym,B.extend=Vm,B.extendWith=qa,sc(B,B),B.add=j4,B.attempt=ty,B.camelCase=VF,B.capitalize=Zm,B.ceil=q4,B.clamp=qF,B.clone=BL,B.cloneDeep=UL,B.cloneDeepWith=$L,B.cloneWith=DL,B.conformsTo=GL,B.deburr=Qm,B.defaultTo=x4,B.divide=z4,B.endsWith=WF,B.eq=Pr,B.escape=XF,B.escapeRegExp=KF,B.every=rL,B.find=iL,B.findIndex=Tm,B.findKey=mF,B.findLast=sL,B.findLastIndex=Em,B.findLastKey=yF,B.floor=H4,B.forEach=Im,B.forEachRight=Pm,B.forIn=_F,B.forInRight=bF,B.forOwn=xF,B.forOwnRight=wF,B.get=tc,B.gt=jL,B.gte=qL,B.has=SF,B.hasIn=ec,B.head=Am,B.identity=Ke,B.includes=fL,B.indexOf=s5,B.inRange=zF,B.invoke=CF,B.isArguments=Jn,B.isArray=kt,B.isArrayBuffer=zL,B.isArrayLike=We,B.isArrayLikeObject=xe,B.isBoolean=HL,B.isBuffer=Tn,B.isDate=VL,B.isElement=WL,B.isEmpty=XL,B.isEqual=KL,B.isEqualWith=YL,B.isError=Qf,B.isFinite=ZL,B.isFunction=nn,B.isInteger=Um,B.isLength=Ga,B.isMap=$m,B.isMatch=QL,B.isMatchWith=JL,B.isNaN=tF,B.isNative=eF,B.isNil=nF,B.isNull=rF,B.isNumber=Gm,B.isObject=me,B.isObjectLike=ye,B.isPlainObject=$s,B.isRegExp=Jf,B.isSafeInteger=iF,B.isSet=jm,B.isString=ja,B.isSymbol=ir,B.isTypedArray=Wi,B.isUndefined=sF,B.isWeakMap=oF,B.isWeakSet=aF,B.join=f5,B.kebabCase=YF,B.last=gr,B.lastIndexOf=c5,B.lowerCase=ZF,B.lowerFirst=QF,B.lt=lF,B.lte=uF,B.max=V4,B.maxBy=W4,B.mean=X4,B.meanBy=K4,B.min=Y4,B.minBy=Z4,B.stubArray=ac,B.stubFalse=lc,B.stubObject=F4,B.stubString=B4,B.stubTrue=D4,B.multiply=Q4,B.nth=h5,B.noConflict=C4,B.noop=oc,B.now=Da,B.pad=JF,B.padEnd=t4,B.padStart=e4,B.parseInt=r4,B.random=HF,B.reduce=vL,B.reduceRight=gL,B.repeat=n4,B.replace=i4,B.result=LF,B.round=J4,B.runInContext=J,B.sample=yL,B.size=xL,B.snakeCase=s4,B.some=wL,B.sortedIndex=_5,B.sortedIndexBy=b5,B.sortedIndexOf=x5,B.sortedLastIndex=w5,B.sortedLastIndexBy=T5,B.sortedLastIndexOf=E5,B.startCase=a4,B.startsWith=l4,B.subtract=tB,B.sum=eB,B.sumBy=rB,B.template=u4,B.times=U4,B.toFinite=sn,B.toInteger=Lt,B.toLength=zm,B.toLower=f4,B.toNumber=mr,B.toSafeInteger=fF,B.toString=Jt,B.toUpper=c4,B.trim=h4,B.trimEnd=d4,B.trimStart=p4,B.truncate=v4,B.unescape=g4,B.uniqueId=G4,B.upperCase=m4,B.upperFirst=rc,B.each=Im,B.eachRight=Pm,B.first=Am,sc(B,function(){var s={};return Gr(B,function(l,g){ee.call(B.prototype,g)||(s[g]=l)}),s}(),{chain:!1}),B.VERSION=n,cr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){B[s].placeholder=B}),cr(["drop","take"],function(s,l){jt.prototype[s]=function(g){g=g===r?1:Ae(Lt(g),0);var S=this.__filtered__&&!l?new jt(this):this.clone();return S.__filtered__?S.__takeCount__=De(g,S.__takeCount__):S.__views__.push({size:De(g,k),type:s+(S.__dir__<0?"Right":"")}),S},jt.prototype[s+"Right"]=function(g){return this.reverse()[s](g).reverse()}}),cr(["filter","map","takeWhile"],function(s,l){var g=l+1,S=g==F||g==Z;jt.prototype[s]=function(N){var U=this.clone();return U.__iteratees__.push({iteratee:Ot(N,3),type:g}),U.__filtered__=U.__filtered__||S,U}}),cr(["head","last"],function(s,l){var g="take"+(l?"Right":"");jt.prototype[s]=function(){return this[g](1).value()[0]}}),cr(["initial","tail"],function(s,l){var g="drop"+(l?"":"Right");jt.prototype[s]=function(){return this.__filtered__?new jt(this):this[g](1)}}),jt.prototype.compact=function(){return this.filter(Ke)},jt.prototype.find=function(s){return this.filter(s).head()},jt.prototype.findLast=function(s){return this.reverse().find(s)},jt.prototype.invokeMap=Bt(function(s,l){return typeof s=="function"?new jt(this):this.map(function(g){return ks(g,s,l)})}),jt.prototype.reject=function(s){return this.filter($a(Ot(s)))},jt.prototype.slice=function(s,l){s=Lt(s);var g=this;return g.__filtered__&&(s>0||l<0)?new jt(g):(s<0?g=g.takeRight(-s):s&&(g=g.drop(s)),l!==r&&(l=Lt(l),g=l<0?g.dropRight(-l):g.take(l-s)),g)},jt.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},jt.prototype.toArray=function(){return this.take(k)},Gr(jt.prototype,function(s,l){var g=/^(?:filter|find|map|reject)|While$/.test(l),S=/^(?:head|last)$/.test(l),N=B[S?"take"+(l=="last"?"Right":""):l],U=S||/^find/.test(l);N&&(B.prototype[l]=function(){var H=this.__wrapped__,X=S?[1]:arguments,tt=H instanceof jt,ft=X[0],ct=tt||kt(H),ht=function($t){var zt=N.apply(B,gn([$t],X));return S&&yt?zt[0]:zt};ct&&g&&typeof ft=="function"&&ft.length!=1&&(tt=ct=!1);var yt=this.__chain__,wt=!!this.__actions__.length,Ct=U&&!yt,Ft=tt&&!wt;if(!U&&ct){H=Ft?H:new jt(this);var Rt=s.apply(H,X);return Rt.__actions__.push({func:Fa,args:[ht],thisArg:r}),new dr(Rt,yt)}return Ct&&Ft?s.apply(this,X):(Rt=this.thru(ht),Ct?S?Rt.value()[0]:Rt.value():Rt)})}),cr(["pop","push","shift","sort","splice","unshift"],function(s){var l=la[s],g=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",S=/^(?:pop|shift)$/.test(s);B.prototype[s]=function(){var N=arguments;if(S&&!this.__chain__){var U=this.value();return l.apply(kt(U)?U:[],N)}return this[g](function(H){return l.apply(kt(H)?H:[],N)})}}),Gr(jt.prototype,function(s,l){var g=B[l];if(g){var S=g.name+"";ee.call(ji,S)||(ji[S]=[]),ji[S].push({name:l,func:g})}}),ji[Ra(r,m).name]=[{name:"wrapper",func:r}],jt.prototype.clone=g3,jt.prototype.reverse=m3,jt.prototype.value=y3,B.prototype.at=W5,B.prototype.chain=X5,B.prototype.commit=K5,B.prototype.next=Y5,B.prototype.plant=Q5,B.prototype.reverse=J5,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=tL,B.prototype.first=B.prototype.head,Os&&(B.prototype[Os]=Z5),B},Ui=KM();Hn?((Hn.exports=Ui)._=Ui,nf._=Ui):Me._=Ui}).call(Ye)}(ea,ea.exports);var wv=ea.exports;const gN={isPlaying:!1,progress:0,speed:1,isMuted:!1,isWaiting:!1,loaded:!1,size:{width:50,height:50},isDragging:!1,totalFrames:0,totalDuration:0},Tv=Et.forwardRef((e,t)=>{const[r,n]=Et.useState([]),[,i]=Et.useState(0),[o,a]=Et.useState([]),[,u]=mt.useState(!1),[f,h]=oN({autoPlay:!1}),d=mt.useRef(null),p=mt.useRef(null),c=mt.useRef(gN),v=mt.useRef(),{tl:y,dragModeRef:_}=mt.useContext(An),{frames:b,delays:m}=f,{src:w,startAt:T,endAt:x,frameStartAt:E,frameEndAt:I,loop:O,visible:A,transformation:{width:L=0,height:R=0,x:C,y:P,animation:M,colorCorrection:F={}},pointerdown:q}=e,{temperatureFilter:Z,sharpnessFilter:z,hueFilter:nt,blurFilter:V,adjustmentFilter:D}=_s(F),{blurRadius:k=0}=F,G=.1;pN(w,h),Ze(Oe.PAUSE,()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)}),Et.useEffect(()=>{c.current&&d.current&&(_.current?(d.current.stop(),c.current.isPlaying=!1,c.current.isDragging=!0):c.current.isDragging=!1)},[_]),Et.useEffect(()=>{if(!rl(b)){const rt=FP(b,vt=>{const{data:_t,width:At,height:ne}=vt,Ut=new Uint8Array(_t);return zr.Texture.fromBuffer(Ut,At,ne)}),ot=rt.map((vt,_t)=>({texture:vt,time:m[_t]}));n(rt),a(ot);let pt=0;m.forEach(vt=>{pt+=vt*10}),i(pt),c.current.totalDuration=pt,c.current.totalFrames=b.length}},[b,m]);const j=wv.debounce(rt=>{if(d.current){let ot=rt===0?0:rt/G;ot=isNaN(ot)?0:ot;const pt=c.current.totalFrames;ot=ot>pt?pt:ot,ot>=pt?(d.current.gotoAndStop(0),c.current.isPlaying=!1):(d.current.gotoAndPlay(ot||0),c.current.isPlaying=!0)}},20),Q=wv.debounce(()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},50),K=rt=>{if(d.current){let ot=rt===0?0:rt/G;ot=isNaN(ot)?0:ot;const pt=c.current.totalFrames;ot=ot>pt?pt:ot,ot>=pt?(d.current.gotoAndStop(0),c.current.isPlaying=!1):(d.current.gotoAndPlay(ot||0),c.current.isPlaying=!0)}},$=()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},W=()=>{d.current&&(d.current.stop(),c.current.isPlaying=!1)},et=rt=>{var pt;const ot=rt+((pt=v.current)==null?void 0:pt.time());d.current&&_.current?(j(ot),Q(),c.current.isPlaying=!1):v.current&&d.current&&!c.current.isPlaying&&v.current.isActive()&&y.current.isActive()&&(j(ot),c.current.isPlaying=!0)},Y=()=>{u(!0)};return mt.useEffect(()=>{let rt=_e.context(()=>{});if(p.current&&y.current){const ot={duration:Number(I)-Number(E),onStart:K,onComplete:$,onStartParams:[E,I],onCompleteParams:[],onInterrupt:W,onUpdate:et,onUpdateParams:[E,I]};v.current&&v.current.kill(),rt=_e.context(()=>{v.current=_e.from(p.current,ot,E),y.current.add(v.current,T)})}return()=>{v.current&&(v.current.kill(),_e.killTweensOf(v.current)),rt.revert()}},[M,T,x,E,I]),Vt.jsx(ni,{...e,ref:t,ignoreTlForVideo:!0,isGif:!0,children:Vt.jsx(le.Container,{ref:p,children:r&&r.length>0&&Vt.jsx(xv,{x:C,y:P,width:L,height:R,animationSpeed:1,alpha:A?1:0,loop:O,textures:o,onComplete:Y,anchor:.5,forwardRef:d,...A&&{interactive:!0,pointerdown:q},filters:[Z,z,nt,D,...k>0?[V]:[]]})})})});Tv.whyDidYouRender={logOnDifferentValues:!0,customName:"PixiGifSprite"};var Ev={exports:{}};/*!
1961
1961
  * Quill Editor v1.3.7
1962
1962
  * https://quilljs.com/
1963
1963
  * Copyright (c) 2014, Jason Chen
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reacthub-pixitweenjs",
3
- "version": "0.2.103",
3
+ "version": "0.2.104",
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",