reacthub-pixitweenjs 0.2.15 → 0.2.16

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
@@ -19092,7 +19092,7 @@ const Ha = Mt.createContext({}), ps = {
19092
19092
  defaults: { duration: 0 }
19093
19093
  });
19094
19094
  }), () => p.current.revert()), []), Gr.ticker.add(() => {
19095
- d.current && T && a(T());
19095
+ console.log("timeframe"), d.current && T && a(T());
19096
19096
  });
19097
19097
  const m = Wn(() => {
19098
19098
  let O = d.current.time();
@@ -19116,7 +19116,7 @@ const Ha = Mt.createContext({}), ps = {
19116
19116
  });
19117
19117
  }, []), Hr(() => {
19118
19118
  const P = d.current;
19119
- t ? P.resume() : P.pause();
19119
+ t ? (console.log("play=true; un-ending loop timeline"), P.resume()) : (console.log("play=false;un-ending loop timeline"), P.pause());
19120
19120
  }, [t]);
19121
19121
  const g = Wn(() => {
19122
19122
  d.current.revert();
package/dist/index.umd.js CHANGED
@@ -840,7 +840,7 @@ void main(void)
840
840
 
841
841
  gl_FragColor = c * alpha;
842
842
  }
843
- `;class ah extends wn{constructor(t){super(zS,HS),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,t)}apply(t,r,n,i){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,t.applyFilter(this,r,n,i)}}var bi=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(bi||{});class Qo{constructor(t=0,r=0,n=0,i=0){this._x=Number(t),this._y=Number(r),this._width=Number(n),this._height=Number(i),this._hull=[new xt,new xt,new xt,new xt],this.currentID=-1,this.dirtyID=0}get x(){return this._x}set x(t){this._x=t,this.dirtyID++}get y(){return this._y}set y(t){this._y=t,this.dirtyID++}get width(){return this._width}set width(t){this._width=t,this.dirtyID++}get height(){return this._height}set height(t){this._height=t,this.dirtyID++}get hull(){return this.isDirty()&&this.update(),this._hull}get topLeft(){return this.isDirty()&&this.update(),this._hull[0]}get topRight(){return this.isDirty()&&this.update(),this._hull[1]}get bottomRight(){return this.isDirty()&&this.update(),this._hull[2]}get bottomLeft(){return this.isDirty()&&this.update(),this._hull[3]}isDirty(){return this.currentID!==this.dirtyID}update(){const[t,r,n,i]=this._hull;t.set(this._x,this._y),r.set(this._x+this._width,this._y),n.set(this._x+this._width,this._y+this._height),i.set(this._x,this._y+this._height)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}clone(){return new Qo(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,r){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&r>=this.y&&r<this.y+this.height}equals(t){return t?t.x===this.x&&t.y===this.y&&t.width===this.width&&t.height===this.height:!1}pad(t=0,r=t){return this.x-=t,this.y-=r,this.width+=t*2,this.height+=r*2,this}fit(t){const r=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),s=Math.min(this.y+this.height,t.y+t.height);return this.x=r,this.width=Math.max(n-r,0),this.y=i,this.height=Math.max(s-i,0),this}ceil(t=1,r=.001){const n=Math.ceil((this.x+this.width-r)*t)/t,i=Math.ceil((this.y+this.height-r)*t)/t;return this.x=Math.floor((this.x+r)*t)/t,this.y=Math.floor((this.y+r)*t)/t,this.width=n-this.x,this.height=i-this.y,this}enlarge(t){const r=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),s=Math.max(this.y+this.height,t.y+t.height);return this.x=r,this.width=n-r,this.y=i,this.height=s-i,this}}const Cg=new xt;class Jo{constructor(t=0,r=0,n=0,i=0,s=0){t instanceof Qo&&(s=r||0,r=t.y,n=t.width,i=t.height,t=t.x),this.innerBounds=new Qo(t,r,n,i),this._rotation=s,this._center=new Jr(this.updateCenter,this),this._hull=[new xt,new xt,new xt,new xt],this._matrix=new ee,this.currentID=-1,this.dirtyID=0}get rotation(){return this._rotation}set rotation(t){this._rotation=t,this.dirtyID++}get center(){return this.isDirty()&&this.update(),this._center}set center(t){this.center.copyFrom(t)}get hull(){return this.isDirty()&&this.update(),this._hull}get topLeft(){return this.isDirty()&&this.update(),this._hull[0]}get topRight(){return this.isDirty()&&this.update(),this._hull[1]}get bottomRight(){return this.isDirty()&&this.update(),this._hull[2]}get bottomLeft(){return this.isDirty()&&this.update(),this._hull[3]}equals(t){return t?this.innerBounds.equals(t.innerBounds)&&this.rotation===t.rotation:!1}contains(t,r){typeof t=="number"&&(t=Cg.set(t,r));const n=this._matrix.applyInverse(t,Cg);return this.innerBounds.contains(n.x,n.y)}copyFrom(t){return this.innerBounds.copyFrom(t.innerBounds),this.rotation=t.rotation,this.dirtyID++,this}isDirty(){return this.currentID!==this.dirtyID+this.innerBounds.dirtyID}update(){const t=this.innerBounds,r=this._rotation,n=this._center,[i,s,a,o]=this._hull,c=this._matrix;n._x=t.x+t.width/2,n._y=t.y+t.height/2,c.identity().translate(-n.x,-n.y).rotate(r).translate(n.x,n.y),c.apply(t.topLeft,i),c.apply(t.topRight,s),c.apply(t.bottomRight,a),c.apply(t.bottomLeft,o),this.currentID=this.dirtyID+this.innerBounds.dirtyID}updateCenter(){const t=this.center,r=this.innerBounds;r.x=t.x-r.width/2,r.y=t.y-r.height/2}}class Og{constructor(t,r){this._history=new Array(t),this._decayRatio=r,this._currentIndex=0;for(let n=0;n<t;n++)this._history[n]=0}next(t){const{_history:r,_decayRatio:n}=this,i=r.length;this._currentIndex=this._currentIndex<i-1?this._currentIndex+1:0,r[this._currentIndex]=t;let s=0,a=0;for(let o=this._currentIndex+1;o<i;o++)s=(s+r[o])*n,a=(a+1)*n;for(let o=0;o<=this._currentIndex;o++)s=(s+r[o])*n,a=(a+1)*n;return this._average=s/a,this._average}absDev(){let t=0;for(let r=0,n=this._history.length;r<n;r++)t+=Math.abs(this._history[r]-this._average);return t/this._history.length}}class tl{constructor(t={}){tl.prototype.__init.call(this),this._freeList=[],this._freeCount=0,this._borrowRate=0,this._returnRate=0,this._flowRate=0,this._borrowRateAverage=0,this._reserveCount=t.reserve||0,this._capacityRatio=t.capacityRatio||1.2,this._decayRatio=t.decayRatio||.67,this._marginAverage=0,this._borrowRateAverageProvider=new Og(128,this._decayRatio),this._marginAverageProvider=new Og(128,this._decayRatio)}get capacity(){return this._freeList.length}set capacity(t){this._freeList.length=Math.ceil(t)}allocate(){return++this._borrowRate,++this._flowRate,this._freeCount>0?this._freeList[--this._freeCount]:this.create()}allocateArray(t){let r,n;Array.isArray(t)?(r=t,n=t.length):(n=t,r=new Array(n)),this._borrowRate+=n,this._flowRate+=n;let i=0;if(this._freeCount>0){const s=this._freeList,a=Math.min(this._freeCount,n);let o=this._freeCount;for(let c=0;c<a;c++)r[i]=s[o-1],++i,--o;this._freeCount=o}for(;i<n;)r[i]=this.create(),++i;return r}release(t){++this._returnRate,--this._flowRate,this._freeCount===this.capacity&&(this.capacity*=this._capacityRatio),this._freeList[this._freeCount]=t,++this._freeCount}releaseArray(t){this._returnRate+=t.length,this._flowRate-=t.length,this._freeCount+t.length>this.capacity&&(this.capacity=Math.max(this.capacity*this._capacityRatio,this._freeCount+t.length));for(let r=0,n=t.length;r<n;r++)this._freeList[this._freeCount]=t[r],++this._freeCount}reserve(t){if(this._reserveCount=t,this._freeCount<t){const r=this._freeCount-t;for(let n=0;n<r;n++)this._freeList[this._freeCount]=this.create(),++this._freeCount}}limit(t){if(this._freeCount>t){this.capacity>t*this._capacityRatio&&(this.capacity=t*this._capacityRatio);const n=Math.min(this._freeCount,this.capacity);for(let i=t;i<n;i++)this._freeList[i]=null}}startGC(t=me.shared){t.add(this._gcTick,null,Qi.UTILITY)}stopGC(t=me.shared){t.remove(this._gcTick)}__init(){this._gcTick=()=>{this._borrowRateAverage=this._borrowRateAverageProvider.next(this._borrowRate),this._marginAverage=this._marginAverageProvider.next(this._freeCount-this._borrowRate);const t=this._borrowRateAverageProvider.absDev();this._flowRate=0,this._borrowRate=0,this._returnRate=0;const r=this._freeCount,n=this._freeList.length;if(r<128&&this._borrowRateAverage<128&&n<128)return;const i=Math.max(this._borrowRateAverage*(this._capacityRatio-1),this._reserveCount);if(this._freeCount>i+t){const s=i+t;this.capacity=Math.min(this._freeList.length,Math.ceil(s)),this._freeCount=this._freeList.length}}}}var oh;const Pg=new Map;class Ig{static build(t){let r=Pg.get(t);return r||(r=new class extends tl{create(){return new t}},Pg.set(t,r),r)}static buildFunctional(t){return new(oh=class extends tl{constructor(...n){super(...n),oh.prototype.__init.call(this)}__init(){this.create=t}},oh)}}const kg={color:16777215,outlineColor:0,outlineThickness:1,radius:8,shape:"tooth"},GS=mr;class qS extends GS{constructor(t,r,n={},i,s,a){super(),this.transformer=t;const o=Object.assign({},kg,n);this._handle=r,this._style=o,this.onHandleDelta=i,this.onHandleCommit=s,this._dirty=!0,this.interactive=!0,this.cursor=a||"move",this._pointerDown=!1,this._pointerDragging=!1,this._pointerPosition=new xt,this._pointerMoveTarget=null,this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onpointerdown=this.onPointerDown,this.onpointermove=this.onPointerMove,this.onpointerup=this.onPointerUp,this.onpointerupoutside=this.onPointerUp}get handle(){return this._handle}set handle(t){this._handle=t,this._dirty=!0}get style(){return this._style}set style(t){this._style=Object.assign({},kg,t),this._dirty=!0}render(t){this._dirty&&(this.draw(),this._dirty=!1),super.render(t)}draw(){const t=this._handle,r=this._style,n=r.radius;if(this.clear().lineStyle(r.outlineThickness,r.outlineColor).beginFill(r.color),r.shape==="square")this.drawRect(-n/2,-n/2,n,n);else if(r.shape==="tooth")switch(t){case"middleLeft":this.drawPolygon([-n/2,-n/2,-n/2,n/2,n/2,n/2,n*1.1,0,n/2,-n/2]);break;case"topCenter":this.drawPolygon([-n/2,-n/2,n/2,-n/2,n/2,n/2,0,n*1.1,-n/2,n/2]);break;case"middleRight":this.drawPolygon([-n/2,n/2,-n*1.1,0,-n/2,-n/2,n/2,-n/2,n/2,n/2]);break;case"bottomCenter":this.drawPolygon([0,-n*1.1,n/2,-n/2,n/2,n/2,-n/2,n/2,-n/2,-n/2]);break;case"rotator":this.drawCircle(0,0,n/Math.sqrt(2));break;default:this.drawRect(-n/2,-n/2,n,n);break}else this.drawCircle(0,0,n);this.endFill()}onPointerDown(t){this._pointerDown=!0,this._pointerDragging=!1,t.stopPropagation(),this._pointerMoveTarget&&(this._pointerMoveTarget.removeEventListener("globalpointermove",this.onPointerMove),this._pointerMoveTarget=null),this._pointerMoveTarget=this.transformer.stage||this,this._pointerMoveTarget.addEventListener("globalpointermove",this.onPointerMove)}onPointerMove(t){this._pointerDown&&(this._pointerDragging?this.onDrag(t):this.onDragStart(t),t.stopPropagation())}onPointerUp(t){this._pointerDragging&&this.onDragEnd(t),this._pointerDown=!1,this._pointerMoveTarget&&(this._pointerMoveTarget.removeEventListener("globalpointermove",this.onPointerMove),this._pointerMoveTarget=null)}onDragStart(t){this._pointerPosition.copyFrom(t.data.global),this._pointerDragging=!0}onDrag(t){const r=t.data.global;this.onHandleDelta&&this.onHandleDelta(r),this._pointerPosition.copyFrom(r)}onDragEnd(t){this._pointerDragging=!1,this.onHandleCommit&&this.onHandleCommit()}}function el(e,t,r,n){const{x:i,y:s}=r,{x:a,y:o}=n;if(Math.abs(a-i)<.01)return Math.abs(e-i);if(Math.abs(o-s)<.01)return Math.abs(t-s);const c=(o-s)/(a-i);return Math.abs((c*e-t+(o-c*a))/Math.sqrt(c*c+1))}const Rg=Ig.build(xt),VS=[new xt,new xt,new xt,new xt],WS=new ee,as=new xt,XS=[0,0,0,1,-1,1,-1,-1,1,-1,1,0],YS=[0,0,-1,0,-1,-1,1,-1,1,1,0,1],KS=[0,0,1,0,1,1,-1,1,-1,-1,0,-1],ZS=[0,0,0,-1,1,-1,1,1,-1,1,-1,0],lh=new Array(12),QS=[XS,YS,KS,ZS],JS=mr;class tE extends JS{constructor(t){super(),this.transformer=t,this.boxScalingHandles=[this.addChild(new mr),this.addChild(new mr),this.addChild(new mr),this.addChild(new mr)],this.boxScalingHandles.forEach(r=>{r.interactive=!0}),this.boxScalingHandles[0].cursor=ha.topCenter,this.boxScalingHandles[1].cursor=ha.middleRight,this.boxScalingHandles[2].cursor=ha.bottomCenter,this.boxScalingHandles[3].cursor=ha.middleLeft}hitHandleType(t,r,n){const{boxRotationEnabled:i,boxRotationTolerance:s,boxScalingEnabled:a,boxScalingTolerance:o}=this.transformer,[c,h,d,p]=t.hull,{x:f,y:m}=r.applyInverse(n,as);if(a){const g=el(f,m,c,h)*r.d,v=el(f,m,c,p)*r.a,_=el(f,m,h,d)*r.a,b=el(f,m,p,d)*r.d,w=Math.min(g,v,_,b);if(w<o)switch(w){case g:return"topCenter";case v:return"middleLeft";case _:return"middleRight";case b:return"bottomCenter"}}if(i&&!t.contains(f,m)){const g=Math.sqrt((c.x-f)**2+(c.y-m)**2),v=Math.sqrt((h.x-f)**2+(h.y-m)**2),_=Math.sqrt((p.x-f)**2+(p.y-m)**2),b=Math.sqrt((d.x-f)**2+(d.y-m)**2),w=Math.min(g,v,_,b);if(w<s*1.45)switch(w){case g:return"boxRotateTopLeft";case v:return"boxRotateTopRight";case _:return"boxRotateBottomLeft";case b:return"boxRotateBottomRight"}}return null}drawBounds(t){const r=VS;for(let n=0;n<4;n++)this.transformer.projectToLocal(t.hull[n],r[n]);this.drawPolygon(r)}drawBoxScalingTolerance(t,r=this.transformer.boxScalingTolerance){t.innerBounds.pad(-r);const n=Rg.allocateArray(4);n.forEach((s,a)=>{this.projectToLocal(t.hull[a],s)}),t.innerBounds.pad(2.5*r);const i=Rg.allocateArray(4);i.forEach((s,a)=>{this.projectToLocal(t.hull[a],s)}),t.innerBounds.pad(-1.5*this.transformer.boxScalingTolerance);for(let s=0;s<4;s++){const a=n[s],o=n[(s+1)%4],c=i[s],h=i[(s+1)%4];this.boxScalingHandles[s].clear().beginFill(16777215,1e-4).drawPolygon(a,c,h,o).endFill()}}drawBoxRotationTolerance(){const{boxRotateTopLeft:t,boxRotateTopRight:r,boxRotateBottomLeft:n,boxRotateBottomRight:i}=this.transformer.handleAnchors,s=this.transformer.boxRotationTolerance*2,a=WS.identity().scale(s,s).rotate(this.transformer.getGroupBounds().rotation);for(let o=0;o<4;o++){const c=QS[o];let h;switch(o){case 0:h=t;break;case 1:h=r;break;case 2:h=n;break;case 3:h=i;break}for(let d=0;d<c.length;d+=2){const p=c[d],f=c[d+1];as.set(p,f),a.apply(as,as),lh[d]=as.x+h.x,lh[d+1]=as.y+h.y}this.drawPolygon(lh.slice())}}projectToLocal(t,r){return this.transformer.projectToLocal(t,r)}}const Ng=new ee;function Mg(e){const t=Ng.identity();return t.c=Math.tan(e),t}function Lg(e){const t=Ng.identity();return t.b=Math.tan(e),t}function Bg(e,t,r,n=e.pivot){const i=t.a,s=t.b,a=t.c,o=t.d,c=-Math.atan2(-a,o),h=Math.atan2(s,i);return r=r??h,e.pivot.set(n.x,n.y),e.rotation=r,e.skew.x=r+c,e.skew.y=-r+h,e.scale.x=Math.sqrt(i*i+s*s),e.scale.y=Math.sqrt(a*a+o*o),e.position.x=t.tx+(n.x*t.a+n.y*t.c),e.position.y=t.ty+(n.x*t.b+n.y*t.d),e}const rl=new ee,eE=new ee;function rE(e,t,r){if(!r){const s=e.parent?e.parent:e.enableTempParent();e.updateTransform(),e.disableTempParent(s)}const n=e.worldTransform,i=e.parent?eE.copyFrom(e.parent.worldTransform):ee.IDENTITY;rl.copyFrom(n),rl.prepend(t),rl.prepend(i.invert()),Bg(e.transform,rl)}const nl=new Ws,nE=[new xt,new xt,new xt,new xt],os=new ee,ls=new xt,uh=new Jo,iE=new Vt,Fg=[new xt,new xt,new xt,new xt],Dg=new xt,Ug=new ee,il=Ig.build(xt),ha={topLeft:"nw-resize",topCenter:"n-resize",topRight:"ne-resize",middleLeft:"w-resize",middleRight:"e-resize",bottomLeft:"sw-resize",bottomCenter:"s-resize",bottomRight:"se-resize"},sl=["topLeft","topCenter","topRight","middleLeft","middleCenter","middleRight","bottomLeft","bottomCenter","bottomRight"],jg={topLeft:{x:-1,y:-1},topCenter:{x:0,y:-1},topRight:{x:1,y:-1},middleLeft:{x:-1,y:0},middleCenter:{x:0,y:0},middleRight:{x:1,y:0},bottomLeft:{x:-1,y:1},bottomCenter:{x:0,y:1},bottomRight:{x:1,y:1}},sE=[...sl,"rotator","skewHorizontal","skewVertical"],aE=4,oE=16,lE=[Math.PI/4,Math.PI/2,Math.PI*3/4,Math.PI,0,-Math.PI/4,-Math.PI/2,-Math.PI*3/4,-Math.PI],uE=Math.PI/90,cE=[Math.PI/4,-Math.PI/4],hE=Math.PI/90,$g={color:0,thickness:2},fE=Ke;let dE=class Er extends fE{constructor(t={}){super(),Er.prototype.__init.call(this),Er.prototype.__init2.call(this),Er.prototype.__init3.call(this),Er.prototype.__init4.call(this),Er.prototype.__init5.call(this),this.interactive=!0,this.cursors=Object.assign({default:"move"},t.cursors),this.cursor=this.cursors.default,this.boundingBoxes=t.boundingBoxes||"all",this.group=t.group||[],this.boxRotationTolerance=t.boxRotationTolerance||oE,this.boxScalingTolerance=t.boxScalingTolerance||aE,this.centeredScaling=!!t.centeredScaling,this.projectionTransform=new ee,this.lockAspectRatio=t.lockAspectRatio===!0,this.rotationSnaps=t.rotationSnaps||lE,this.rotationSnapTolerance=t.rotationSnapTolerance!==void 0?t.rotationSnapTolerance:uE,this.skewRadius=t.skewRadius||64,this.skewSnaps=t.skewSnaps||cE,this.skewSnapTolerance=t.skewSnapTolerance!==void 0?t.skewSnapTolerance:hE,this.boxRotationEnabled=t.boxRotationEnabled===!0,this.boxScalingEnabled=t.boxScalingEnabled===!0,this._rotateEnabled=t.rotateEnabled!==!1,this._scaleEnabled=t.scaleEnabled!==!1,this._skewEnabled=t.skewEnabled===!0,this.translateEnabled=t.translateEnabled!==!1,this.transientGroupTilt=t.transientGroupTilt!==void 0?t.transientGroupTilt:!0,this.wireframe=this.addChild(new tE(this)),this.wireframe.cursor="none",this.stage=t.stage||null,this._skewX=0,this._skewY=0,this._transformType="none",this._wireframeStyle=Object.assign({},$g,t.wireframeStyle||{});const r=t.handleConstructor||qS,n=t.handleStyle||{};this._handleStyle=n;const i={rotator:this.addChild(new r(this,"rotator",n,o=>{this.rotateGroup("rotator",o)},this.commitGroup))},s=sl.reduce((o,c)=>{const h=new r(this,c,n,null,this.commitGroup,ha[c]);return h.onHandleDelta=d=>{this.scaleGroup(h.handle,d)},h.visible=this._scaleEnabled,o[c]=h,this.addChild(o[c]),o},{}),a={skewHorizontal:this.addChild(new r(this,"skewHorizontal",n,o=>{this.skewGroup("skewHorizontal",o)},this.commitGroup,"pointer")),skewVertical:this.addChild(new r(this,"skewVertical",n,o=>{this.skewGroup("skewVertical",o)},this.commitGroup,"pointer"))};this.handles=Object.assign({},s,i,a),this.handles.middleCenter.visible=!1,this.handles.skewHorizontal.visible=this._skewEnabled,this.handles.skewVertical.visible=this._skewEnabled,this.handleAnchors={rotator:new xt,boxRotateTopLeft:new xt,boxRotateTopRight:new xt,boxRotateBottomLeft:new xt,boxRotateBottomRight:new xt,topLeft:new xt,topCenter:new xt,topRight:new xt,middleLeft:new xt,middleCenter:new xt,middleRight:new xt,bottomLeft:new xt,bottomCenter:new xt,bottomRight:new xt,skewHorizontal:new xt,skewVertical:new xt},this.groupBounds=new Jo,this.updateGroupBounds(),this._pointerDown=!1,this._pointerDragging=!1,this._pointerPosition=new xt,this._pointerMoveTarget=null,this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.addEventListener("pointerdown",this.onPointerDown),this.addEventListener("pointerup",this.onPointerUp),this.addEventListener("pointerupoutside",this.onPointerUp)}get enabledHandles(){return this._enabledHandles}set enabledHandles(t){!this._enabledHandles&&!t||(this._enabledHandles=t,sE.forEach(r=>{this.handles[r].visible=!1}),t?t.forEach(r=>{this.handles[r].visible=!0}):(this.handles.rotator.visible=this._rotateEnabled,this.handles.skewHorizontal.visible=this._skewEnabled,this.handles.skewVertical.visible=this._skewEnabled,sl.forEach(r=>{r!=="middleCenter"&&(this.handles[r].visible=this._scaleEnabled)})))}get handleStyle(){return this._handleStyle}set handleStyle(t){const r=this.handles;for(const n in r)r[n].style=t;this._handleStyle=t}get rotateEnabled(){return this._rotateEnabled}set rotateEnabled(t){if(this._rotateEnabled!==t){if(this._rotateEnabled=t,this._enabledHandles)return;this.handles.rotator.visible=t}}get scaleEnabled(){return this._scaleEnabled}set scaleEnabled(t){if(this._scaleEnabled!==t){if(this._scaleEnabled=t,this._enabledHandles)return;sl.forEach(r=>{r!=="middleCenter"&&(this.handles[r].visible=t)})}}get skewEnabled(){return this._skewEnabled}set skewEnabled(t){if(this._skewEnabled!==t){if(this._skewEnabled=t,this._enabledHandles)return;this.handles.skewHorizontal.visible=t,this.handles.skewVertical.visible=t}}get transformType(){return this._transformType}get wireframeStyle(){return this._wireframeStyle}set wireframeStyle(t){this._wireframeStyle=Object.assign({},$g,t)}getGroupBounds(t=!1){return t&&this.updateGroupBounds(),this.groupBounds}__init(){this.translateGroup=t=>{this._transformHandle=null,this._transformType="translate";const r=os.identity().translate(t.x,t.y);this.prependTransform(r)}}__init2(){this.rotateGroup=(t,r)=>{this._transformHandle=t,this._transformType="rotate";const n=this.groupBounds,i=this.worldTransform.apply(this.handleAnchors[t],ls);this.projectionTransform.applyInverse(i,i),r=this.projectionTransform.applyInverse(r,Dg);const s=n.center,a=Math.atan2(i.y-s.y,i.x-s.x);let c=Math.atan2(r.y-s.y,r.x-s.x)-a,h=this.groupBounds.rotation+c;h=this.snapAngle(h,this.rotationSnapTolerance,this.rotationSnaps),c=h-this.groupBounds.rotation;const d=os.identity().translate(-s.x,-s.y).rotate(c).translate(s.x,s.y);this.prependTransform(d,!0),this.updateGroupBounds(h),this._skewX+=c,this._skewY+=c}}__init3(){this.scaleGroup=(t,r)=>{this._transformHandle=t,this._transformType="scale";const n=jg[t].x,i=jg[t].y,s=this.handles,a=this.groupBounds,o=a.rotation,c=a.innerBounds,h=this.worldTransform.apply(this.handleAnchors[t],ls);this.projectionTransform.applyInverse(h,h),r=this.projectionTransform.applyInverse(r,Dg);const d=r.x-h.x,p=r.y-h.y,f=(a.topRight.x-a.topLeft.x)/c.width,m=(a.topRight.y-a.topLeft.y)/c.width,g=(a.bottomLeft.x-a.topLeft.x)/c.height,v=(a.bottomLeft.y-a.topLeft.y)/c.height,_=d*f+p*m,b=d*g+p*v;let w=1+_*n/c.width,T=1+b*i/c.height;this.lockAspectRatio&&(t==="topLeft"||t==="topRight"||t==="bottomLeft"||t==="bottomRight")&&(w>T?T=w:w=T);const A=os.identity();if(n!==0&&w!==0){const I=this.centeredScaling?a.center:n===1?a.topLeft:a.topRight;A.translate(-I.x,-I.y).rotate(-o).scale(w,1).rotate(o).translate(I.x,I.y)}if(i!==0&&T!==0){const I=this.centeredScaling?a.center:i===1?a.topLeft:a.bottomLeft;A.translate(-I.x,-I.y).rotate(-o).scale(1,T).rotate(o).translate(I.x,I.y)}if((T<0||w<0)&&!(T<0&&w<0))switch(t){case"topLeft":case"bottomLeft":this.swapHandles(s.topLeft,s.bottomLeft);break;case"topCenter":case"bottomCenter":this.swapHandles(s.topCenter,s.bottomCenter);break;case"topRight":case"bottomRight":this.swapHandles(s.topRight,s.bottomRight);break}this.prependTransform(A)}}__init4(){this.skewGroup=(t,r)=>{this._transformHandle=t,this._transformType="skew";const n=this.groupBounds,i=ls.copyFrom(r);this.projectionTransform.applyInverse(i,i);const s=n.center,a=os.identity().translate(-s.x,-s.y);let o=this.groupBounds.rotation;if(t==="skewHorizontal"){const c=this._skewX;this._skewX=Math.atan2(i.y-s.y,i.x-s.x),this._skewX=this.snapAngle(this._skewX,this.skewSnapTolerance,this.skewSnaps),a.prepend(Lg(-c)),a.prepend(Lg(this._skewX))}else{const c=this._skewY,h=Math.atan2(i.y-s.y,i.x-s.x)-Math.PI/2;this._skewY=h,this._skewY=this.snapAngle(this._skewY,this.skewSnapTolerance,this.skewSnaps),a.prepend(Mg(c)),a.prepend(Mg(-this._skewY)),o-=this._skewY-c}a.translate(s.x,s.y),this.prependTransform(a,!0),this.updateGroupBounds(o)}}__init5(){this.commitGroup=()=>{this._transformHandle=null,this._transformType="none",this.transientGroupTilt!==!1&&this.group.length>1&&this.updateGroupBounds(0),this.emit("transformcommit")}}render(t){this.renderable&&this.visible&&(!this.lazyMode||this.lazyDirty)&&this.draw(),super.render(t)}draw(){const t=this.group,{color:r,thickness:n}=this._wireframeStyle;this.wireframe.clear(),this.boundingBoxes!=="none"&&this.wireframe.lineStyle(n,r),this.translateEnabled&&this.wireframe.beginFill(16777215,1e-4);for(let s=0,a=t.length;s<a&&this.boundingBoxes==="all";s++)this.wireframe.drawBounds(Er.calculateOrientedBounds(t[s],uh));const i=t.length!==1?Er.calculateGroupOrientedBounds(t,this.groupBounds.rotation,uh,!0):Er.calculateOrientedBounds(t[0],uh);this.wireframe.drawBounds(i),this.drawHandles(i),this.groupBounds.copyFrom(i),this.boxRotationEnabled&&(this.wireframe.closePath().beginFill(16777215,1e-4).lineStyle(),this.wireframe.drawBoxRotationTolerance()),this.boxScalingEnabled&&(this.wireframe.closePath().beginFill(16773375,1e-4).lineStyle(),this.wireframe.drawBoxScalingTolerance(i)),this.lazyDirty=!1}drawHandles(t){const r=this.handles,n=this.handleAnchors,{topLeft:i,topRight:s,bottomLeft:a,bottomRight:o,center:c}=t,[h,d,p,f]=Fg,m=ls;if(this.projectToLocal(i,h),this.projectToLocal(s,d),this.projectToLocal(a,p),this.projectToLocal(o,f),this.projectToLocal(c,m),n.topLeft.copyFrom(h),n.topCenter.set((h.x+d.x)/2,(h.y+d.y)/2),n.topRight.copyFrom(d),n.middleLeft.set((h.x+p.x)/2,(h.y+p.y)/2),n.middleCenter.set((h.x+f.x)/2,(h.y+f.y)/2),n.middleRight.set((d.x+f.x)/2,(d.y+f.y)/2),n.bottomLeft.copyFrom(p),n.bottomCenter.set((p.x+f.x)/2,(p.y+f.y)/2),n.bottomRight.copyFrom(f),this.boxRotationEnabled&&(n.boxRotateTopLeft.copyFrom(n.topLeft),n.boxRotateTopRight.copyFrom(n.topRight),n.boxRotateBottomLeft.copyFrom(n.bottomLeft),n.boxRotateBottomRight.copyFrom(n.bottomRight)),this._rotateEnabled){const g=(h.x+d.x)/2,v=(h.y+d.y)/2;let _=-(h.y-d.y),b=h.x-d.x;const w=Math.sqrt(_*_+b*b);_*=32/w,b*=32/w,r.rotator.position.x=g+_,r.rotator.position.y=v+b,this.wireframe.moveTo(g,v).lineTo(r.rotator.position.x,r.rotator.position.y),this.handleAnchors.rotator.copyFrom(r.rotator.position)}if(this._skewEnabled){const g=m.x,v=m.y;this.worldTransform.apply(m,m),n.skewHorizontal.set(m.x+Math.cos(this._skewX)*this.skewRadius,m.y+Math.sin(this._skewX)*this.skewRadius),n.skewVertical.set(m.x+-Math.sin(this._skewY)*this.skewRadius,m.y+Math.cos(this._skewY)*this.skewRadius),this.worldTransform.applyInverse(n.skewHorizontal,n.skewHorizontal),this.worldTransform.applyInverse(n.skewVertical,n.skewVertical),m.set(g,v),this.wireframe.beginFill(this.wireframeStyle.color).drawCircle(m.x,m.y,this.wireframeStyle.thickness*2).endFill(),this.wireframe.moveTo(m.x,m.y).lineTo(r.skewHorizontal.x,r.skewHorizontal.y).moveTo(m.x,m.y).lineTo(r.skewVertical.x,r.skewVertical.y)}for(const g in r){let v=this.groupBounds.rotation;g==="skewHorizontal"?v=this._skewX:g==="skewVertical"&&(v=this._skewY);const _=r[g];_.rotation=v,_.position.copyFrom(n[g]),_.getBounds(!1,iE)}}onPointerDown(t){this._pointerDown=!0,this._pointerDragging=!1,t.stopPropagation(),this._pointerMoveTarget&&(this._pointerMoveTarget.removeEventListener("globalpointermove",this.onPointerMove),this._pointerMoveTarget=null),this._pointerMoveTarget=this.stage||this,this._pointerMoveTarget.addEventListener("globalpointermove",this.onPointerMove)}onPointerMove(t){const r=this._pointerPosition,n=il.allocate().copyFrom(t.data.global),i=this.wireframe.hitHandleType(this.groupBounds,this.projectionTransform,n);if(!this._pointerDown)this.setCursorFromHoveredHandle(i);else{const s=n.x,a=n.y;if(this._pointerDragging)switch(this._transformHandle){case"boxRotateTopLeft":case"boxRotateTopRight":case"boxRotateBottomLeft":case"boxRotateBottomRight":this.rotateGroup(this._transformHandle,n);break;case"topCenter":case"middleLeft":case"middleRight":case"bottomCenter":this.scaleGroup(this._transformHandle,n);break;default:if(this.translateEnabled){const[o,c,h]=Fg;o.set(0,0),c.set(n.x-r.x,n.y-r.y),this.projectionTransform.applyInverse(o,o),this.projectionTransform.applyInverse(c,c),h.set(c.x-o.x,c.y-o.y),this.translateGroup(h)}}else this._transformHandle=this.wireframe.hitHandleType(this.groupBounds,this.projectionTransform,n),this.setCursorFromHoveredHandle(i);this._pointerPosition.x=s,this._pointerPosition.y=a,this._pointerDragging=!0,t.stopPropagation()}il.release(n)}onPointerUp(t){this._pointerDragging=!1,this._pointerDown=!1,this.commitGroup(),t.stopPropagation(),this._pointerMoveTarget&&(this._pointerMoveTarget.removeEventListener("globalpointermove",this.onPointerMove),this._pointerMoveTarget=null)}prependTransform(t,r=!1){const n=this.group;for(let i=0,s=n.length;i<s;i++)rE(n[i],t,!1);Ug.copyFrom(t),r||this.updateGroupBounds(),this.emit("transformchange",Ug)}updateGroupBounds(t=this.groupBounds.rotation){Er.calculateGroupOrientedBounds(this.group,t,this.groupBounds),this.drawHandles(this.groupBounds),this.lazyDirty=!0}snapAngle(t,r,n){if(t=t%(Math.PI*2),!n||n.length===1||!r)return t;for(let i=0,s=n.length;i<s;i++)if(Math.abs(t-n[i])<=r)return n[i];return t}swapHandles(t,r){const n=t.handle,i=r.handle,s=t.cursor,a=r.cursor,o=t.x,c=r.x,h=t.y,d=r.y;t.handle=i,r.handle=n,t.position.set(c,d),r.position.set(o,h),t.cursor=a,r.cursor=s,this.handles[n]=r,this.handles[i]=t,this._transformHandle===n?this._transformHandle=i:this._transformHandle===i&&(this._transformHandle=n)}setCursorFromHoveredHandle(t){if(t&&t.startsWith("boxRotate"))this.cursor=this.cursors.boxRotate||this.cursors.default;else if(t)switch(t){case"topCenter":this.cursor=this.cursors.boxScaleTop||this.cursors.default;break;case"middleLeft":this.cursor=this.cursors.boxScaleLeft||this.cursors.default;break;case"middleRight":this.cursor=this.cursors.boxScaleRight||this.cursors.default;break;case"bottomCenter":this.cursor=this.cursors.boxScaleBottom||this.cursors.default;break}else this.cursor=this.cursors.translate||this.cursors.default}projectToLocal(t,r){return r||(r=new xt),this.projectionTransform.apply(t,r),this.worldTransform.applyInverse(r,r),r}static calculateTransformedCorners(t,r=t.worldTransform,n,i=0){const s=t.getLocalBounds();return t.getBounds(),n=n||[new xt,new xt,new xt,new xt],n[i].set(s.x,s.y),n[i+1].set(s.x+s.width,s.y),n[i+2].set(s.x+s.width,s.y+s.height),n[i+3].set(s.x,s.y+s.height),r.apply(n[i],n[i]),r.apply(n[i+1],n[i+1]),r.apply(n[i+2],n[i+2]),r.apply(n[i+3],n[i+3]),n}static calculateOrientedBounds(t,r){const n=t.parent?t.parent:t.enableTempParent();t.updateTransform(),t.disableTempParent(n),Bg(nl,t.worldTransform),nl.updateLocalTransform();const i=nl.rotation,s=Er.calculateTransformedCorners(t,t.worldTransform,nE),a=(s[0].x+s[1].x+s[2].x+s[3].x)/4,o=(s[0].y+s[1].y+s[2].y+s[3].y)/4,c=os.identity().translate(-a,-o).rotate(-nl.rotation).translate(a,o);return c.apply(s[0],s[0]),c.apply(s[1],s[1]),c.apply(s[2],s[2]),c.apply(s[3],s[3]),r=r||new Jo,r.rotation=i,r.innerBounds.x=Math.min(s[0].x,s[1].x,s[2].x,s[3].x),r.innerBounds.y=Math.min(s[0].y,s[1].y,s[2].y,s[3].y),r.innerBounds.width=Math.max(s[0].x,s[1].x,s[2].x,s[3].x)-r.innerBounds.x,r.innerBounds.height=Math.max(s[0].y,s[1].y,s[2].y,s[3].y)-r.innerBounds.y,r}static calculateGroupOrientedBounds(t,r,n,i=!1){const s=t.length,a=il.allocateArray(s*4);for(let f=0;f<s;f++){const m=t[f];if(!i){const g=m.parent?m.parent:m.enableTempParent();m.updateTransform(),m.disableTempParent(g)}Er.calculateTransformedCorners(m,m.worldTransform,a,f*4)}const o=os.identity().rotate(-r);let c=Number.MAX_VALUE,h=Number.MAX_VALUE,d=-Number.MAX_VALUE,p=-Number.MAX_VALUE;for(let f=0,m=a.length;f<m;f++){const g=a[f];o.apply(g,g);const v=g.x,_=g.y;c=v<c?v:c,h=_<h?_:h,d=v>d?v:d,p=_>p?_:p}return il.releaseArray(a),n=n||new Jo,n.innerBounds.x=c,n.innerBounds.y=h,n.innerBounds.width=d-c,n.innerBounds.height=p-h,n.rotation=r,o.applyInverse(n.center,ls),n.center.copyFrom(ls),n}};function pE(e,t,r,n){for(const i in t){const s=r[i],a=n[i],o=t[i];s!==a&&(s&&e.off(o,s),a&&e.on(o,a))}}const al={},mE=ee.IDENTITY,gE={transformchange:"transformchange",transformcommit:"transformcommit"},yE=qt.PixiComponent("Transformer",{create:e=>new dE(e),applyProps(e,t,r){if(qt.applyDefaultProps(e,t,r),pE(e,gE,t,r),r.cursors&&Object.assign(e.cursors,r.cursors),e.group=r.group||[],e.boundingBoxes=r.boundingBoxes||"all",e.boxScalingEnabled=r.boxScalingEnabled===!0,e.boxScalingTolerance=r.boxScalingTolerance!==void 0?r.boxScalingTolerance:e.boxScalingTolerance,e.boxRotationEnabled=r.boxRotationEnabled===!0,e.boxRotationTolerance=r.boxRotationTolerance!==void 0?r.boxRotationTolerance:e.boxRotationTolerance,e.centeredScaling=r.centeredScaling,e.enabledHandles=r.enabledHandles,e.lockAspectRatio=r.lockAspectRatio,e.projectionTransform.copyFrom(r.projectionTransform||mE),e.skewRadius=r.skewRadius||e.skewRadius,e.rotateEnabled=r.rotateEnabled!==!1,e.scaleEnabled=r.scaleEnabled!==!1,e.skewEnabled=r.skewEnabled===!0,e.translateEnabled=r.translateEnabled!==!1,e.transientGroupTilt=r.transientGroupTilt,t.handleConstructor!==r.handleConstructor)throw new Error("Transformer does not support changing the TransformerHandleConstructor!");t.rotationSnaps!==r.rotationSnaps&&(e.rotationSnaps=r.rotationSnaps),t.rotationSnapTolerance!==r.rotationSnapTolerance&&(e.rotationSnapTolerance=r.rotationSnapTolerance),t.skewSnaps!==r.skewSnaps&&(e.skewSnaps=r.skewSnaps),t.skewSnapTolerance!==r.skewSnapTolerance&&(e.skewSnapTolerance=r.skewSnapTolerance);const n=t.handleStyle||al,i=r.handleStyle||al;(n.color!==i.color||n.outlineColor!==i.outlineColor||n.outlineThickness!==i.outlineThickness||n.radius!==i.radius||n.shape!==i.shape)&&(e.handleStyle=i);const s=t.wireframeStyle||al,a=r.wireframeStyle||al;(s.color!==a.color||s.thickness!==a.thickness)&&(e.wireframeStyle=a)}}),ch=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:s,onDoubleClick:a,uniqueId:o=""})=>{const c=Cr.utils.string2hex("#F3C409"),h=Cr.utils.string2hex("#F3C409"),d=Mt.useRef({isDragging:!1}),p=Mt.useCallback(()=>{s&&!d.current.isDragging&&s(!0)},[s]),f=Mt.useCallback(()=>{s&&!d.current.isDragging&&s(!1)},[s]),m=Mt.useCallback(()=>{d.current.isDragging=!0},[]),g=Mt.useCallback(()=>{d.current.isDragging=!1},[]),v=Mt.useCallback(()=>{d.current.isDragging=!1},[]),_=Mt.useCallback(()=>{console.log("dobule click in pixi transformer"),a&&a({uniqueId:o})},[a]),b=Mt.useCallback(T=>{d.current.isDragging=!0,i&&i(T)},[i]),w=Mt.useCallback(()=>{if(t.current===null)return;const T=t.current.x,x=t.current.y,A=t.current.width,I=t.current.height,O=t.current.rotation,P=[t.current.scale.x,t.current.scale.y];n&&n({uniqueId:o,transformation:{x:Math.round(T),y:Math.round(x),width:Math.round(Math.max(5,A)),height:Math.round(Math.max(5,I)),rotate:Math.round(O),scale:P}}),d.current.isDragging=!1},[n]);return Mt.useEffect(()=>(e.current&&(e.current.on("mouseover",p),e.current.on("mouseout",f),e.current.on("mousedown",m),e.current.on("mouseup",g),e.current.on("mouseupoutside",v),e.current.addListener("dblclick",_)),()=>{e.current&&(e.current.off("mouseover",p),e.current.off("mouseout",f),e.current.off("mousedown",m),e.current.off("mouseup",g),e.current.off("mouseupoutside",v),e.current.removeListener("dblclick",_))}),[]),$t.jsx(yE,{ref:e,group:r?[t.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:1,color:h},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:c,shape:"circle",radius:9},transformchange:b,transformcommit:w})};var ol={};Object.defineProperty(ol,"__esModule",{value:!0});var vE=dt,hh;function zg(){return hh||(hh=document.createElement("div")),hh}function _E(e,t,r){var n;return vE.useEffect(function(){n=n||zg();var i=function(s){var a=s.detail;t(a)};return n.addEventListener(e,i,!1),function(){n==null||n.removeEventListener(e,i,!1)}},r),function(i){n=i}}function bE(e,t){var r=zg(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function xE(){var e;function t(r){e=r}return t.emit=function(r,n){var i=new CustomEvent(r,{bubbles:!0,detail:n});e==null||e.dispatchEvent(i)},t}var Hg=ol.emitCustomEvent=bE;ol.newCustomEventEmitter=xE;var ll=ol.useCustomEventListener=_E;function wE(e,t){const[r,n]=dt.useState(e);return dt.useEffect(()=>{const i=setTimeout(()=>n(e),t||500);return()=>{clearTimeout(i)}},[e,t]),r}const us=Mt.createContext({}),xi={STOP:"GSAP_STOP",PAUSE:"GSAP_PAUSE",PLAY:"GSAP_PLAY",RESUME:"GSAP_RESUME",RESTART:"GSAP_RESTART",REPEAT:"GSAP_REPEAT",SEEK:"GSAP_SEEK",RESET:"GSAP_RESET",DRAGGING_START:"GSAP_DRAGGING_START",DRAGGING_END:"GSAP_DRAGGING_END"},TE=({children:e})=>{const[t,r]=dt.useState(!1),[n,i]=dt.useState(!1),[s,a]=dt.useState(0),[o,c]=dt.useState(0),h=wE(s,600),d=dt.useRef(),p=dt.useRef(),f=dt.useRef(.001);dt.useLayoutEffect(()=>(p.current=Ar.context(()=>{d.current&&d.current.progress(0).kill(),d.current=Ar.timeline({paused:!0,defaults:{duration:0}})}),()=>p.current.revert()),[]),Ar.ticker.add(()=>{d.current&&T&&a(T())});const m=dt.useCallback(()=>{let O=d.current.time();f.current=O},[]);dt.useEffect(()=>{c(h)},[h]),dt.useEffect(()=>{const I=d.current;I.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){r(!1),m()}).eventCallback("onUpdate",function(){m()}).eventCallback("onPause",function(){console.log("onPause",I.progress()),r(!1),m()}).eventCallback("onResume",function(){console.log("onResume",I.progress()),r(!0),m()}).eventCallback("onComplete",function(){I.seek(0),I.pause(),r(!1),m()})},[]),dt.useEffect(()=>{const I=d.current;t?I.resume():I.pause()},[t]);const g=dt.useCallback(()=>{d.current.revert()},[]),v=dt.useCallback(()=>{d.current.restart(),r(!0)},[]),_=dt.useCallback(()=>{const I=d.current;I.repeat(1),I.restart()},[]),b=dt.useCallback(I=>{d.current.seek(I)},[]),w=dt.useCallback(()=>{d.current.seek(4)},[]),T=dt.useCallback(()=>{const I=d.current;return I?I.totalDuration():0},[]),x=()=>{d.current.pause(),Hg(xi.PAUSE),r(!1)},A=()=>{const I=d.current;r(!0),I.resume(),Hg(xi.RESUME)};return ll(xi.DRAGGING_START,()=>{console.log("dragging start"),i(!0)}),ll(xi.DRAGGING_END,()=>{i(!1),console.log("dragging end")}),console.log("set play updated",t),$t.jsx(us.Provider,{value:{gsapCtx:p,tl:d,handlePlay:A,handlePause:x,handleReset:g,handleSeek:b,handleSeekTest:w,handleRestart:v,handleRepeat:_,playerTimeRef:f,play:t,totalDuration:o,isDragging:n},children:e})},fh=e=>{let t={};switch(e){case"NONE":case"none":break;case"BOUNCE_IN":t.from={duration:2,ease:"bounce.out",y:-1500};break;case"BOUNCE_IN_DOWN":t.from={ease:"bounce.out",y:-1500,duration:2};break;case"BOUNCE_IN_LEFT":t.from={ease:"bounce.out",x:-1500,duration:2};break;case"BOUNCE_IN_RIGHT":t.from={ease:"bounce.out",x:1500,duration:2};break;case"BOUNCE_IN_UP":t.from={ease:"bounce.out",y:1500,duration:2};break;case"BOUNCE_OUT":t.from={ease:"bounce.in",y:2,duration:2};break;case"BOUNCE_OUT_DOWN":break;case"BOUNCE_OUT_LEFT":break;case"BOUNCE_OUT_RIGHT":break;case"BOUNCE_OUT_UP":break;case"FADE_IN":t.to={ease:"power4.in",alpha:1,duration:.5};break;case"FADE_IN_DOWN":t.fromTo={from:{y:-1e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break;case"FADE_IN_LEFT":t.fromTo={from:{x:-1e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_RIGHT":t.fromTo={from:{x:2e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_UP":t.fromTo={from:{y:2e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break}return t};var SE=Object.prototype;function EE(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||SE;return e===r}var Gg=EE;function AE(e,t){return function(r){return e(t(r))}}var CE=AE,OE=CE,PE=OE(Object.keys,Object),IE=PE,kE=Gg,RE=IE,NE=Object.prototype,ME=NE.hasOwnProperty;function LE(e){if(!kE(e))return RE(e);var t=[];for(var r in Object(e))ME.call(e,r)&&r!="constructor"&&t.push(r);return t}var qg=LE,BE=typeof Nn=="object"&&Nn&&Nn.Object===Object&&Nn,Vg=BE,FE=Vg,DE=typeof self=="object"&&self&&self.Object===Object&&self,UE=FE||DE||Function("return this")(),An=UE,jE=An,$E=jE.Symbol,ul=$E,Wg=ul,Xg=Object.prototype,zE=Xg.hasOwnProperty,HE=Xg.toString,fa=Wg?Wg.toStringTag:void 0;function GE(e){var t=zE.call(e,fa),r=e[fa];try{e[fa]=void 0;var n=!0}catch{}var i=HE.call(e);return n&&(t?e[fa]=r:delete e[fa]),i}var qE=GE,VE=Object.prototype,WE=VE.toString;function XE(e){return WE.call(e)}var YE=XE,Yg=ul,KE=qE,ZE=YE,QE="[object Null]",JE="[object Undefined]",Kg=Yg?Yg.toStringTag:void 0;function tA(e){return e==null?e===void 0?JE:QE:Kg&&Kg in Object(e)?KE(e):ZE(e)}var da=tA;function eA(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var dh=eA,rA=da,nA=dh,iA="[object AsyncFunction]",sA="[object Function]",aA="[object GeneratorFunction]",oA="[object Proxy]";function lA(e){if(!nA(e))return!1;var t=rA(e);return t==sA||t==aA||t==iA||t==oA}var Zg=lA,uA=An,cA=uA["__core-js_shared__"],hA=cA,ph=hA,Qg=function(){var e=/[^.]+$/.exec(ph&&ph.keys&&ph.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function fA(e){return!!Qg&&Qg in e}var dA=fA,pA=Function.prototype,mA=pA.toString;function gA(e){if(e!=null){try{return mA.call(e)}catch{}try{return e+""}catch{}}return""}var Jg=gA,yA=Zg,vA=dA,_A=dh,bA=Jg,xA=/[\\^$.*+?()[\]{}|]/g,wA=/^\[object .+?Constructor\]$/,TA=Function.prototype,SA=Object.prototype,EA=TA.toString,AA=SA.hasOwnProperty,CA=RegExp("^"+EA.call(AA).replace(xA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function OA(e){if(!_A(e)||vA(e))return!1;var t=yA(e)?CA:wA;return t.test(bA(e))}var PA=OA;function IA(e,t){return e==null?void 0:e[t]}var kA=IA,RA=PA,NA=kA;function MA(e,t){var r=NA(e,t);return RA(r)?r:void 0}var cs=MA,LA=cs,BA=An,FA=LA(BA,"DataView"),DA=FA,UA=cs,jA=An,$A=UA(jA,"Map"),mh=$A,zA=cs,HA=An,GA=zA(HA,"Promise"),qA=GA,VA=cs,WA=An,XA=VA(WA,"Set"),YA=XA,KA=cs,ZA=An,QA=KA(ZA,"WeakMap"),JA=QA,gh=DA,yh=mh,vh=qA,_h=YA,bh=JA,ty=da,hs=Jg,ey="[object Map]",t2="[object Object]",ry="[object Promise]",ny="[object Set]",iy="[object WeakMap]",sy="[object DataView]",e2=hs(gh),r2=hs(yh),n2=hs(vh),i2=hs(_h),s2=hs(bh),wi=ty;(gh&&wi(new gh(new ArrayBuffer(1)))!=sy||yh&&wi(new yh)!=ey||vh&&wi(vh.resolve())!=ry||_h&&wi(new _h)!=ny||bh&&wi(new bh)!=iy)&&(wi=function(e){var t=ty(e),r=t==t2?e.constructor:void 0,n=r?hs(r):"";if(n)switch(n){case e2:return sy;case r2:return ey;case n2:return ry;case i2:return ny;case s2:return iy}return t});var ay=wi;function a2(e){return e!=null&&typeof e=="object"}var pa=a2,o2=da,l2=pa,u2="[object Arguments]";function c2(e){return l2(e)&&o2(e)==u2}var h2=c2,oy=h2,f2=pa,ly=Object.prototype,d2=ly.hasOwnProperty,p2=ly.propertyIsEnumerable,m2=oy(function(){return arguments}())?oy:function(e){return f2(e)&&d2.call(e,"callee")&&!p2.call(e,"callee")},xh=m2,g2=Array.isArray,nn=g2,y2=9007199254740991;function v2(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=y2}var wh=v2,_2=Zg,b2=wh;function x2(e){return e!=null&&b2(e.length)&&!_2(e)}var cl=x2,hl={exports:{}};function w2(){return!1}var T2=w2;hl.exports,function(e,t){var r=An,n=T2,i=t&&!t.nodeType&&t,s=i&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===i,o=a?r.Buffer:void 0,c=o?o.isBuffer:void 0,h=c||n;e.exports=h}(hl,hl.exports);var Th=hl.exports,S2=da,E2=wh,A2=pa,C2="[object Arguments]",O2="[object Array]",P2="[object Boolean]",I2="[object Date]",k2="[object Error]",R2="[object Function]",N2="[object Map]",M2="[object Number]",L2="[object Object]",B2="[object RegExp]",F2="[object Set]",D2="[object String]",U2="[object WeakMap]",j2="[object ArrayBuffer]",$2="[object DataView]",z2="[object Float32Array]",H2="[object Float64Array]",G2="[object Int8Array]",q2="[object Int16Array]",V2="[object Int32Array]",W2="[object Uint8Array]",X2="[object Uint8ClampedArray]",Y2="[object Uint16Array]",K2="[object Uint32Array]",le={};le[z2]=le[H2]=le[G2]=le[q2]=le[V2]=le[W2]=le[X2]=le[Y2]=le[K2]=!0,le[C2]=le[O2]=le[j2]=le[P2]=le[$2]=le[I2]=le[k2]=le[R2]=le[N2]=le[M2]=le[L2]=le[B2]=le[F2]=le[D2]=le[U2]=!1;function Z2(e){return A2(e)&&E2(e.length)&&!!le[S2(e)]}var Q2=Z2;function J2(e){return function(t){return e(t)}}var tC=J2,fl={exports:{}};fl.exports,function(e,t){var r=Vg,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,a=s&&r.process,o=function(){try{var c=i&&i.require&&i.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}}();e.exports=o}(fl,fl.exports);var eC=fl.exports,rC=Q2,nC=tC,uy=eC,cy=uy&&uy.isTypedArray,iC=cy?nC(cy):rC,Sh=iC,sC=qg,aC=ay,oC=xh,lC=nn,uC=cl,cC=Th,hC=Gg,fC=Sh,dC="[object Map]",pC="[object Set]",mC=Object.prototype,gC=mC.hasOwnProperty;function yC(e){if(e==null)return!0;if(uC(e)&&(lC(e)||typeof e=="string"||typeof e.splice=="function"||cC(e)||fC(e)||oC(e)))return!e.length;var t=aC(e);if(t==dC||t==pC)return!e.size;if(hC(e))return!sC(e).length;for(var r in e)if(gC.call(e,r))return!1;return!0}var vC=yC;const gr=ri(vC),_C=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Eh=e=>{const[t,r]=Mt.useState(!1),[,n]=dt.useState(!1),[,i]=dt.useState(!1),s=dt.useRef(null),a=dt.useRef(null),o=dt.useRef(null),c=dt.useRef(null),{tl:h}=dt.useContext(us),{uniqueId:d,startAt:p,endAt:f,initialAlpha:m,transformation:{x:g,y:v,width:_,height:b,colorCorrection:w,animation:T,effect:x},applyTransformer:A}=e;console.log("all abstract props",e);const{contrast:I=1,saturation:O=1,brightness:P=1,alpha:B=1,blurRadius:k=0}=w||{},C={...P>1&&{brightness:P},...I>1&&{contrast:I},...O>1&&{saturation:O},...B!==0&&{alpha:B}};Mt.useEffect(()=>{s.current&&r(!0)},[]),Mt.useEffect(()=>{let V=Ar.context(()=>{});if(s.current&&h.current){const q={duration:Number(f)-Number(p)},X=fh(T||"None");V=Ar.context(()=>{var G,D;gr(X.from)?gr(X.to)?gr(X.fromTo)?h.current.to(s.current,{alpha:1,duration:.01},p).from(o.current,{...q},p).to(s.current,{alpha:0,duration:.1},Number(f)-.1):h.current.fromTo(s.current,(G=X.fromTo)==null?void 0:G.from,(D=X.fromTo)==null?void 0:D.to,p).from(o.current,{...q},p).to(s.current,{alpha:0,duration:.2},f-.2):h.current.to(s.current,{alpha:1,duration:.2,...X.to},p).from(o.current,{...q},p).to(s.current,{alpha:0,duration:.2},f-.2):h.current.from(s.current,{...X.from},p).to(o.current,{alpha:1,duration:.2},p).from(o.current,{...q},p).to(s.current,{alpha:0,duration:.2},f-.2)})}return()=>V.revert()},[T,p,f]);const R=Mt.useCallback(()=>{n(!0)},[]),M=Mt.useCallback(V=>{console.log("changeEnd",V),e.onAnchorTransformationEnd&&(console.log("running onAnchorTransformationEnd"),e.onAnchorTransformationEnd(V))},[]),F=qt.withFilters(qt.Container,{...k>0&&{blur:Cr.filters.BlurFilter},...!gr(C)&&{adjust:ah},matrix:Cr.filters.ColorMatrixFilter}),$=(w==null?void 0:w.enabled)||x&&x!==bi.Normal;return $t.jsxs(qt.Container,{ref:a,children:[$t.jsxs(qt.Container,{ref:s,alpha:m,position:[g,v],pivot:[g,v],width:_,height:b,children:[$&&$t.jsx(F,{scale:1,blur:{blur:k,quality:4},adjust:C,apply:({matrix:V})=>{x===bi.BlackAndWhite?V.desaturate():x===bi.Sepia?V.sepia():x===bi.RetroVintage||x===bi.NightVision?V.negative():x===bi.Normal&&V.reset()},matrix:{enabled:!0,matrix:_C},children:$t.jsx(qt.Container,{ref:o,children:e.children})}),!$&&$t.jsx(qt.Container,{ref:o,children:e.children})]}),A&&$t.jsx(ch,{pixiTransformerRef:c,imageRef:s,isMounted:t,transformCommit:M,transformChange:R,mouseoverEvent:i,uniqueId:d})]})},bC=e=>{const t=dt.useRef(null),r=dt.useRef(null),{src:n,transformation:{x:i,y:s,width:a,height:o,anchor:c},pointerdown:h,pointerup:d,mousedown:p,mouseup:f,pointerover:m,mouseover:g,mouseout:v}=e;return $t.jsx(Eh,{...e,children:$t.jsx(qt.Container,{ref:r,children:$t.jsx(qt.Sprite,{image:n,width:a,height:o,anchor:c,ref:t,x:i,y:s,interactive:!0,pointerdown:h,pointerup:d,pointerover:m,mousedown:p,mouseup:f,mouseover:g,mouseout:v})})})};var xC=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ah={},wC={get exports(){return Ah},set exports(e){Ah=e}};/*!
843
+ `;class ah extends wn{constructor(t){super(zS,HS),this.gamma=1,this.saturation=1,this.contrast=1,this.brightness=1,this.red=1,this.green=1,this.blue=1,this.alpha=1,Object.assign(this,t)}apply(t,r,n,i){this.uniforms.gamma=Math.max(this.gamma,1e-4),this.uniforms.saturation=this.saturation,this.uniforms.contrast=this.contrast,this.uniforms.brightness=this.brightness,this.uniforms.red=this.red,this.uniforms.green=this.green,this.uniforms.blue=this.blue,this.uniforms.alpha=this.alpha,t.applyFilter(this,r,n,i)}}var bi=(e=>(e.BlackAndWhite="BlackAndWhite",e.Sepia="Sepia",e.RetroVintage="RetroVintage",e.NightVision="NightVision",e.Normal="Normal",e.None="Normal",e))(bi||{});class Qo{constructor(t=0,r=0,n=0,i=0){this._x=Number(t),this._y=Number(r),this._width=Number(n),this._height=Number(i),this._hull=[new xt,new xt,new xt,new xt],this.currentID=-1,this.dirtyID=0}get x(){return this._x}set x(t){this._x=t,this.dirtyID++}get y(){return this._y}set y(t){this._y=t,this.dirtyID++}get width(){return this._width}set width(t){this._width=t,this.dirtyID++}get height(){return this._height}set height(t){this._height=t,this.dirtyID++}get hull(){return this.isDirty()&&this.update(),this._hull}get topLeft(){return this.isDirty()&&this.update(),this._hull[0]}get topRight(){return this.isDirty()&&this.update(),this._hull[1]}get bottomRight(){return this.isDirty()&&this.update(),this._hull[2]}get bottomLeft(){return this.isDirty()&&this.update(),this._hull[3]}isDirty(){return this.currentID!==this.dirtyID}update(){const[t,r,n,i]=this._hull;t.set(this._x,this._y),r.set(this._x+this._width,this._y),n.set(this._x+this._width,this._y+this._height),i.set(this._x,this._y+this._height)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}clone(){return new Qo(this.x,this.y,this.width,this.height)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}contains(t,r){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&r>=this.y&&r<this.y+this.height}equals(t){return t?t.x===this.x&&t.y===this.y&&t.width===this.width&&t.height===this.height:!1}pad(t=0,r=t){return this.x-=t,this.y-=r,this.width+=t*2,this.height+=r*2,this}fit(t){const r=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),s=Math.min(this.y+this.height,t.y+t.height);return this.x=r,this.width=Math.max(n-r,0),this.y=i,this.height=Math.max(s-i,0),this}ceil(t=1,r=.001){const n=Math.ceil((this.x+this.width-r)*t)/t,i=Math.ceil((this.y+this.height-r)*t)/t;return this.x=Math.floor((this.x+r)*t)/t,this.y=Math.floor((this.y+r)*t)/t,this.width=n-this.x,this.height=i-this.y,this}enlarge(t){const r=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),s=Math.max(this.y+this.height,t.y+t.height);return this.x=r,this.width=n-r,this.y=i,this.height=s-i,this}}const Cg=new xt;class Jo{constructor(t=0,r=0,n=0,i=0,s=0){t instanceof Qo&&(s=r||0,r=t.y,n=t.width,i=t.height,t=t.x),this.innerBounds=new Qo(t,r,n,i),this._rotation=s,this._center=new Jr(this.updateCenter,this),this._hull=[new xt,new xt,new xt,new xt],this._matrix=new ee,this.currentID=-1,this.dirtyID=0}get rotation(){return this._rotation}set rotation(t){this._rotation=t,this.dirtyID++}get center(){return this.isDirty()&&this.update(),this._center}set center(t){this.center.copyFrom(t)}get hull(){return this.isDirty()&&this.update(),this._hull}get topLeft(){return this.isDirty()&&this.update(),this._hull[0]}get topRight(){return this.isDirty()&&this.update(),this._hull[1]}get bottomRight(){return this.isDirty()&&this.update(),this._hull[2]}get bottomLeft(){return this.isDirty()&&this.update(),this._hull[3]}equals(t){return t?this.innerBounds.equals(t.innerBounds)&&this.rotation===t.rotation:!1}contains(t,r){typeof t=="number"&&(t=Cg.set(t,r));const n=this._matrix.applyInverse(t,Cg);return this.innerBounds.contains(n.x,n.y)}copyFrom(t){return this.innerBounds.copyFrom(t.innerBounds),this.rotation=t.rotation,this.dirtyID++,this}isDirty(){return this.currentID!==this.dirtyID+this.innerBounds.dirtyID}update(){const t=this.innerBounds,r=this._rotation,n=this._center,[i,s,a,o]=this._hull,c=this._matrix;n._x=t.x+t.width/2,n._y=t.y+t.height/2,c.identity().translate(-n.x,-n.y).rotate(r).translate(n.x,n.y),c.apply(t.topLeft,i),c.apply(t.topRight,s),c.apply(t.bottomRight,a),c.apply(t.bottomLeft,o),this.currentID=this.dirtyID+this.innerBounds.dirtyID}updateCenter(){const t=this.center,r=this.innerBounds;r.x=t.x-r.width/2,r.y=t.y-r.height/2}}class Og{constructor(t,r){this._history=new Array(t),this._decayRatio=r,this._currentIndex=0;for(let n=0;n<t;n++)this._history[n]=0}next(t){const{_history:r,_decayRatio:n}=this,i=r.length;this._currentIndex=this._currentIndex<i-1?this._currentIndex+1:0,r[this._currentIndex]=t;let s=0,a=0;for(let o=this._currentIndex+1;o<i;o++)s=(s+r[o])*n,a=(a+1)*n;for(let o=0;o<=this._currentIndex;o++)s=(s+r[o])*n,a=(a+1)*n;return this._average=s/a,this._average}absDev(){let t=0;for(let r=0,n=this._history.length;r<n;r++)t+=Math.abs(this._history[r]-this._average);return t/this._history.length}}class tl{constructor(t={}){tl.prototype.__init.call(this),this._freeList=[],this._freeCount=0,this._borrowRate=0,this._returnRate=0,this._flowRate=0,this._borrowRateAverage=0,this._reserveCount=t.reserve||0,this._capacityRatio=t.capacityRatio||1.2,this._decayRatio=t.decayRatio||.67,this._marginAverage=0,this._borrowRateAverageProvider=new Og(128,this._decayRatio),this._marginAverageProvider=new Og(128,this._decayRatio)}get capacity(){return this._freeList.length}set capacity(t){this._freeList.length=Math.ceil(t)}allocate(){return++this._borrowRate,++this._flowRate,this._freeCount>0?this._freeList[--this._freeCount]:this.create()}allocateArray(t){let r,n;Array.isArray(t)?(r=t,n=t.length):(n=t,r=new Array(n)),this._borrowRate+=n,this._flowRate+=n;let i=0;if(this._freeCount>0){const s=this._freeList,a=Math.min(this._freeCount,n);let o=this._freeCount;for(let c=0;c<a;c++)r[i]=s[o-1],++i,--o;this._freeCount=o}for(;i<n;)r[i]=this.create(),++i;return r}release(t){++this._returnRate,--this._flowRate,this._freeCount===this.capacity&&(this.capacity*=this._capacityRatio),this._freeList[this._freeCount]=t,++this._freeCount}releaseArray(t){this._returnRate+=t.length,this._flowRate-=t.length,this._freeCount+t.length>this.capacity&&(this.capacity=Math.max(this.capacity*this._capacityRatio,this._freeCount+t.length));for(let r=0,n=t.length;r<n;r++)this._freeList[this._freeCount]=t[r],++this._freeCount}reserve(t){if(this._reserveCount=t,this._freeCount<t){const r=this._freeCount-t;for(let n=0;n<r;n++)this._freeList[this._freeCount]=this.create(),++this._freeCount}}limit(t){if(this._freeCount>t){this.capacity>t*this._capacityRatio&&(this.capacity=t*this._capacityRatio);const n=Math.min(this._freeCount,this.capacity);for(let i=t;i<n;i++)this._freeList[i]=null}}startGC(t=me.shared){t.add(this._gcTick,null,Qi.UTILITY)}stopGC(t=me.shared){t.remove(this._gcTick)}__init(){this._gcTick=()=>{this._borrowRateAverage=this._borrowRateAverageProvider.next(this._borrowRate),this._marginAverage=this._marginAverageProvider.next(this._freeCount-this._borrowRate);const t=this._borrowRateAverageProvider.absDev();this._flowRate=0,this._borrowRate=0,this._returnRate=0;const r=this._freeCount,n=this._freeList.length;if(r<128&&this._borrowRateAverage<128&&n<128)return;const i=Math.max(this._borrowRateAverage*(this._capacityRatio-1),this._reserveCount);if(this._freeCount>i+t){const s=i+t;this.capacity=Math.min(this._freeList.length,Math.ceil(s)),this._freeCount=this._freeList.length}}}}var oh;const Pg=new Map;class Ig{static build(t){let r=Pg.get(t);return r||(r=new class extends tl{create(){return new t}},Pg.set(t,r),r)}static buildFunctional(t){return new(oh=class extends tl{constructor(...n){super(...n),oh.prototype.__init.call(this)}__init(){this.create=t}},oh)}}const kg={color:16777215,outlineColor:0,outlineThickness:1,radius:8,shape:"tooth"},GS=mr;class qS extends GS{constructor(t,r,n={},i,s,a){super(),this.transformer=t;const o=Object.assign({},kg,n);this._handle=r,this._style=o,this.onHandleDelta=i,this.onHandleCommit=s,this._dirty=!0,this.interactive=!0,this.cursor=a||"move",this._pointerDown=!1,this._pointerDragging=!1,this._pointerPosition=new xt,this._pointerMoveTarget=null,this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onpointerdown=this.onPointerDown,this.onpointermove=this.onPointerMove,this.onpointerup=this.onPointerUp,this.onpointerupoutside=this.onPointerUp}get handle(){return this._handle}set handle(t){this._handle=t,this._dirty=!0}get style(){return this._style}set style(t){this._style=Object.assign({},kg,t),this._dirty=!0}render(t){this._dirty&&(this.draw(),this._dirty=!1),super.render(t)}draw(){const t=this._handle,r=this._style,n=r.radius;if(this.clear().lineStyle(r.outlineThickness,r.outlineColor).beginFill(r.color),r.shape==="square")this.drawRect(-n/2,-n/2,n,n);else if(r.shape==="tooth")switch(t){case"middleLeft":this.drawPolygon([-n/2,-n/2,-n/2,n/2,n/2,n/2,n*1.1,0,n/2,-n/2]);break;case"topCenter":this.drawPolygon([-n/2,-n/2,n/2,-n/2,n/2,n/2,0,n*1.1,-n/2,n/2]);break;case"middleRight":this.drawPolygon([-n/2,n/2,-n*1.1,0,-n/2,-n/2,n/2,-n/2,n/2,n/2]);break;case"bottomCenter":this.drawPolygon([0,-n*1.1,n/2,-n/2,n/2,n/2,-n/2,n/2,-n/2,-n/2]);break;case"rotator":this.drawCircle(0,0,n/Math.sqrt(2));break;default:this.drawRect(-n/2,-n/2,n,n);break}else this.drawCircle(0,0,n);this.endFill()}onPointerDown(t){this._pointerDown=!0,this._pointerDragging=!1,t.stopPropagation(),this._pointerMoveTarget&&(this._pointerMoveTarget.removeEventListener("globalpointermove",this.onPointerMove),this._pointerMoveTarget=null),this._pointerMoveTarget=this.transformer.stage||this,this._pointerMoveTarget.addEventListener("globalpointermove",this.onPointerMove)}onPointerMove(t){this._pointerDown&&(this._pointerDragging?this.onDrag(t):this.onDragStart(t),t.stopPropagation())}onPointerUp(t){this._pointerDragging&&this.onDragEnd(t),this._pointerDown=!1,this._pointerMoveTarget&&(this._pointerMoveTarget.removeEventListener("globalpointermove",this.onPointerMove),this._pointerMoveTarget=null)}onDragStart(t){this._pointerPosition.copyFrom(t.data.global),this._pointerDragging=!0}onDrag(t){const r=t.data.global;this.onHandleDelta&&this.onHandleDelta(r),this._pointerPosition.copyFrom(r)}onDragEnd(t){this._pointerDragging=!1,this.onHandleCommit&&this.onHandleCommit()}}function el(e,t,r,n){const{x:i,y:s}=r,{x:a,y:o}=n;if(Math.abs(a-i)<.01)return Math.abs(e-i);if(Math.abs(o-s)<.01)return Math.abs(t-s);const c=(o-s)/(a-i);return Math.abs((c*e-t+(o-c*a))/Math.sqrt(c*c+1))}const Rg=Ig.build(xt),VS=[new xt,new xt,new xt,new xt],WS=new ee,as=new xt,XS=[0,0,0,1,-1,1,-1,-1,1,-1,1,0],YS=[0,0,-1,0,-1,-1,1,-1,1,1,0,1],KS=[0,0,1,0,1,1,-1,1,-1,-1,0,-1],ZS=[0,0,0,-1,1,-1,1,1,-1,1,-1,0],lh=new Array(12),QS=[XS,YS,KS,ZS],JS=mr;class tE extends JS{constructor(t){super(),this.transformer=t,this.boxScalingHandles=[this.addChild(new mr),this.addChild(new mr),this.addChild(new mr),this.addChild(new mr)],this.boxScalingHandles.forEach(r=>{r.interactive=!0}),this.boxScalingHandles[0].cursor=ha.topCenter,this.boxScalingHandles[1].cursor=ha.middleRight,this.boxScalingHandles[2].cursor=ha.bottomCenter,this.boxScalingHandles[3].cursor=ha.middleLeft}hitHandleType(t,r,n){const{boxRotationEnabled:i,boxRotationTolerance:s,boxScalingEnabled:a,boxScalingTolerance:o}=this.transformer,[c,h,d,p]=t.hull,{x:f,y:m}=r.applyInverse(n,as);if(a){const g=el(f,m,c,h)*r.d,v=el(f,m,c,p)*r.a,_=el(f,m,h,d)*r.a,b=el(f,m,p,d)*r.d,w=Math.min(g,v,_,b);if(w<o)switch(w){case g:return"topCenter";case v:return"middleLeft";case _:return"middleRight";case b:return"bottomCenter"}}if(i&&!t.contains(f,m)){const g=Math.sqrt((c.x-f)**2+(c.y-m)**2),v=Math.sqrt((h.x-f)**2+(h.y-m)**2),_=Math.sqrt((p.x-f)**2+(p.y-m)**2),b=Math.sqrt((d.x-f)**2+(d.y-m)**2),w=Math.min(g,v,_,b);if(w<s*1.45)switch(w){case g:return"boxRotateTopLeft";case v:return"boxRotateTopRight";case _:return"boxRotateBottomLeft";case b:return"boxRotateBottomRight"}}return null}drawBounds(t){const r=VS;for(let n=0;n<4;n++)this.transformer.projectToLocal(t.hull[n],r[n]);this.drawPolygon(r)}drawBoxScalingTolerance(t,r=this.transformer.boxScalingTolerance){t.innerBounds.pad(-r);const n=Rg.allocateArray(4);n.forEach((s,a)=>{this.projectToLocal(t.hull[a],s)}),t.innerBounds.pad(2.5*r);const i=Rg.allocateArray(4);i.forEach((s,a)=>{this.projectToLocal(t.hull[a],s)}),t.innerBounds.pad(-1.5*this.transformer.boxScalingTolerance);for(let s=0;s<4;s++){const a=n[s],o=n[(s+1)%4],c=i[s],h=i[(s+1)%4];this.boxScalingHandles[s].clear().beginFill(16777215,1e-4).drawPolygon(a,c,h,o).endFill()}}drawBoxRotationTolerance(){const{boxRotateTopLeft:t,boxRotateTopRight:r,boxRotateBottomLeft:n,boxRotateBottomRight:i}=this.transformer.handleAnchors,s=this.transformer.boxRotationTolerance*2,a=WS.identity().scale(s,s).rotate(this.transformer.getGroupBounds().rotation);for(let o=0;o<4;o++){const c=QS[o];let h;switch(o){case 0:h=t;break;case 1:h=r;break;case 2:h=n;break;case 3:h=i;break}for(let d=0;d<c.length;d+=2){const p=c[d],f=c[d+1];as.set(p,f),a.apply(as,as),lh[d]=as.x+h.x,lh[d+1]=as.y+h.y}this.drawPolygon(lh.slice())}}projectToLocal(t,r){return this.transformer.projectToLocal(t,r)}}const Ng=new ee;function Mg(e){const t=Ng.identity();return t.c=Math.tan(e),t}function Lg(e){const t=Ng.identity();return t.b=Math.tan(e),t}function Bg(e,t,r,n=e.pivot){const i=t.a,s=t.b,a=t.c,o=t.d,c=-Math.atan2(-a,o),h=Math.atan2(s,i);return r=r??h,e.pivot.set(n.x,n.y),e.rotation=r,e.skew.x=r+c,e.skew.y=-r+h,e.scale.x=Math.sqrt(i*i+s*s),e.scale.y=Math.sqrt(a*a+o*o),e.position.x=t.tx+(n.x*t.a+n.y*t.c),e.position.y=t.ty+(n.x*t.b+n.y*t.d),e}const rl=new ee,eE=new ee;function rE(e,t,r){if(!r){const s=e.parent?e.parent:e.enableTempParent();e.updateTransform(),e.disableTempParent(s)}const n=e.worldTransform,i=e.parent?eE.copyFrom(e.parent.worldTransform):ee.IDENTITY;rl.copyFrom(n),rl.prepend(t),rl.prepend(i.invert()),Bg(e.transform,rl)}const nl=new Ws,nE=[new xt,new xt,new xt,new xt],os=new ee,ls=new xt,uh=new Jo,iE=new Vt,Fg=[new xt,new xt,new xt,new xt],Dg=new xt,Ug=new ee,il=Ig.build(xt),ha={topLeft:"nw-resize",topCenter:"n-resize",topRight:"ne-resize",middleLeft:"w-resize",middleRight:"e-resize",bottomLeft:"sw-resize",bottomCenter:"s-resize",bottomRight:"se-resize"},sl=["topLeft","topCenter","topRight","middleLeft","middleCenter","middleRight","bottomLeft","bottomCenter","bottomRight"],jg={topLeft:{x:-1,y:-1},topCenter:{x:0,y:-1},topRight:{x:1,y:-1},middleLeft:{x:-1,y:0},middleCenter:{x:0,y:0},middleRight:{x:1,y:0},bottomLeft:{x:-1,y:1},bottomCenter:{x:0,y:1},bottomRight:{x:1,y:1}},sE=[...sl,"rotator","skewHorizontal","skewVertical"],aE=4,oE=16,lE=[Math.PI/4,Math.PI/2,Math.PI*3/4,Math.PI,0,-Math.PI/4,-Math.PI/2,-Math.PI*3/4,-Math.PI],uE=Math.PI/90,cE=[Math.PI/4,-Math.PI/4],hE=Math.PI/90,$g={color:0,thickness:2},fE=Ke;let dE=class Er extends fE{constructor(t={}){super(),Er.prototype.__init.call(this),Er.prototype.__init2.call(this),Er.prototype.__init3.call(this),Er.prototype.__init4.call(this),Er.prototype.__init5.call(this),this.interactive=!0,this.cursors=Object.assign({default:"move"},t.cursors),this.cursor=this.cursors.default,this.boundingBoxes=t.boundingBoxes||"all",this.group=t.group||[],this.boxRotationTolerance=t.boxRotationTolerance||oE,this.boxScalingTolerance=t.boxScalingTolerance||aE,this.centeredScaling=!!t.centeredScaling,this.projectionTransform=new ee,this.lockAspectRatio=t.lockAspectRatio===!0,this.rotationSnaps=t.rotationSnaps||lE,this.rotationSnapTolerance=t.rotationSnapTolerance!==void 0?t.rotationSnapTolerance:uE,this.skewRadius=t.skewRadius||64,this.skewSnaps=t.skewSnaps||cE,this.skewSnapTolerance=t.skewSnapTolerance!==void 0?t.skewSnapTolerance:hE,this.boxRotationEnabled=t.boxRotationEnabled===!0,this.boxScalingEnabled=t.boxScalingEnabled===!0,this._rotateEnabled=t.rotateEnabled!==!1,this._scaleEnabled=t.scaleEnabled!==!1,this._skewEnabled=t.skewEnabled===!0,this.translateEnabled=t.translateEnabled!==!1,this.transientGroupTilt=t.transientGroupTilt!==void 0?t.transientGroupTilt:!0,this.wireframe=this.addChild(new tE(this)),this.wireframe.cursor="none",this.stage=t.stage||null,this._skewX=0,this._skewY=0,this._transformType="none",this._wireframeStyle=Object.assign({},$g,t.wireframeStyle||{});const r=t.handleConstructor||qS,n=t.handleStyle||{};this._handleStyle=n;const i={rotator:this.addChild(new r(this,"rotator",n,o=>{this.rotateGroup("rotator",o)},this.commitGroup))},s=sl.reduce((o,c)=>{const h=new r(this,c,n,null,this.commitGroup,ha[c]);return h.onHandleDelta=d=>{this.scaleGroup(h.handle,d)},h.visible=this._scaleEnabled,o[c]=h,this.addChild(o[c]),o},{}),a={skewHorizontal:this.addChild(new r(this,"skewHorizontal",n,o=>{this.skewGroup("skewHorizontal",o)},this.commitGroup,"pointer")),skewVertical:this.addChild(new r(this,"skewVertical",n,o=>{this.skewGroup("skewVertical",o)},this.commitGroup,"pointer"))};this.handles=Object.assign({},s,i,a),this.handles.middleCenter.visible=!1,this.handles.skewHorizontal.visible=this._skewEnabled,this.handles.skewVertical.visible=this._skewEnabled,this.handleAnchors={rotator:new xt,boxRotateTopLeft:new xt,boxRotateTopRight:new xt,boxRotateBottomLeft:new xt,boxRotateBottomRight:new xt,topLeft:new xt,topCenter:new xt,topRight:new xt,middleLeft:new xt,middleCenter:new xt,middleRight:new xt,bottomLeft:new xt,bottomCenter:new xt,bottomRight:new xt,skewHorizontal:new xt,skewVertical:new xt},this.groupBounds=new Jo,this.updateGroupBounds(),this._pointerDown=!1,this._pointerDragging=!1,this._pointerPosition=new xt,this._pointerMoveTarget=null,this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.addEventListener("pointerdown",this.onPointerDown),this.addEventListener("pointerup",this.onPointerUp),this.addEventListener("pointerupoutside",this.onPointerUp)}get enabledHandles(){return this._enabledHandles}set enabledHandles(t){!this._enabledHandles&&!t||(this._enabledHandles=t,sE.forEach(r=>{this.handles[r].visible=!1}),t?t.forEach(r=>{this.handles[r].visible=!0}):(this.handles.rotator.visible=this._rotateEnabled,this.handles.skewHorizontal.visible=this._skewEnabled,this.handles.skewVertical.visible=this._skewEnabled,sl.forEach(r=>{r!=="middleCenter"&&(this.handles[r].visible=this._scaleEnabled)})))}get handleStyle(){return this._handleStyle}set handleStyle(t){const r=this.handles;for(const n in r)r[n].style=t;this._handleStyle=t}get rotateEnabled(){return this._rotateEnabled}set rotateEnabled(t){if(this._rotateEnabled!==t){if(this._rotateEnabled=t,this._enabledHandles)return;this.handles.rotator.visible=t}}get scaleEnabled(){return this._scaleEnabled}set scaleEnabled(t){if(this._scaleEnabled!==t){if(this._scaleEnabled=t,this._enabledHandles)return;sl.forEach(r=>{r!=="middleCenter"&&(this.handles[r].visible=t)})}}get skewEnabled(){return this._skewEnabled}set skewEnabled(t){if(this._skewEnabled!==t){if(this._skewEnabled=t,this._enabledHandles)return;this.handles.skewHorizontal.visible=t,this.handles.skewVertical.visible=t}}get transformType(){return this._transformType}get wireframeStyle(){return this._wireframeStyle}set wireframeStyle(t){this._wireframeStyle=Object.assign({},$g,t)}getGroupBounds(t=!1){return t&&this.updateGroupBounds(),this.groupBounds}__init(){this.translateGroup=t=>{this._transformHandle=null,this._transformType="translate";const r=os.identity().translate(t.x,t.y);this.prependTransform(r)}}__init2(){this.rotateGroup=(t,r)=>{this._transformHandle=t,this._transformType="rotate";const n=this.groupBounds,i=this.worldTransform.apply(this.handleAnchors[t],ls);this.projectionTransform.applyInverse(i,i),r=this.projectionTransform.applyInverse(r,Dg);const s=n.center,a=Math.atan2(i.y-s.y,i.x-s.x);let c=Math.atan2(r.y-s.y,r.x-s.x)-a,h=this.groupBounds.rotation+c;h=this.snapAngle(h,this.rotationSnapTolerance,this.rotationSnaps),c=h-this.groupBounds.rotation;const d=os.identity().translate(-s.x,-s.y).rotate(c).translate(s.x,s.y);this.prependTransform(d,!0),this.updateGroupBounds(h),this._skewX+=c,this._skewY+=c}}__init3(){this.scaleGroup=(t,r)=>{this._transformHandle=t,this._transformType="scale";const n=jg[t].x,i=jg[t].y,s=this.handles,a=this.groupBounds,o=a.rotation,c=a.innerBounds,h=this.worldTransform.apply(this.handleAnchors[t],ls);this.projectionTransform.applyInverse(h,h),r=this.projectionTransform.applyInverse(r,Dg);const d=r.x-h.x,p=r.y-h.y,f=(a.topRight.x-a.topLeft.x)/c.width,m=(a.topRight.y-a.topLeft.y)/c.width,g=(a.bottomLeft.x-a.topLeft.x)/c.height,v=(a.bottomLeft.y-a.topLeft.y)/c.height,_=d*f+p*m,b=d*g+p*v;let w=1+_*n/c.width,T=1+b*i/c.height;this.lockAspectRatio&&(t==="topLeft"||t==="topRight"||t==="bottomLeft"||t==="bottomRight")&&(w>T?T=w:w=T);const A=os.identity();if(n!==0&&w!==0){const I=this.centeredScaling?a.center:n===1?a.topLeft:a.topRight;A.translate(-I.x,-I.y).rotate(-o).scale(w,1).rotate(o).translate(I.x,I.y)}if(i!==0&&T!==0){const I=this.centeredScaling?a.center:i===1?a.topLeft:a.bottomLeft;A.translate(-I.x,-I.y).rotate(-o).scale(1,T).rotate(o).translate(I.x,I.y)}if((T<0||w<0)&&!(T<0&&w<0))switch(t){case"topLeft":case"bottomLeft":this.swapHandles(s.topLeft,s.bottomLeft);break;case"topCenter":case"bottomCenter":this.swapHandles(s.topCenter,s.bottomCenter);break;case"topRight":case"bottomRight":this.swapHandles(s.topRight,s.bottomRight);break}this.prependTransform(A)}}__init4(){this.skewGroup=(t,r)=>{this._transformHandle=t,this._transformType="skew";const n=this.groupBounds,i=ls.copyFrom(r);this.projectionTransform.applyInverse(i,i);const s=n.center,a=os.identity().translate(-s.x,-s.y);let o=this.groupBounds.rotation;if(t==="skewHorizontal"){const c=this._skewX;this._skewX=Math.atan2(i.y-s.y,i.x-s.x),this._skewX=this.snapAngle(this._skewX,this.skewSnapTolerance,this.skewSnaps),a.prepend(Lg(-c)),a.prepend(Lg(this._skewX))}else{const c=this._skewY,h=Math.atan2(i.y-s.y,i.x-s.x)-Math.PI/2;this._skewY=h,this._skewY=this.snapAngle(this._skewY,this.skewSnapTolerance,this.skewSnaps),a.prepend(Mg(c)),a.prepend(Mg(-this._skewY)),o-=this._skewY-c}a.translate(s.x,s.y),this.prependTransform(a,!0),this.updateGroupBounds(o)}}__init5(){this.commitGroup=()=>{this._transformHandle=null,this._transformType="none",this.transientGroupTilt!==!1&&this.group.length>1&&this.updateGroupBounds(0),this.emit("transformcommit")}}render(t){this.renderable&&this.visible&&(!this.lazyMode||this.lazyDirty)&&this.draw(),super.render(t)}draw(){const t=this.group,{color:r,thickness:n}=this._wireframeStyle;this.wireframe.clear(),this.boundingBoxes!=="none"&&this.wireframe.lineStyle(n,r),this.translateEnabled&&this.wireframe.beginFill(16777215,1e-4);for(let s=0,a=t.length;s<a&&this.boundingBoxes==="all";s++)this.wireframe.drawBounds(Er.calculateOrientedBounds(t[s],uh));const i=t.length!==1?Er.calculateGroupOrientedBounds(t,this.groupBounds.rotation,uh,!0):Er.calculateOrientedBounds(t[0],uh);this.wireframe.drawBounds(i),this.drawHandles(i),this.groupBounds.copyFrom(i),this.boxRotationEnabled&&(this.wireframe.closePath().beginFill(16777215,1e-4).lineStyle(),this.wireframe.drawBoxRotationTolerance()),this.boxScalingEnabled&&(this.wireframe.closePath().beginFill(16773375,1e-4).lineStyle(),this.wireframe.drawBoxScalingTolerance(i)),this.lazyDirty=!1}drawHandles(t){const r=this.handles,n=this.handleAnchors,{topLeft:i,topRight:s,bottomLeft:a,bottomRight:o,center:c}=t,[h,d,p,f]=Fg,m=ls;if(this.projectToLocal(i,h),this.projectToLocal(s,d),this.projectToLocal(a,p),this.projectToLocal(o,f),this.projectToLocal(c,m),n.topLeft.copyFrom(h),n.topCenter.set((h.x+d.x)/2,(h.y+d.y)/2),n.topRight.copyFrom(d),n.middleLeft.set((h.x+p.x)/2,(h.y+p.y)/2),n.middleCenter.set((h.x+f.x)/2,(h.y+f.y)/2),n.middleRight.set((d.x+f.x)/2,(d.y+f.y)/2),n.bottomLeft.copyFrom(p),n.bottomCenter.set((p.x+f.x)/2,(p.y+f.y)/2),n.bottomRight.copyFrom(f),this.boxRotationEnabled&&(n.boxRotateTopLeft.copyFrom(n.topLeft),n.boxRotateTopRight.copyFrom(n.topRight),n.boxRotateBottomLeft.copyFrom(n.bottomLeft),n.boxRotateBottomRight.copyFrom(n.bottomRight)),this._rotateEnabled){const g=(h.x+d.x)/2,v=(h.y+d.y)/2;let _=-(h.y-d.y),b=h.x-d.x;const w=Math.sqrt(_*_+b*b);_*=32/w,b*=32/w,r.rotator.position.x=g+_,r.rotator.position.y=v+b,this.wireframe.moveTo(g,v).lineTo(r.rotator.position.x,r.rotator.position.y),this.handleAnchors.rotator.copyFrom(r.rotator.position)}if(this._skewEnabled){const g=m.x,v=m.y;this.worldTransform.apply(m,m),n.skewHorizontal.set(m.x+Math.cos(this._skewX)*this.skewRadius,m.y+Math.sin(this._skewX)*this.skewRadius),n.skewVertical.set(m.x+-Math.sin(this._skewY)*this.skewRadius,m.y+Math.cos(this._skewY)*this.skewRadius),this.worldTransform.applyInverse(n.skewHorizontal,n.skewHorizontal),this.worldTransform.applyInverse(n.skewVertical,n.skewVertical),m.set(g,v),this.wireframe.beginFill(this.wireframeStyle.color).drawCircle(m.x,m.y,this.wireframeStyle.thickness*2).endFill(),this.wireframe.moveTo(m.x,m.y).lineTo(r.skewHorizontal.x,r.skewHorizontal.y).moveTo(m.x,m.y).lineTo(r.skewVertical.x,r.skewVertical.y)}for(const g in r){let v=this.groupBounds.rotation;g==="skewHorizontal"?v=this._skewX:g==="skewVertical"&&(v=this._skewY);const _=r[g];_.rotation=v,_.position.copyFrom(n[g]),_.getBounds(!1,iE)}}onPointerDown(t){this._pointerDown=!0,this._pointerDragging=!1,t.stopPropagation(),this._pointerMoveTarget&&(this._pointerMoveTarget.removeEventListener("globalpointermove",this.onPointerMove),this._pointerMoveTarget=null),this._pointerMoveTarget=this.stage||this,this._pointerMoveTarget.addEventListener("globalpointermove",this.onPointerMove)}onPointerMove(t){const r=this._pointerPosition,n=il.allocate().copyFrom(t.data.global),i=this.wireframe.hitHandleType(this.groupBounds,this.projectionTransform,n);if(!this._pointerDown)this.setCursorFromHoveredHandle(i);else{const s=n.x,a=n.y;if(this._pointerDragging)switch(this._transformHandle){case"boxRotateTopLeft":case"boxRotateTopRight":case"boxRotateBottomLeft":case"boxRotateBottomRight":this.rotateGroup(this._transformHandle,n);break;case"topCenter":case"middleLeft":case"middleRight":case"bottomCenter":this.scaleGroup(this._transformHandle,n);break;default:if(this.translateEnabled){const[o,c,h]=Fg;o.set(0,0),c.set(n.x-r.x,n.y-r.y),this.projectionTransform.applyInverse(o,o),this.projectionTransform.applyInverse(c,c),h.set(c.x-o.x,c.y-o.y),this.translateGroup(h)}}else this._transformHandle=this.wireframe.hitHandleType(this.groupBounds,this.projectionTransform,n),this.setCursorFromHoveredHandle(i);this._pointerPosition.x=s,this._pointerPosition.y=a,this._pointerDragging=!0,t.stopPropagation()}il.release(n)}onPointerUp(t){this._pointerDragging=!1,this._pointerDown=!1,this.commitGroup(),t.stopPropagation(),this._pointerMoveTarget&&(this._pointerMoveTarget.removeEventListener("globalpointermove",this.onPointerMove),this._pointerMoveTarget=null)}prependTransform(t,r=!1){const n=this.group;for(let i=0,s=n.length;i<s;i++)rE(n[i],t,!1);Ug.copyFrom(t),r||this.updateGroupBounds(),this.emit("transformchange",Ug)}updateGroupBounds(t=this.groupBounds.rotation){Er.calculateGroupOrientedBounds(this.group,t,this.groupBounds),this.drawHandles(this.groupBounds),this.lazyDirty=!0}snapAngle(t,r,n){if(t=t%(Math.PI*2),!n||n.length===1||!r)return t;for(let i=0,s=n.length;i<s;i++)if(Math.abs(t-n[i])<=r)return n[i];return t}swapHandles(t,r){const n=t.handle,i=r.handle,s=t.cursor,a=r.cursor,o=t.x,c=r.x,h=t.y,d=r.y;t.handle=i,r.handle=n,t.position.set(c,d),r.position.set(o,h),t.cursor=a,r.cursor=s,this.handles[n]=r,this.handles[i]=t,this._transformHandle===n?this._transformHandle=i:this._transformHandle===i&&(this._transformHandle=n)}setCursorFromHoveredHandle(t){if(t&&t.startsWith("boxRotate"))this.cursor=this.cursors.boxRotate||this.cursors.default;else if(t)switch(t){case"topCenter":this.cursor=this.cursors.boxScaleTop||this.cursors.default;break;case"middleLeft":this.cursor=this.cursors.boxScaleLeft||this.cursors.default;break;case"middleRight":this.cursor=this.cursors.boxScaleRight||this.cursors.default;break;case"bottomCenter":this.cursor=this.cursors.boxScaleBottom||this.cursors.default;break}else this.cursor=this.cursors.translate||this.cursors.default}projectToLocal(t,r){return r||(r=new xt),this.projectionTransform.apply(t,r),this.worldTransform.applyInverse(r,r),r}static calculateTransformedCorners(t,r=t.worldTransform,n,i=0){const s=t.getLocalBounds();return t.getBounds(),n=n||[new xt,new xt,new xt,new xt],n[i].set(s.x,s.y),n[i+1].set(s.x+s.width,s.y),n[i+2].set(s.x+s.width,s.y+s.height),n[i+3].set(s.x,s.y+s.height),r.apply(n[i],n[i]),r.apply(n[i+1],n[i+1]),r.apply(n[i+2],n[i+2]),r.apply(n[i+3],n[i+3]),n}static calculateOrientedBounds(t,r){const n=t.parent?t.parent:t.enableTempParent();t.updateTransform(),t.disableTempParent(n),Bg(nl,t.worldTransform),nl.updateLocalTransform();const i=nl.rotation,s=Er.calculateTransformedCorners(t,t.worldTransform,nE),a=(s[0].x+s[1].x+s[2].x+s[3].x)/4,o=(s[0].y+s[1].y+s[2].y+s[3].y)/4,c=os.identity().translate(-a,-o).rotate(-nl.rotation).translate(a,o);return c.apply(s[0],s[0]),c.apply(s[1],s[1]),c.apply(s[2],s[2]),c.apply(s[3],s[3]),r=r||new Jo,r.rotation=i,r.innerBounds.x=Math.min(s[0].x,s[1].x,s[2].x,s[3].x),r.innerBounds.y=Math.min(s[0].y,s[1].y,s[2].y,s[3].y),r.innerBounds.width=Math.max(s[0].x,s[1].x,s[2].x,s[3].x)-r.innerBounds.x,r.innerBounds.height=Math.max(s[0].y,s[1].y,s[2].y,s[3].y)-r.innerBounds.y,r}static calculateGroupOrientedBounds(t,r,n,i=!1){const s=t.length,a=il.allocateArray(s*4);for(let f=0;f<s;f++){const m=t[f];if(!i){const g=m.parent?m.parent:m.enableTempParent();m.updateTransform(),m.disableTempParent(g)}Er.calculateTransformedCorners(m,m.worldTransform,a,f*4)}const o=os.identity().rotate(-r);let c=Number.MAX_VALUE,h=Number.MAX_VALUE,d=-Number.MAX_VALUE,p=-Number.MAX_VALUE;for(let f=0,m=a.length;f<m;f++){const g=a[f];o.apply(g,g);const v=g.x,_=g.y;c=v<c?v:c,h=_<h?_:h,d=v>d?v:d,p=_>p?_:p}return il.releaseArray(a),n=n||new Jo,n.innerBounds.x=c,n.innerBounds.y=h,n.innerBounds.width=d-c,n.innerBounds.height=p-h,n.rotation=r,o.applyInverse(n.center,ls),n.center.copyFrom(ls),n}};function pE(e,t,r,n){for(const i in t){const s=r[i],a=n[i],o=t[i];s!==a&&(s&&e.off(o,s),a&&e.on(o,a))}}const al={},mE=ee.IDENTITY,gE={transformchange:"transformchange",transformcommit:"transformcommit"},yE=qt.PixiComponent("Transformer",{create:e=>new dE(e),applyProps(e,t,r){if(qt.applyDefaultProps(e,t,r),pE(e,gE,t,r),r.cursors&&Object.assign(e.cursors,r.cursors),e.group=r.group||[],e.boundingBoxes=r.boundingBoxes||"all",e.boxScalingEnabled=r.boxScalingEnabled===!0,e.boxScalingTolerance=r.boxScalingTolerance!==void 0?r.boxScalingTolerance:e.boxScalingTolerance,e.boxRotationEnabled=r.boxRotationEnabled===!0,e.boxRotationTolerance=r.boxRotationTolerance!==void 0?r.boxRotationTolerance:e.boxRotationTolerance,e.centeredScaling=r.centeredScaling,e.enabledHandles=r.enabledHandles,e.lockAspectRatio=r.lockAspectRatio,e.projectionTransform.copyFrom(r.projectionTransform||mE),e.skewRadius=r.skewRadius||e.skewRadius,e.rotateEnabled=r.rotateEnabled!==!1,e.scaleEnabled=r.scaleEnabled!==!1,e.skewEnabled=r.skewEnabled===!0,e.translateEnabled=r.translateEnabled!==!1,e.transientGroupTilt=r.transientGroupTilt,t.handleConstructor!==r.handleConstructor)throw new Error("Transformer does not support changing the TransformerHandleConstructor!");t.rotationSnaps!==r.rotationSnaps&&(e.rotationSnaps=r.rotationSnaps),t.rotationSnapTolerance!==r.rotationSnapTolerance&&(e.rotationSnapTolerance=r.rotationSnapTolerance),t.skewSnaps!==r.skewSnaps&&(e.skewSnaps=r.skewSnaps),t.skewSnapTolerance!==r.skewSnapTolerance&&(e.skewSnapTolerance=r.skewSnapTolerance);const n=t.handleStyle||al,i=r.handleStyle||al;(n.color!==i.color||n.outlineColor!==i.outlineColor||n.outlineThickness!==i.outlineThickness||n.radius!==i.radius||n.shape!==i.shape)&&(e.handleStyle=i);const s=t.wireframeStyle||al,a=r.wireframeStyle||al;(s.color!==a.color||s.thickness!==a.thickness)&&(e.wireframeStyle=a)}}),ch=({pixiTransformerRef:e,imageRef:t,isMounted:r,transformCommit:n,transformChange:i,mouseoverEvent:s,onDoubleClick:a,uniqueId:o=""})=>{const c=Cr.utils.string2hex("#F3C409"),h=Cr.utils.string2hex("#F3C409"),d=Mt.useRef({isDragging:!1}),p=Mt.useCallback(()=>{s&&!d.current.isDragging&&s(!0)},[s]),f=Mt.useCallback(()=>{s&&!d.current.isDragging&&s(!1)},[s]),m=Mt.useCallback(()=>{d.current.isDragging=!0},[]),g=Mt.useCallback(()=>{d.current.isDragging=!1},[]),v=Mt.useCallback(()=>{d.current.isDragging=!1},[]),_=Mt.useCallback(()=>{console.log("dobule click in pixi transformer"),a&&a({uniqueId:o})},[a]),b=Mt.useCallback(T=>{d.current.isDragging=!0,i&&i(T)},[i]),w=Mt.useCallback(()=>{if(t.current===null)return;const T=t.current.x,x=t.current.y,A=t.current.width,I=t.current.height,O=t.current.rotation,P=[t.current.scale.x,t.current.scale.y];n&&n({uniqueId:o,transformation:{x:Math.round(T),y:Math.round(x),width:Math.round(Math.max(5,A)),height:Math.round(Math.max(5,I)),rotate:Math.round(O),scale:P}}),d.current.isDragging=!1},[n]);return Mt.useEffect(()=>(e.current&&(e.current.on("mouseover",p),e.current.on("mouseout",f),e.current.on("mousedown",m),e.current.on("mouseup",g),e.current.on("mouseupoutside",v),e.current.addListener("dblclick",_)),()=>{e.current&&(e.current.off("mouseover",p),e.current.off("mouseout",f),e.current.off("mousedown",m),e.current.off("mouseup",g),e.current.off("mouseupoutside",v),e.current.removeListener("dblclick",_))}),[]),$t.jsx(yE,{ref:e,group:r?[t.current]:[],rotateEnabled:!0,boxRotationEnabled:!0,centeredScaling:!0,boxScalingEnabled:!0,wireframeStyle:{thickness:1,color:h},lockAspectRatio:!0,scaleEnabled:!0,handleStyle:{outlineColor:c,shape:"circle",radius:9},transformchange:b,transformcommit:w})};var ol={};Object.defineProperty(ol,"__esModule",{value:!0});var vE=dt,hh;function zg(){return hh||(hh=document.createElement("div")),hh}function _E(e,t,r){var n;return vE.useEffect(function(){n=n||zg();var i=function(s){var a=s.detail;t(a)};return n.addEventListener(e,i,!1),function(){n==null||n.removeEventListener(e,i,!1)}},r),function(i){n=i}}function bE(e,t){var r=zg(),n=new CustomEvent(e,{detail:t});r.dispatchEvent(n)}function xE(){var e;function t(r){e=r}return t.emit=function(r,n){var i=new CustomEvent(r,{bubbles:!0,detail:n});e==null||e.dispatchEvent(i)},t}var Hg=ol.emitCustomEvent=bE;ol.newCustomEventEmitter=xE;var ll=ol.useCustomEventListener=_E;function wE(e,t){const[r,n]=dt.useState(e);return dt.useEffect(()=>{const i=setTimeout(()=>n(e),t||500);return()=>{clearTimeout(i)}},[e,t]),r}const us=Mt.createContext({}),xi={STOP:"GSAP_STOP",PAUSE:"GSAP_PAUSE",PLAY:"GSAP_PLAY",RESUME:"GSAP_RESUME",RESTART:"GSAP_RESTART",REPEAT:"GSAP_REPEAT",SEEK:"GSAP_SEEK",RESET:"GSAP_RESET",DRAGGING_START:"GSAP_DRAGGING_START",DRAGGING_END:"GSAP_DRAGGING_END"},TE=({children:e})=>{const[t,r]=dt.useState(!1),[n,i]=dt.useState(!1),[s,a]=dt.useState(0),[o,c]=dt.useState(0),h=wE(s,600),d=dt.useRef(),p=dt.useRef(),f=dt.useRef(.001);dt.useLayoutEffect(()=>(p.current=Ar.context(()=>{d.current&&d.current.progress(0).kill(),d.current=Ar.timeline({paused:!0,defaults:{duration:0}})}),()=>p.current.revert()),[]),Ar.ticker.add(()=>{console.log("timeframe"),d.current&&T&&a(T())});const m=dt.useCallback(()=>{let O=d.current.time();f.current=O},[]);dt.useEffect(()=>{c(h)},[h]),dt.useEffect(()=>{const I=d.current;I.eventCallback("onStart",function(){}).eventCallback("onInterrupt",function(){r(!1),m()}).eventCallback("onUpdate",function(){m()}).eventCallback("onPause",function(){console.log("onPause",I.progress()),r(!1),m()}).eventCallback("onResume",function(){console.log("onResume",I.progress()),r(!0),m()}).eventCallback("onComplete",function(){I.seek(0),I.pause(),r(!1),m()})},[]),dt.useEffect(()=>{const I=d.current;t?(console.log("play=true; un-ending loop timeline"),I.resume()):(console.log("play=false;un-ending loop timeline"),I.pause())},[t]);const g=dt.useCallback(()=>{d.current.revert()},[]),v=dt.useCallback(()=>{d.current.restart(),r(!0)},[]),_=dt.useCallback(()=>{const I=d.current;I.repeat(1),I.restart()},[]),b=dt.useCallback(I=>{d.current.seek(I)},[]),w=dt.useCallback(()=>{d.current.seek(4)},[]),T=dt.useCallback(()=>{const I=d.current;return I?I.totalDuration():0},[]),x=()=>{d.current.pause(),Hg(xi.PAUSE),r(!1)},A=()=>{const I=d.current;r(!0),I.resume(),Hg(xi.RESUME)};return ll(xi.DRAGGING_START,()=>{console.log("dragging start"),i(!0)}),ll(xi.DRAGGING_END,()=>{i(!1),console.log("dragging end")}),console.log("set play updated",t),$t.jsx(us.Provider,{value:{gsapCtx:p,tl:d,handlePlay:A,handlePause:x,handleReset:g,handleSeek:b,handleSeekTest:w,handleRestart:v,handleRepeat:_,playerTimeRef:f,play:t,totalDuration:o,isDragging:n},children:e})},fh=e=>{let t={};switch(e){case"NONE":case"none":break;case"BOUNCE_IN":t.from={duration:2,ease:"bounce.out",y:-1500};break;case"BOUNCE_IN_DOWN":t.from={ease:"bounce.out",y:-1500,duration:2};break;case"BOUNCE_IN_LEFT":t.from={ease:"bounce.out",x:-1500,duration:2};break;case"BOUNCE_IN_RIGHT":t.from={ease:"bounce.out",x:1500,duration:2};break;case"BOUNCE_IN_UP":t.from={ease:"bounce.out",y:1500,duration:2};break;case"BOUNCE_OUT":t.from={ease:"bounce.in",y:2,duration:2};break;case"BOUNCE_OUT_DOWN":break;case"BOUNCE_OUT_LEFT":break;case"BOUNCE_OUT_RIGHT":break;case"BOUNCE_OUT_UP":break;case"FADE_IN":t.to={ease:"power4.in",alpha:1,duration:.5};break;case"FADE_IN_DOWN":t.fromTo={from:{y:-1e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break;case"FADE_IN_LEFT":t.fromTo={from:{x:-1e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_RIGHT":t.fromTo={from:{x:2e3,alpha:0},to:{ease:"power4.in",x:0,alpha:1,duration:1}};break;case"FADE_IN_UP":t.fromTo={from:{y:2e3,alpha:0},to:{ease:"power4.in",y:0,alpha:1,duration:1}};break}return t};var SE=Object.prototype;function EE(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||SE;return e===r}var Gg=EE;function AE(e,t){return function(r){return e(t(r))}}var CE=AE,OE=CE,PE=OE(Object.keys,Object),IE=PE,kE=Gg,RE=IE,NE=Object.prototype,ME=NE.hasOwnProperty;function LE(e){if(!kE(e))return RE(e);var t=[];for(var r in Object(e))ME.call(e,r)&&r!="constructor"&&t.push(r);return t}var qg=LE,BE=typeof Nn=="object"&&Nn&&Nn.Object===Object&&Nn,Vg=BE,FE=Vg,DE=typeof self=="object"&&self&&self.Object===Object&&self,UE=FE||DE||Function("return this")(),An=UE,jE=An,$E=jE.Symbol,ul=$E,Wg=ul,Xg=Object.prototype,zE=Xg.hasOwnProperty,HE=Xg.toString,fa=Wg?Wg.toStringTag:void 0;function GE(e){var t=zE.call(e,fa),r=e[fa];try{e[fa]=void 0;var n=!0}catch{}var i=HE.call(e);return n&&(t?e[fa]=r:delete e[fa]),i}var qE=GE,VE=Object.prototype,WE=VE.toString;function XE(e){return WE.call(e)}var YE=XE,Yg=ul,KE=qE,ZE=YE,QE="[object Null]",JE="[object Undefined]",Kg=Yg?Yg.toStringTag:void 0;function tA(e){return e==null?e===void 0?JE:QE:Kg&&Kg in Object(e)?KE(e):ZE(e)}var da=tA;function eA(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var dh=eA,rA=da,nA=dh,iA="[object AsyncFunction]",sA="[object Function]",aA="[object GeneratorFunction]",oA="[object Proxy]";function lA(e){if(!nA(e))return!1;var t=rA(e);return t==sA||t==aA||t==iA||t==oA}var Zg=lA,uA=An,cA=uA["__core-js_shared__"],hA=cA,ph=hA,Qg=function(){var e=/[^.]+$/.exec(ph&&ph.keys&&ph.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function fA(e){return!!Qg&&Qg in e}var dA=fA,pA=Function.prototype,mA=pA.toString;function gA(e){if(e!=null){try{return mA.call(e)}catch{}try{return e+""}catch{}}return""}var Jg=gA,yA=Zg,vA=dA,_A=dh,bA=Jg,xA=/[\\^$.*+?()[\]{}|]/g,wA=/^\[object .+?Constructor\]$/,TA=Function.prototype,SA=Object.prototype,EA=TA.toString,AA=SA.hasOwnProperty,CA=RegExp("^"+EA.call(AA).replace(xA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function OA(e){if(!_A(e)||vA(e))return!1;var t=yA(e)?CA:wA;return t.test(bA(e))}var PA=OA;function IA(e,t){return e==null?void 0:e[t]}var kA=IA,RA=PA,NA=kA;function MA(e,t){var r=NA(e,t);return RA(r)?r:void 0}var cs=MA,LA=cs,BA=An,FA=LA(BA,"DataView"),DA=FA,UA=cs,jA=An,$A=UA(jA,"Map"),mh=$A,zA=cs,HA=An,GA=zA(HA,"Promise"),qA=GA,VA=cs,WA=An,XA=VA(WA,"Set"),YA=XA,KA=cs,ZA=An,QA=KA(ZA,"WeakMap"),JA=QA,gh=DA,yh=mh,vh=qA,_h=YA,bh=JA,ty=da,hs=Jg,ey="[object Map]",t2="[object Object]",ry="[object Promise]",ny="[object Set]",iy="[object WeakMap]",sy="[object DataView]",e2=hs(gh),r2=hs(yh),n2=hs(vh),i2=hs(_h),s2=hs(bh),wi=ty;(gh&&wi(new gh(new ArrayBuffer(1)))!=sy||yh&&wi(new yh)!=ey||vh&&wi(vh.resolve())!=ry||_h&&wi(new _h)!=ny||bh&&wi(new bh)!=iy)&&(wi=function(e){var t=ty(e),r=t==t2?e.constructor:void 0,n=r?hs(r):"";if(n)switch(n){case e2:return sy;case r2:return ey;case n2:return ry;case i2:return ny;case s2:return iy}return t});var ay=wi;function a2(e){return e!=null&&typeof e=="object"}var pa=a2,o2=da,l2=pa,u2="[object Arguments]";function c2(e){return l2(e)&&o2(e)==u2}var h2=c2,oy=h2,f2=pa,ly=Object.prototype,d2=ly.hasOwnProperty,p2=ly.propertyIsEnumerable,m2=oy(function(){return arguments}())?oy:function(e){return f2(e)&&d2.call(e,"callee")&&!p2.call(e,"callee")},xh=m2,g2=Array.isArray,nn=g2,y2=9007199254740991;function v2(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=y2}var wh=v2,_2=Zg,b2=wh;function x2(e){return e!=null&&b2(e.length)&&!_2(e)}var cl=x2,hl={exports:{}};function w2(){return!1}var T2=w2;hl.exports,function(e,t){var r=An,n=T2,i=t&&!t.nodeType&&t,s=i&&!0&&e&&!e.nodeType&&e,a=s&&s.exports===i,o=a?r.Buffer:void 0,c=o?o.isBuffer:void 0,h=c||n;e.exports=h}(hl,hl.exports);var Th=hl.exports,S2=da,E2=wh,A2=pa,C2="[object Arguments]",O2="[object Array]",P2="[object Boolean]",I2="[object Date]",k2="[object Error]",R2="[object Function]",N2="[object Map]",M2="[object Number]",L2="[object Object]",B2="[object RegExp]",F2="[object Set]",D2="[object String]",U2="[object WeakMap]",j2="[object ArrayBuffer]",$2="[object DataView]",z2="[object Float32Array]",H2="[object Float64Array]",G2="[object Int8Array]",q2="[object Int16Array]",V2="[object Int32Array]",W2="[object Uint8Array]",X2="[object Uint8ClampedArray]",Y2="[object Uint16Array]",K2="[object Uint32Array]",le={};le[z2]=le[H2]=le[G2]=le[q2]=le[V2]=le[W2]=le[X2]=le[Y2]=le[K2]=!0,le[C2]=le[O2]=le[j2]=le[P2]=le[$2]=le[I2]=le[k2]=le[R2]=le[N2]=le[M2]=le[L2]=le[B2]=le[F2]=le[D2]=le[U2]=!1;function Z2(e){return A2(e)&&E2(e.length)&&!!le[S2(e)]}var Q2=Z2;function J2(e){return function(t){return e(t)}}var tC=J2,fl={exports:{}};fl.exports,function(e,t){var r=Vg,n=t&&!t.nodeType&&t,i=n&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===n,a=s&&r.process,o=function(){try{var c=i&&i.require&&i.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}}();e.exports=o}(fl,fl.exports);var eC=fl.exports,rC=Q2,nC=tC,uy=eC,cy=uy&&uy.isTypedArray,iC=cy?nC(cy):rC,Sh=iC,sC=qg,aC=ay,oC=xh,lC=nn,uC=cl,cC=Th,hC=Gg,fC=Sh,dC="[object Map]",pC="[object Set]",mC=Object.prototype,gC=mC.hasOwnProperty;function yC(e){if(e==null)return!0;if(uC(e)&&(lC(e)||typeof e=="string"||typeof e.splice=="function"||cC(e)||fC(e)||oC(e)))return!e.length;var t=aC(e);if(t==dC||t==pC)return!e.size;if(hC(e))return!sC(e).length;for(var r in e)if(gC.call(e,r))return!1;return!0}var vC=yC;const gr=ri(vC),_C=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],Eh=e=>{const[t,r]=Mt.useState(!1),[,n]=dt.useState(!1),[,i]=dt.useState(!1),s=dt.useRef(null),a=dt.useRef(null),o=dt.useRef(null),c=dt.useRef(null),{tl:h}=dt.useContext(us),{uniqueId:d,startAt:p,endAt:f,initialAlpha:m,transformation:{x:g,y:v,width:_,height:b,colorCorrection:w,animation:T,effect:x},applyTransformer:A}=e;console.log("all abstract props",e);const{contrast:I=1,saturation:O=1,brightness:P=1,alpha:B=1,blurRadius:k=0}=w||{},C={...P>1&&{brightness:P},...I>1&&{contrast:I},...O>1&&{saturation:O},...B!==0&&{alpha:B}};Mt.useEffect(()=>{s.current&&r(!0)},[]),Mt.useEffect(()=>{let V=Ar.context(()=>{});if(s.current&&h.current){const q={duration:Number(f)-Number(p)},X=fh(T||"None");V=Ar.context(()=>{var G,D;gr(X.from)?gr(X.to)?gr(X.fromTo)?h.current.to(s.current,{alpha:1,duration:.01},p).from(o.current,{...q},p).to(s.current,{alpha:0,duration:.1},Number(f)-.1):h.current.fromTo(s.current,(G=X.fromTo)==null?void 0:G.from,(D=X.fromTo)==null?void 0:D.to,p).from(o.current,{...q},p).to(s.current,{alpha:0,duration:.2},f-.2):h.current.to(s.current,{alpha:1,duration:.2,...X.to},p).from(o.current,{...q},p).to(s.current,{alpha:0,duration:.2},f-.2):h.current.from(s.current,{...X.from},p).to(o.current,{alpha:1,duration:.2},p).from(o.current,{...q},p).to(s.current,{alpha:0,duration:.2},f-.2)})}return()=>V.revert()},[T,p,f]);const R=Mt.useCallback(()=>{n(!0)},[]),M=Mt.useCallback(V=>{console.log("changeEnd",V),e.onAnchorTransformationEnd&&(console.log("running onAnchorTransformationEnd"),e.onAnchorTransformationEnd(V))},[]),F=qt.withFilters(qt.Container,{...k>0&&{blur:Cr.filters.BlurFilter},...!gr(C)&&{adjust:ah},matrix:Cr.filters.ColorMatrixFilter}),$=(w==null?void 0:w.enabled)||x&&x!==bi.Normal;return $t.jsxs(qt.Container,{ref:a,children:[$t.jsxs(qt.Container,{ref:s,alpha:m,position:[g,v],pivot:[g,v],width:_,height:b,children:[$&&$t.jsx(F,{scale:1,blur:{blur:k,quality:4},adjust:C,apply:({matrix:V})=>{x===bi.BlackAndWhite?V.desaturate():x===bi.Sepia?V.sepia():x===bi.RetroVintage||x===bi.NightVision?V.negative():x===bi.Normal&&V.reset()},matrix:{enabled:!0,matrix:_C},children:$t.jsx(qt.Container,{ref:o,children:e.children})}),!$&&$t.jsx(qt.Container,{ref:o,children:e.children})]}),A&&$t.jsx(ch,{pixiTransformerRef:c,imageRef:s,isMounted:t,transformCommit:M,transformChange:R,mouseoverEvent:i,uniqueId:d})]})},bC=e=>{const t=dt.useRef(null),r=dt.useRef(null),{src:n,transformation:{x:i,y:s,width:a,height:o,anchor:c},pointerdown:h,pointerup:d,mousedown:p,mouseup:f,pointerover:m,mouseover:g,mouseout:v}=e;return $t.jsx(Eh,{...e,children:$t.jsx(qt.Container,{ref:r,children:$t.jsx(qt.Sprite,{image:n,width:a,height:o,anchor:c,ref:t,x:i,y:s,interactive:!0,pointerdown:h,pointerup:d,pointerover:m,mousedown:p,mouseup:f,mouseover:g,mouseout:v})})})};var xC=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ah={},wC={get exports(){return Ah},set exports(e){Ah=e}};/*!
844
844
  * d-path-parser - v1.0.0
845
845
  * by Massimo Artizzu (MaxArt2501)
846
846
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reacthub-pixitweenjs",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
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",