UNPKG

@esotericsoftware/spine-pixi-v8

Version:
1 lines 232 kB
"use strict";var spine=(()=>{var ss=Object.defineProperty,ai=Object.getOwnPropertyDescriptor,ci=Object.getOwnPropertyNames,li=Object.prototype.hasOwnProperty,Xt=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,s)=>(typeof require<"u"?require:t)[s]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),hi=(e,t)=>{for(var s in t)ss(e,s,{get:t[s],enumerable:!0})},di=(e,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ci(t))!li.call(e,i)&&i!==s&&ss(e,i,{get:()=>t[i],enumerable:!(n=ai(t,i))||n.enumerable});return e},ui=e=>di(ss({},"__esModule",{value:!0}),e),mn={};if(hi(mn,{AABBRectangleBoundsProvider:()=>Pr,ATTACH_RETAIN:()=>qs,ATTACH_SETUP:()=>$s,AlphaTimeline:()=>ws,Animation:()=>Me,AnimationState:()=>Os,AnimationStateAdapter:()=>yi,AnimationStateData:()=>An,AssetCache:()=>kn,AssetManagerBase:()=>vi,AtlasAttachmentLoader:()=>Mn,Attachment:()=>rs,AttachmentTimeline:()=>ne,BinaryInput:()=>Vn,BlendMode:()=>Mt,Bone:()=>Be,BoneData:()=>Ws,BonePose:()=>Ee,BoneTimeline1:()=>Ut,BoneTimeline2:()=>Fe,BoundingBoxAttachment:()=>zs,CURRENT:()=>_s,ClippingAttachment:()=>St,Color:()=>z,Constraint:()=>re,ConstraintData:()=>oe,ConstraintTimeline1:()=>ie,CurveTimeline:()=>Nt,CurveTimeline1:()=>me,DebugUtils:()=>pi,DeformTimeline:()=>Ts,Downloader:()=>Pn,DrawOrder:()=>Fn,DrawOrderFolderTimeline:()=>xe,DrawOrderTimeline:()=>Ht,Event:()=>Xe,EventData:()=>js,EventQueue:()=>Sn,EventTimeline:()=>Ye,EventType:()=>mt,FIRST:()=>Ns,FakeTexture:()=>bi,FromProperty:()=>jt,FromRotate:()=>$e,FromScaleX:()=>We,FromScaleY:()=>Ge,FromShearY:()=>He,FromX:()=>qe,FromY:()=>ze,HOLD:()=>be,IkConstraint:()=>Yn,IkConstraintData:()=>ye,IkConstraintPose:()=>Le,IkConstraintTimeline:()=>Cs,Inherit:()=>st,InheritTimeline:()=>gs,IntSet:()=>fi,Interpolation:()=>ue,MODE:()=>Us,MathUtils:()=>X,MeshAttachment:()=>ht,MixFrom:()=>U,PathAttachment:()=>we,PathConstraint:()=>Rn,PathConstraintData:()=>ve,PathConstraintMixTimeline:()=>Is,PathConstraintPose:()=>Ve,PathConstraintPositionTimeline:()=>ks,PathConstraintSpacingTimeline:()=>Ps,Physics:()=>Ct,PhysicsConstraint:()=>Ks,PhysicsConstraintDampingTimeline:()=>Ys,PhysicsConstraintData:()=>Te,PhysicsConstraintGravityTimeline:()=>Bs,PhysicsConstraintInertiaTimeline:()=>Ms,PhysicsConstraintMassTimeline:()=>Rs,PhysicsConstraintMixTimeline:()=>Xs,PhysicsConstraintPose:()=>De,PhysicsConstraintResetTimeline:()=>Ls,PhysicsConstraintStrengthTimeline:()=>Fs,PhysicsConstraintTimeline:()=>Lt,PhysicsConstraintWindTimeline:()=>Es,PointAttachment:()=>In,Pool:()=>se,Posed:()=>Gs,PosedActive:()=>Hs,PosedData:()=>Re,PositionMode:()=>At,Pow:()=>gn,PowOut:()=>mi,Property:()=>G,RGB2Timeline:()=>vs,RGBA2Timeline:()=>ys,RGBATimeline:()=>xs,RGBTimeline:()=>bs,RegionAttachment:()=>j,RotateMode:()=>$t,RotateTimeline:()=>pe,SETUP:()=>Cn,ScaleTimeline:()=>hs,ScaleXTimeline:()=>ds,ScaleYMode:()=>dt,ScaleYTimeline:()=>us,Sequence:()=>fe,SequenceMode:()=>at,SequenceModeValues:()=>os,SequenceTimeline:()=>Ss,SetupPoseBoundsProvider:()=>Ir,ShearTimeline:()=>fs,ShearXTimeline:()=>ms,ShearYTimeline:()=>ps,Skeleton:()=>ae,SkeletonBinary:()=>Ln,SkeletonBounds:()=>on,SkeletonClipping:()=>Ce,SkeletonData:()=>Ne,SkeletonJson:()=>Nn,SkeletonRendererCore:()=>lr,Skin:()=>Se,SkinEntry:()=>Js,SkinsAndAnimationBoundsProvider:()=>Mr,Slider:()=>Bn,SliderData:()=>qt,SliderMixTimeline:()=>Ds,SliderPose:()=>_e,SliderTimeline:()=>Vs,Slot:()=>En,SlotCurveTimeline:()=>ge,SlotData:()=>Qs,SlotPose:()=>Oe,SpacingMode:()=>it,Spine:()=>Fr,SpineDebugRenderer:()=>Yr,SpinePipe:()=>qn,SpineTexture:()=>cn,StringSet:()=>pn,Texture:()=>ns,TextureAtlas:()=>Ie,TextureAtlasPage:()=>bn,TextureAtlasRegion:()=>is,TextureFilter:()=>rt,TextureRegion:()=>xn,TextureWrap:()=>It,TimeKeeper:()=>gi,Timeline:()=>et,ToProperty:()=>Kt,ToRotate:()=>Zs,ToScaleX:()=>sn,ToScaleY:()=>nn,ToShearY:()=>rn,ToX:()=>tn,ToY:()=>en,TrackEntry:()=>Tn,TransformConstraint:()=>Xn,TransformConstraintData:()=>Q,TransformConstraintPose:()=>Ue,TransformConstraintTimeline:()=>As,TranslateTimeline:()=>as,TranslateXTimeline:()=>cs,TranslateYTimeline:()=>ls,Triangulator:()=>_n,Utils:()=>L,Vector2:()=>Pe,VertexAttachment:()=>_t,WindowedMean:()=>xi,isBoneTimeline:()=>yn,isConstraintTimeline:()=>vn,isSlotTimeline:()=>wn}),typeof window<"u"&&window.PIXI){const e=window.require;window.require=t=>{if(e)return e(t);if(t.startsWith("@pixi/")||t.startsWith("pixi.js"))return window.PIXI}}var fi=class{array=[];add(e){const t=this.contains(e);return this.array[e|0]=e|0,!t}contains(e){return this.array[e|0]!==void 0}remove(e){this.array[e|0]=void 0}clear(){this.array.length=0}},pn=class{entries={};size=0;add(e){const t=this.entries[e];return this.entries[e]=!0,t?!1:(this.size++,!0)}addAll(e){const t=this.size;for(let s=0,n=e.length;s<n;s++)this.add(e[s]);return t!==this.size}contains(e){return this.entries[e]}clear(){this.entries={},this.size=0}},z=class Zt{r;g;b;a;static WHITE=new Zt(1,1,1,1);static RED=new Zt(1,0,0,1);static GREEN=new Zt(0,1,0,1);static BLUE=new Zt(0,0,1,1);static MAGENTA=new Zt(1,0,1,1);constructor(t=0,s=0,n=0,i=0){this.r=t,this.g=s,this.b=n,this.a=i}set(t,s,n,i){return this.r=t,this.g=s,this.b=n,this.a=i,this.clamp()}setFromColor(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this}setFromString(t){return t=t.charAt(0)==="#"?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=t.length!==8?1:parseInt(t.substr(6,2),16)/255,this}add(t,s,n,i){return this.r+=t,this.g+=s,this.b+=n,this.a+=i,this.clamp()}clamp(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this}static rgba8888ToColor(t,s){t.r=((s&4278190080)>>>24)/255,t.g=((s&16711680)>>>16)/255,t.b=((s&65280)>>>8)/255,t.a=(s&255)/255}static rgb888ToColor(t,s){t.r=((s&16711680)>>>16)/255,t.g=((s&65280)>>>8)/255,t.b=(s&255)/255}toRgb888(){const t=s=>`0${(s*255).toString(16)}`.slice(-2);return+`0x${t(this.r)}${t(this.g)}${t(this.b)}`}static fromString(t,s=new Zt){return s.setFromString(t)}},X=class vt{static epsilon=1e-5;static epsilon2=vt.epsilon*vt.epsilon;static PI=3.1415927;static PI2=vt.PI*2;static invPI2=1/vt.PI2;static radiansToDegrees=180/vt.PI;static radDeg=vt.radiansToDegrees;static degreesToRadians=vt.PI/180;static degRad=vt.degreesToRadians;static clamp(t,s,n){return t<s?s:t>n?n:t}static cosDeg(t){return Math.cos(t*vt.degRad)}static sinDeg(t){return Math.sin(t*vt.degRad)}static atan2Deg(t,s){return Math.atan2(t,s)*vt.radDeg}static signum(t){return t>0?1:t<0?-1:0}static toInt(t){return t>0?Math.floor(t):Math.ceil(t)}static cbrt(t){const s=Math.pow(Math.abs(t),.3333333333333333);return t<0?-s:s}static randomTriangular(t,s){return vt.randomTriangularWith(t,s,(t+s)*.5)}static randomTriangularWith(t,s,n){const i=Math.random(),r=s-t;return i<=(n-t)/r?t+Math.sqrt(i*r*(n-t)):s-Math.sqrt((1-i)*r*(s-n))}static isPowerOfTwo(t){return t&&(t&t-1)===0}},ue=class he{static linear=new class extends he{applyInternal(t){return t}};static smooth=new class extends he{applyInternal(t){return t*t*(3-2*t)}};static slowFast=new class extends he{applyInternal(t){return t*t}};static fastSlow=new class extends he{applyInternal(t){return(t-1)*(t-1)*-1+1}};static circle=new class extends he{applyInternal(t){return t<=.5?(t*=2,(1-Math.sqrt(1-t*t))/2):(t--,t*=2,(Math.sqrt(1-t*t)+1)/2)}};apply(t,s,n){return s===void 0||n===void 0?this.applyInternal(t):t+(s-t)*this.applyInternal(n)}},gn=class extends ue{power=2;constructor(e){super(),this.power=e}applyInternal(e){return e<=.5?Math.pow(e*2,this.power)/2:Math.pow((e-1)*2,this.power)/(this.power%2===0?-2:2)+1}},mi=class extends gn{constructor(e){super(e)}applyInternal(e){return Math.pow(e-1,this.power)*(this.power%2===0?-1:1)+1}},L=class de{static SUPPORTS_TYPED_ARRAYS=typeof Float32Array<"u";static arrayCopy(t,s,n,i,r){for(let a=s,c=i;a<s+r;a++,c++)n[c]=t[a]}static arrayFill(t,s,n,i){for(let r=s;r<n;r++)t[r]=i}static setArraySize(t,s,n=0){const i=t.length;if(i===s)return t;if(t.length=s,i<s)for(let r=i;r<s;r++)t[r]=n;return t}static ensureArrayCapacity(t,s,n=0){return t.length>=s?t:de.setArraySize(t,s,n)}static newArray(t,s){const n=[];for(let i=0;i<t;i++)n[i]=s;return n}static newFloatArray(t){if(de.SUPPORTS_TYPED_ARRAYS)return new Float32Array(t);{const s=[];for(let n=0;n<s.length;n++)s[n]=0;return s}}static newShortArray(t){if(de.SUPPORTS_TYPED_ARRAYS)return new Int16Array(t);{const s=[];for(let n=0;n<s.length;n++)s[n]=0;return s}}static toFloatArray(t){return de.SUPPORTS_TYPED_ARRAYS?new Float32Array(t):t}static toSinglePrecision(t){return de.SUPPORTS_TYPED_ARRAYS?Math.fround(t):t}static webkit602BugfixHelper(t){}static contains(t,s,n=!0){for(let i=0;i<t.length;i++)if(t[i]===s)return!0;return!1}static enumValue(t,s){return t[s[0].toUpperCase()+s.slice(1)]}},pi=class{static logBones(e){for(let t=0;t<e.bones.length;t++){const s=e.bones[t].appliedPose;console.log(`${s.bone.data.name}, ${s.a}, ${s.b}, ${s.c}, ${s.d}, ${s.worldX}, ${s.worldY}`)}}},se=class{items=[];instantiator;constructor(e){this.instantiator=e}obtain(){return this.items.length>0?this.items.pop():this.instantiator()}free(e){e.reset?.(),this.items.push(e)}freeAll(e){for(let t=0;t<e.length;t++)this.free(e[t])}clear(){this.items.length=0}},Pe=class{x;y;constructor(e=0,t=0){this.x=e,this.y=t}set(e,t){return this.x=e,this.y=t,this}length(){const e=this.x,t=this.y;return Math.sqrt(e*e+t*t)}normalize(){const e=this.length();return e!==0&&(this.x/=e,this.y/=e),this}},gi=class{maxDelta=.064;framesPerSecond=0;delta=0;totalTime=0;lastTime=Date.now()/1e3;frameCount=0;frameTime=0;update(){const e=Date.now()/1e3;this.delta=e-this.lastTime,this.frameTime+=this.delta,this.totalTime+=this.delta,this.delta>this.maxDelta&&(this.delta=this.maxDelta),this.lastTime=e,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}},xi=class{values;addedValues=0;lastValue=0;mean=0;dirty=!0;constructor(e=32){this.values=new Array(e)}hasEnoughData(){return this.addedValues>=this.values.length}addValue(e){this.addedValues<this.values.length&&this.addedValues++,this.values[this.lastValue++]=e,this.lastValue>this.values.length-1&&(this.lastValue=0),this.dirty=!0}getMean(){if(this.hasEnoughData()){if(this.dirty){let e=0;for(let t=0;t<this.values.length;t++)e+=this.values[t];this.mean=e/this.values.length,this.dirty=!1}return this.mean}return 0}},ns=class{_image;constructor(e){this._image=e}getImage(){return this._image}},rt;(function(e){e[e.Nearest=9728]="Nearest",e[e.Linear=9729]="Linear",e[e.MipMap=9987]="MipMap",e[e.MipMapNearestNearest=9984]="MipMapNearestNearest",e[e.MipMapLinearNearest=9985]="MipMapLinearNearest",e[e.MipMapNearestLinear=9986]="MipMapNearestLinear",e[e.MipMapLinearLinear=9987]="MipMapLinearLinear"})(rt||(rt={}));var It;(function(e){e[e.MirroredRepeat=33648]="MirroredRepeat",e[e.ClampToEdge=33071]="ClampToEdge",e[e.Repeat=10497]="Repeat"})(It||(It={}));var xn=class{texture;u=0;v=0;u2=0;v2=0;width=0;height=0;degrees=0;offsetX=0;offsetY=0;originalWidth=0;originalHeight=0},bi=class extends ns{setFilters(e,t){}setWraps(e,t){}dispose(){}},Ie=class{pages=[];regions=[];constructor(e){const t=new wi(e),s=new Array(4),n={};n.size=o=>{o.width=parseInt(s[1]),o.height=parseInt(s[2])},n.format=()=>{},n.filter=o=>{o.minFilter=L.enumValue(rt,s[1]),o.magFilter=L.enumValue(rt,s[2])},n.repeat=o=>{s[1].indexOf("x")!==-1&&(o.uWrap=It.Repeat),s[1].indexOf("y")!==-1&&(o.vWrap=It.Repeat)},n.pma=o=>{o.pma=s[1]==="true"};var i={};i.xy=o=>{o.x=parseInt(s[1]),o.y=parseInt(s[2])},i.size=o=>{o.width=parseInt(s[1]),o.height=parseInt(s[2])},i.bounds=o=>{o.x=parseInt(s[1]),o.y=parseInt(s[2]),o.width=parseInt(s[3]),o.height=parseInt(s[4])},i.offset=o=>{o.offsetX=parseInt(s[1]),o.offsetY=parseInt(s[2])},i.orig=o=>{o.originalWidth=parseInt(s[1]),o.originalHeight=parseInt(s[2])},i.offsets=o=>{o.offsetX=parseInt(s[1]),o.offsetY=parseInt(s[2]),o.originalWidth=parseInt(s[3]),o.originalHeight=parseInt(s[4])},i.rotate=o=>{const h=s[1];h==="true"?o.degrees=90:h!=="false"&&(o.degrees=parseInt(h))},i.index=o=>{o.index=parseInt(s[1])};let r=t.readLine();for(;r&&r.trim().length===0;)r=t.readLine();for(;!(!r||r.trim().length===0||t.readEntry(s,r)===0);)r=t.readLine();let a=null,c=null,l=null;for(;r!==null;)if(r.trim().length===0)a=null,r=t.readLine();else if(a){const o=new is(a,r);for(;;){const h=t.readEntry(s,r=t.readLine());if(h===0)break;const d=i[s[0]];if(d)d(o);else{c||(c=[]),l||(l=[]),c.push(s[0]);const m=[];for(let f=0;f<h;f++)m.push(parseInt(s[f+1]));l.push(m)}}o.originalWidth===0&&o.originalHeight===0&&(o.originalWidth=o.width,o.originalHeight=o.height),c&&c.length>0&&l&&l.length>0&&(o.names=c,o.values=l,c=null,l=null),o.u=o.x/a.width,o.v=o.y/a.height,o.degrees===90?(o.u2=(o.x+o.height)/a.width,o.v2=(o.y+o.width)/a.height):(o.u2=(o.x+o.width)/a.width,o.v2=(o.y+o.height)/a.height),this.regions.push(o)}else{for(a=new bn(r.trim());t.readEntry(s,r=t.readLine())!==0;){const o=n[s[0]];o&&o(a)}this.pages.push(a)}}findRegion(e){for(let t=0;t<this.regions.length;t++)if(this.regions[t].name===e)return this.regions[t];return null}setTextures(e,t=""){for(const s of this.pages)s.setTexture(e.get(t+s.name))}dispose(){for(let e=0;e<this.pages.length;e++)this.pages[e].texture?.dispose()}},wi=class{lines;index=0;constructor(e){this.lines=e.split(/\r\n|\r|\n/)}readLine(){return this.index>=this.lines.length?null:this.lines[this.index++]}readEntry(e,t){if(!t||(t=t.trim(),t.length===0))return 0;const s=t.indexOf(":");if(s===-1)return 0;e[0]=t.substr(0,s).trim();for(let n=1,i=s+1;;n++){const r=t.indexOf(",",i);if(r===-1)return e[n]=t.substr(i).trim(),n;if(e[n]=t.substr(i,r-i).trim(),i=r+1,n===4)return 4}}},bn=class{name;minFilter=rt.Nearest;magFilter=rt.Nearest;uWrap=It.ClampToEdge;vWrap=It.ClampToEdge;texture=null;width=0;height=0;pma=!1;regions=[];constructor(e){this.name=e}setTexture(e){this.texture=e,e.setFilters(this.minFilter,this.magFilter),e.setWraps(this.uWrap,this.vWrap);for(const t of this.regions)t.texture=e}},is=class extends xn{page;name;x=0;y=0;offsetX=0;offsetY=0;originalWidth=0;originalHeight=0;index=0;degrees=0;names=null;values=null;constructor(e,t){super(),this.page=e,this.name=t,e.regions.push(this)}},rs=class Wn{static empty=[];name;timelineAttachment;timelineSlots=Wn.empty;constructor(t){if(!t)throw new Error("name cannot be null.");this.name=t,this.timelineAttachment=this}isTimelineActive(t,s,n){let i=t[s];if(i.bone.isActive()){const r=(n?i.getAppliedPose():i.getPose()).getAttachment();if(r!=null&&r.timelineAttachment===this)return!0}for(let r=0,a=this.timelineSlots.length;r<a;r++){if(i=t[this.timelineSlots[r]],!i.bone.isActive())continue;const c=(n?i.getAppliedPose():i.getPose()).getAttachment();if(c!=null&&c.timelineAttachment===this)return!0}return!1}},_t=class Gn extends rs{static nextID=0;id=Gn.nextID++;bones=null;vertices=[];worldVerticesLength=0;constructor(t){super(t)}computeWorldVertices(t,s,n,i,r,a,c){i=a+(i>>1)*c;const l=s.appliedPose.deform;let o=this.vertices;const h=this.bones;if(!h){l.length>0&&(o=l);const u=s.bone.appliedPose,g=u.worldX,p=u.worldY,x=u.a,b=u.b,w=u.c,v=u.d;for(let y=n,T=a;T<i;y+=2,T+=c){const S=o[y],C=o[y+1];r[T]=S*x+C*b+g,r[T+1]=S*w+C*v+p}return}let d=0,m=0;for(let u=0;u<n;u+=2){const g=h[d];d+=g+1,m+=g}const f=t.bones;if(l.length===0)for(let u=a,g=m*3;u<i;u+=c){let p=0,x=0,b=h[d++];for(b+=d;d<b;d++,g+=3){const w=f[h[d]].appliedPose,v=o[g],y=o[g+1],T=o[g+2];p+=(v*w.a+y*w.b+w.worldX)*T,x+=(v*w.c+y*w.d+w.worldY)*T}r[u]=p,r[u+1]=x}else{const u=l;for(let g=a,p=m*3,x=m<<1;g<i;g+=c){let b=0,w=0,v=h[d++];for(v+=d;d<v;d++,p+=3,x+=2){const y=f[h[d]].appliedPose,T=o[p]+u[x],S=o[p+1]+u[x+1],C=o[p+2];b+=(T*y.a+S*y.b+y.worldX)*C,w+=(T*y.c+S*y.d+y.worldY)*C}r[g]=b,r[g+1]=w}}}copyTo(t){this.bones?(t.bones=[],L.arrayCopy(this.bones,0,t.bones,0,this.bones.length)):t.bones=null,this.vertices&&(t.vertices=L.newFloatArray(this.vertices.length),L.arrayCopy(this.vertices,0,t.vertices,0,this.vertices.length)),t.worldVerticesLength=this.worldVerticesLength,t.timelineAttachment=this.timelineAttachment,t.timelineSlots=this.timelineSlots}},ht=class ln extends _t{sequence;regionUVs=[];triangles=[];hullLength=0;path;color=new z(1,1,1,1);sourceMesh=null;edges=[];width=0;height=0;tempColor=new z(0,0,0,0);constructor(t,s){super(t),this.sequence=s}copy(){if(this.sourceMesh)return this.newLinkedMesh();const t=new ln(this.name,this.sequence.copy());return t.path=this.path,t.color.setFromColor(this.color),this.copyTo(t),t.regionUVs=[],L.arrayCopy(this.regionUVs,0,t.regionUVs,0,this.regionUVs.length),t.triangles=[],L.arrayCopy(this.triangles,0,t.triangles,0,this.triangles.length),t.hullLength=this.hullLength,this.edges&&(t.edges=[],L.arrayCopy(this.edges,0,t.edges,0,this.edges.length)),t.width=this.width,t.height=this.height,t}updateSequence(){this.sequence.update(this)}getSourceMesh(){return this.sourceMesh}setSourceMesh(t){this.sourceMesh=t,t&&(this.bones=t.bones,this.vertices=t.vertices,this.worldVerticesLength=t.worldVerticesLength,this.regionUVs=t.regionUVs,this.triangles=t.triangles,this.hullLength=t.hullLength,this.worldVerticesLength=t.worldVerticesLength,this.edges=t.edges,this.width=t.width,this.height=t.height)}newLinkedMesh(){const t=new ln(this.name,this.sequence.copy());return t.timelineAttachment=this.timelineAttachment,t.path=this.path,t.color.setFromColor(this.color),t.setSourceMesh(this.sourceMesh?this.sourceMesh:this),t.updateSequence(),t}static computeUVs(t,s,n){if(!t)throw new Error("Region not set.");const i=n.length;let r=t.u,a=t.v,c=0,l=0;if(t instanceof is){const o=t.page,h=o.width,d=o.height;switch(t.degrees){case 90:r-=(t.originalHeight-t.offsetY-t.height)/h,a-=(t.originalWidth-t.offsetX-t.width)/d,c=t.originalHeight/h,l=t.originalWidth/d;for(let m=0;m<i;m+=2)n[m]=r+s[m+1]*c,n[m+1]=a+(1-s[m])*l;return;case 180:r-=(t.originalWidth-t.offsetX-t.width)/h,a-=t.offsetY/d,c=t.originalWidth/h,l=t.originalHeight/d;for(let m=0;m<i;m+=2)n[m]=r+(1-s[m])*c,n[m+1]=a+(1-s[m+1])*l;return;case 270:r-=t.offsetY/h,a-=t.offsetX/d,c=t.originalHeight/h,l=t.originalWidth/d;for(let m=0;m<i;m+=2)n[m]=r+(1-s[m+1])*c,n[m+1]=a+s[m]*l;return;default:r-=t.offsetX/h,a-=(t.originalHeight-t.offsetY-t.height)/d,c=t.originalWidth/h,l=t.originalHeight/d}}else t?(c=t.u2-r,l=t.v2-a):(r=a=0,c=l=1);for(let o=0;o<i;o+=2)n[o]=r+s[o]*c,n[o+1]=a+s[o+1]*l}},j=class Hn extends rs{sequence;x=0;y=0;scaleX=1;scaleY=1;rotation=0;width=0;height=0;path;color=new z(1,1,1,1);tempColor=new z(1,1,1,1);constructor(t,s){super(t),this.sequence=s}copy(){const t=new Hn(this.name,this.sequence.copy());return t.path=this.path,t.x=this.x,t.y=this.y,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.rotation=this.rotation,t.width=this.width,t.height=this.height,t.color.setFromColor(this.color),t}computeWorldVertices(t,s,n,i,r){const a=t.bone.appliedPose,c=a.worldX,l=a.worldY,o=a.a,h=a.b,d=a.c,m=a.d;let f=s[0],u=s[1];n[i]=f*o+u*h+c,n[i+1]=f*d+u*m+l,i+=r,f=s[2],u=s[3],n[i]=f*o+u*h+c,n[i+1]=f*d+u*m+l,i+=r,f=s[4],u=s[5],n[i]=f*o+u*h+c,n[i+1]=f*d+u*m+l,i+=r,f=s[6],u=s[7],n[i]=f*o+u*h+c,n[i+1]=f*d+u*m+l}getOffsets(t){return this.sequence.offsets[this.sequence.resolveIndex(t)]}updateSequence(){this.sequence.update(this)}static computeUVs(t,s,n,i,r,a,c,l,o,h){if(!t)throw new Error("Region not set.");const d=c/t.originalWidth*i,m=l/t.originalHeight*r,f=-c/2*i+t.offsetX*d,u=-l/2*r+t.offsetY*m,g=f+t.width*d,p=u+t.height*m,x=a*X.degRad,b=Math.cos(x),w=Math.sin(x),v=f*b+s,y=f*w,T=u*b+n,S=u*w,C=g*b+s,A=g*w,k=p*b+n,I=p*w;o[0]=v-S,o[1]=T+y,o[2]=v-I,o[3]=k+y,o[4]=C-I,o[5]=k+A,o[6]=C-S,o[7]=T+A,t==null?(h[0]=0,h[1]=0,h[2]=0,h[3]=1,h[4]=1,h[5]=1,h[6]=1,h[7]=0):(h[1]=t.v2,h[2]=t.u,h[5]=t.v,h[6]=t.u2,t.degrees===90?(h[0]=t.u2,h[3]=t.v2,h[4]=t.u,h[7]=t.v):(h[0]=t.u,h[3]=t.v,h[4]=t.u2,h[7]=t.v2))}static X1=0;static Y1=1;static C1R=2;static C1G=3;static C1B=4;static C1A=5;static U1=6;static V1=7;static X2=8;static Y2=9;static C2R=10;static C2G=11;static C2B=12;static C2A=13;static U2=14;static V2=15;static X3=16;static Y3=17;static C3R=18;static C3G=19;static C3B=20;static C3A=21;static U3=22;static V3=23;static X4=24;static Y4=25;static C4R=26;static C4G=27;static C4B=28;static C4A=29;static U4=30;static V4=31},fe=class Qe{static _nextID=0;id=Qe.nextID();regions;pathSuffix;uvs;offsets;start=0;digits=0;setupIndex=0;constructor(t,s){this.regions=new Array(t),this.pathSuffix=s}copy(){const t=this.regions.length,s=new Qe(t,this.pathSuffix);if(L.arrayCopy(this.regions,0,s.regions,0,t),s.start=this.start,s.digits=this.digits,s.setupIndex=this.setupIndex,this.uvs!=null){const n=this.uvs[0].length;s.uvs=[];for(let i=0;i<t;i++)s.uvs[i]=L.newFloatArray(n),L.arrayCopy(this.uvs[i],0,s.uvs[i],0,n)}if(this.offsets!=null){s.offsets=[];for(let n=0;n<t;n++)s.offsets[n]=[],L.arrayCopy(this.offsets[n],0,s.offsets[n],0,8)}return s}update(t){const s=this.regions.length;if(t instanceof j){this.uvs=[],this.offsets=[];for(let n=0;n<s;n++)this.uvs[n]=L.newFloatArray(8),this.offsets[n]=[],j.computeUVs(this.regions[n],t.x,t.y,t.scaleX,t.scaleY,t.rotation,t.width,t.height,this.offsets[n],this.uvs[n])}else if(t instanceof ht){const n=t.regionUVs;this.uvs=[],this.offsets=void 0;for(let i=0;i<s;i++)this.uvs[i]=L.newFloatArray(n.length),ht.computeUVs(this.regions[i],n,this.uvs[i])}}resolveIndex(t){let s=t.sequenceIndex;return s===-1&&(s=this.setupIndex),s>=this.regions.length&&(s=this.regions.length-1),s}getUVs(t){return this.uvs[t]}hasPathSuffix(){return this.pathSuffix}getPath(t,s){if(!this.pathSuffix)return t;let n=t;const i=(this.start+s).toString();for(let r=this.digits-i.length;r>0;r--)n+="0";return n+=i,n}static nextID(){return Qe._nextID++}},at;(function(e){e[e.hold=0]="hold",e[e.once=1]="once",e[e.loop=2]="loop",e[e.pingpong=3]="pingpong",e[e.onceReverse=4]="onceReverse",e[e.loopReverse=5]="loopReverse",e[e.pingpongReverse=6]="pingpongReverse"})(at||(at={}));var os=[at.hold,at.once,at.loop,at.pingpong,at.onceReverse,at.loopReverse,at.pingpongReverse],Me=class{name;timelines=[];timelineIds;bones;color=new z(1,1,1,1);duration;constructor(e,t,s){if(!e)throw new Error("name cannot be null.");this.name=e,this.duration=s,this.timelineIds=new pn,this.bones=[],this.setTimelines(t)}setTimelines(e){if(!e)throw new Error("timelines cannot be null.");this.timelines=e;const t=e.length;this.timelineIds.clear(),this.bones.length=0;const s=new Set,n=e;for(let i=0;i<t;i++){const r=n[i];this.timelineIds.addAll(r.propertyIds),yn(r)&&s.add(r.boneIndex)&&this.bones.push(r.boneIndex)}}hasTimeline(e){for(let t=0;t<e.length;t++)if(this.timelineIds.contains(e[t]))return!0;return!1}apply(e,t,s,n,i,r,a,c,l,o){if(!e)throw new Error("skeleton cannot be null.");n&&this.duration!==0&&(s%=this.duration,t>0&&(t%=this.duration));const h=this.timelines;for(let d=0,m=h.length;d<m;d++)h[d].apply(e,t,s,i,r,a,c,l,o)}},U;(function(e){e[e.current=0]="current",e[e.setup=1]="setup",e[e.first=2]="first"})(U||(U={}));var G;(function(e){e[e.rotate=0]="rotate",e[e.x=1]="x",e[e.y=2]="y",e[e.scaleX=3]="scaleX",e[e.scaleY=4]="scaleY",e[e.shearX=5]="shearX",e[e.shearY=6]="shearY",e[e.inherit=7]="inherit",e[e.rgb=8]="rgb",e[e.alpha=9]="alpha",e[e.rgb2=10]="rgb2",e[e.attachment=11]="attachment",e[e.deform=12]="deform",e[e.event=13]="event",e[e.drawOrder=14]="drawOrder",e[e.drawOrderFolder=15]="drawOrderFolder",e[e.ikConstraint=16]="ikConstraint",e[e.transformConstraint=17]="transformConstraint",e[e.pathConstraintPosition=18]="pathConstraintPosition",e[e.pathConstraintSpacing=19]="pathConstraintSpacing",e[e.pathConstraintMix=20]="pathConstraintMix",e[e.physicsConstraintInertia=21]="physicsConstraintInertia",e[e.physicsConstraintStrength=22]="physicsConstraintStrength",e[e.physicsConstraintDamping=23]="physicsConstraintDamping",e[e.physicsConstraintMass=24]="physicsConstraintMass",e[e.physicsConstraintWind=25]="physicsConstraintWind",e[e.physicsConstraintGravity=26]="physicsConstraintGravity",e[e.physicsConstraintMix=27]="physicsConstraintMix",e[e.physicsConstraintReset=28]="physicsConstraintReset",e[e.sequence=29]="sequence",e[e.sliderTime=30]="sliderTime",e[e.sliderMix=31]="sliderMix"})(G||(G={}));var et=class{propertyIds;frames;additive=!1;instant=!1;constructor(e,...t){this.propertyIds=t,this.frames=L.newFloatArray(e*this.getFrameEntries())}getPropertyIds(){return this.propertyIds}getFrameEntries(){return 1}getFrameCount(){return this.frames.length/this.getFrameEntries()}getDuration(){return this.frames[this.frames.length-this.getFrameEntries()]}static search(e,t,s=1){const n=e.length;for(let i=s;i<n;i+=s)if(e[i]>t)return i-s;return n-s}};function wn(e){return typeof e=="object"&&e!==null&&typeof e.slotIndex=="number"}var Nt=class extends et{curves;constructor(e,t,...s){super(e,...s),this.curves=L.newFloatArray(e+t*18),this.curves[e-1]=1}setLinear(e){this.curves[e]=0}setStepped(e){this.curves[e]=1}shrink(e){const t=this.getFrameCount()+e*18;if(this.curves.length>t){const s=L.newFloatArray(t);L.arrayCopy(this.curves,0,s,0,t),this.curves=s}}setBezier(e,t,s,n,i,r,a,c,l,o,h){const d=this.curves;let m=this.getFrameCount()+e*18;s===0&&(d[t]=2+m);const f=(n-r*2+c)*.03,u=(i-a*2+l)*.03,g=((r-c)*3-n+o)*.006,p=((a-l)*3-i+h)*.006;let x=f*2+g,b=u*2+p,w=(r-n)*.3+f+g*.16666667,v=(a-i)*.3+u+p*.16666667,y=n+w,T=i+v;for(let S=m+18;m<S;m+=2)d[m]=y,d[m+1]=T,w+=x,v+=b,x+=g,b+=p,y+=w,T+=v}getBezierValue(e,t,s,n){const i=this.curves;if(i[n]>e){const l=this.frames[t],o=this.frames[t+s];return o+(e-l)/(i[n]-l)*(i[n+1]-o)}const r=n+18;for(n+=2;n<r;n+=2)if(i[n]>=e){const l=i[n-2],o=i[n-1];return o+(e-l)/(i[n]-l)*(i[n+1]-o)}t+=this.getFrameEntries();const a=i[r-2],c=i[r-1];return c+(e-a)/(this.frames[t]-a)*(this.frames[t+s]-c)}},me=class ke extends Nt{constructor(t,s,n){super(t,s,n)}getFrameEntries(){return 2}setFrame(t,s,n){t<<=1,this.frames[t]=s,this.frames[t+1]=n}getCurveValue(t){const s=this.frames;let n=s.length-2;for(let r=2;r<=n;r+=2)if(s[r]>t){n=r-2;break}const i=this.curves[n>>1];switch(i){case 0:{const r=s[n],a=s[n+1];return a+(t-r)/(s[n+2]-r)*(s[n+2+1]-a)}case 1:return s[n+1]}return this.getBezierValue(t,n,1,i-2)}getRelativeValue(t,s,n,i,r,a){if(t<this.frames[0])return ke.beforeFirstKey(n,s,r,a);const c=this.getCurveValue(t);return n===U.setup?a+c*s:r+(i?c:c+a-r)*s}getAbsoluteValue(t,s,n,i,r,a,c){return c===void 0?this.getAbsoluteValue1(t,s,n,i,r,a):this.getAbsoluteValue2(t,s,n,i,r,a,c)}getAbsoluteValue1(t,s,n,i,r,a){if(t<this.frames[0])return ke.beforeFirstKey(n,s,r,a);const c=this.getCurveValue(t);return n===U.setup?a+(i?c:c-a)*s:r+(i?c:c-r)*s}getAbsoluteValue2(t,s,n,i,r,a,c){return t<this.frames[0]?ke.beforeFirstKey(n,s,r,a):n===U.setup?a+(i?c:c-a)*s:r+(i?c:c-r)*s}getScaleValue(t,s,n,i,r,a,c){if(t<this.frames[0])return ke.beforeFirstKey(n,s,a,c);const l=this.getCurveValue(t)*c;if(s===1&&!i)return l;let o=n===U.setup?c:a;return i?o+(l-c)*s:r?o+(Math.abs(l)*Math.sign(o)-o)*s:(o=Math.abs(o)*Math.sign(l),o+(l-o)*s)}static beforeFirstKey(t,s,n,i){switch(t){case U.setup:return i;case U.first:return n+(i-n)*s;case U.current:return n}}};function yn(e){return typeof e=="object"&&e!==null&&typeof e.boneIndex=="number"}var Ut=class extends me{boneIndex;constructor(e,t,s,n){super(e,t,`${n}|${s}`),this.boneIndex=s,this.additive=!0}apply(e,t,s,n,i,r,a,c,l){const o=e.bones[this.boneIndex];o.active&&this.apply1(l?o.appliedPose:o.pose,o.data.setupPose,s,i,r,a,c)}},Fe=class extends Nt{boneIndex;constructor(e,t,s,n,i){super(e,t,`${n}|${s}`,`${i}|${s}`),this.boneIndex=s,this.additive=!0}getFrameEntries(){return 3}setFrame(e,t,s,n){e*=3,this.frames[e]=t,this.frames[e+1]=s,this.frames[e+2]=n}apply(e,t,s,n,i,r,a,c,l){const o=e.bones[this.boneIndex];o.active&&this.apply1(l?o.appliedPose:o.pose,o.data.setupPose,s,i,r,a,c)}},pe=class extends Ut{constructor(e,t,s){super(e,t,s,G.rotate)}apply1(e,t,s,n,i,r,a){e.rotation=this.getRelativeValue(s,n,i,r,e.rotation,t.rotation)}},as=class extends Fe{constructor(e,t,s){super(e,t,s,G.x,G.y)}apply1(e,t,s,n,i,r,a){const c=this.frames;if(s<c[0]){switch(i){case U.setup:e.x=t.x,e.y=t.y;break;case U.first:e.x+=(t.x-e.x)*n,e.y+=(t.y-e.y)*n;break}return}let l=0,o=0;const h=et.search(c,s,3),d=this.curves[h/3];switch(d){case 0:{const m=c[h];l=c[h+1],o=c[h+2];const f=(s-m)/(c[h+3]-m);l+=(c[h+3+1]-l)*f,o+=(c[h+3+2]-o)*f;break}case 1:l=c[h+1],o=c[h+2];break;default:l=this.getBezierValue(s,h,1,d-2),o=this.getBezierValue(s,h,2,d+18-2)}i===U.setup?(e.x=t.x+l*n,e.y=t.y+o*n):r?(e.x+=l*n,e.y+=o*n):(e.x+=(t.x+l-e.x)*n,e.y+=(t.y+o-e.y)*n)}},cs=class extends Ut{constructor(e,t,s){super(e,t,s,G.x)}apply1(e,t,s,n,i,r,a){e.x=this.getRelativeValue(s,n,i,r,e.x,t.x)}},ls=class extends Ut{constructor(e,t,s){super(e,t,s,G.y)}apply1(e,t,s,n,i,r,a){e.y=this.getRelativeValue(s,n,i,r,e.y,t.y)}},hs=class extends Fe{constructor(e,t,s){super(e,t,s,G.scaleX,G.scaleY)}apply1(e,t,s,n,i,r,a){const c=this.frames;if(s<c[0]){switch(i){case U.setup:e.scaleX=t.scaleX,e.scaleY=t.scaleY;break;case U.first:e.scaleX+=(t.scaleX-e.scaleX)*n,e.scaleY+=(t.scaleY-e.scaleY)*n;break}return}let l,o;const h=et.search(c,s,3),d=this.curves[h/3];switch(d){case 0:{const m=c[h];l=c[h+1],o=c[h+2];const f=(s-m)/(c[h+3]-m);l+=(c[h+3+1]-l)*f,o+=(c[h+3+2]-o)*f;break}case 1:l=c[h+1],o=c[h+2];break;default:l=this.getBezierValue(s,h,1,d-2),o=this.getBezierValue(s,h,2,d+18-2)}if(l*=t.scaleX,o*=t.scaleY,n===1&&!r)e.scaleX=l,e.scaleY=o;else{let m=0,f=0;i===U.setup?(m=t.scaleX,f=t.scaleY):(m=e.scaleX,f=e.scaleY),r?(e.scaleX=m+(l-t.scaleX)*n,e.scaleY=f+(o-t.scaleY)*n):a?(e.scaleX=m+(Math.abs(l)*Math.sign(m)-m)*n,e.scaleY=f+(Math.abs(o)*Math.sign(f)-f)*n):(m=Math.abs(m)*Math.sign(l),f=Math.abs(f)*Math.sign(o),e.scaleX=m+(l-m)*n,e.scaleY=f+(o-f)*n)}}},ds=class extends Ut{constructor(e,t,s){super(e,t,s,G.scaleX)}apply1(e,t,s,n,i,r,a){e.scaleX=this.getScaleValue(s,n,i,r,a,e.scaleX,t.scaleX)}},us=class extends Ut{constructor(e,t,s){super(e,t,s,G.scaleY)}apply1(e,t,s,n,i,r,a){e.scaleY=this.getScaleValue(s,n,i,r,a,e.scaleY,t.scaleY)}},fs=class extends Fe{constructor(e,t,s){super(e,t,s,G.shearX,G.shearY)}apply1(e,t,s,n,i,r,a){const c=this.frames;if(s<c[0]){switch(i){case U.setup:e.shearX=t.shearX,e.shearY=t.shearY;break;case U.first:e.shearX+=(t.shearX-e.shearX)*n,e.shearY+=(t.shearY-e.shearY)*n;break}return}let l=0,o=0;const h=et.search(c,s,3),d=this.curves[h/3];switch(d){case 0:{const m=c[h];l=c[h+1],o=c[h+2];const f=(s-m)/(c[h+3]-m);l+=(c[h+3+1]-l)*f,o+=(c[h+3+2]-o)*f;break}case 1:l=c[h+1],o=c[h+2];break;default:l=this.getBezierValue(s,h,1,d-2),o=this.getBezierValue(s,h,2,d+18-2)}i===U.setup?(e.shearX=t.shearX+l*n,e.shearY=t.shearY+o*n):r?(e.shearX+=l*n,e.shearY+=o*n):(e.shearX+=(t.shearX+l-e.shearX)*n,e.shearY+=(t.shearY+o-e.shearY)*n)}},ms=class extends Ut{constructor(e,t,s){super(e,t,s,G.shearX)}apply1(e,t,s,n,i,r,a){e.shearX=this.getRelativeValue(s,n,i,r,e.shearX,t.shearX)}},ps=class extends Ut{constructor(e,t,s){super(e,t,s,G.shearY)}apply1(e,t,s,n,i,r,a){e.shearY=this.getRelativeValue(s,n,i,r,e.shearY,t.shearY)}},gs=class extends et{boneIndex;constructor(e,t){super(e,`${G.inherit}|${t}`),this.boneIndex=t,this.instant=!0}getFrameEntries(){return 2}setFrame(e,t,s){e*=2,this.frames[e]=t,this.frames[e+1]=s}apply(e,t,s,n,i,r,a,c,l){const o=e.bones[this.boneIndex];if(!o.active)return;const h=l?o.appliedPose:o.pose;if(c)r!==U.current&&(h.inherit=o.data.setupPose.inherit);else{const d=this.frames;s<d[0]?r!==U.current&&(h.inherit=o.data.setupPose.inherit):h.inherit=this.frames[et.search(d,s,2)+1]}}},ge=class extends Nt{slotIndex;constructor(e,t,s,...n){super(e,t,...n),this.slotIndex=s}apply(e,t,s,n,i,r,a,c,l){const o=e.slots[this.slotIndex];o.bone.active&&this.apply1(o,l?o.appliedPose:o.pose,s,i,r,a)}},xs=class extends ge{constructor(e,t,s){super(e,t,s,`${G.rgb}|${s}`,`${G.alpha}|${s}`)}getFrameEntries(){return 5}setFrame(e,t,s,n,i,r){e*=5,this.frames[e]=t,this.frames[e+1]=s,this.frames[e+2]=n,this.frames[e+3]=i,this.frames[e+4]=r}apply1(e,t,s,n,i,r){const a=t.color,c=this.frames;if(s<c[0]){const u=e.data.setupPose.color;switch(i){case U.setup:a.setFromColor(u);break;case U.first:a.add((u.r-a.r)*n,(u.g-a.g)*n,(u.b-a.b)*n,(u.a-a.a)*n);break}return}let l=0,o=0,h=0,d=0;const m=et.search(c,s,5),f=this.curves[m/5];switch(f){case 0:{const u=c[m];l=c[m+1],o=c[m+2],h=c[m+3],d=c[m+4];const g=(s-u)/(c[m+5]-u);l+=(c[m+5+1]-l)*g,o+=(c[m+5+2]-o)*g,h+=(c[m+5+3]-h)*g,d+=(c[m+5+4]-d)*g;break}case 1:l=c[m+1],o=c[m+2],h=c[m+3],d=c[m+4];break;default:l=this.getBezierValue(s,m,1,f-2),o=this.getBezierValue(s,m,2,f+18-2),h=this.getBezierValue(s,m,3,f+36-2),d=this.getBezierValue(s,m,4,f+54-2)}if(n===1)a.set(l,o,h,d);else if(i===U.setup){const u=e.data.setupPose.color;a.set(u.r+(l-u.r)*n,u.g+(o-u.g)*n,u.b+(h-u.b)*n,u.a+(d-u.a)*n)}else a.add((l-a.r)*n,(o-a.g)*n,(h-a.b)*n,(d-a.a)*n)}},bs=class extends ge{constructor(e,t,s){super(e,t,s,`${G.rgb}|${s}`)}getFrameEntries(){return 4}setFrame(e,t,s,n,i){e<<=2,this.frames[e]=t,this.frames[e+1]=s,this.frames[e+2]=n,this.frames[e+3]=i}apply1(e,t,s,n,i,r){const a=t.color;let c=0,l=0,o=0;const h=this.frames;if(s<h[0]){const f=e.data.setupPose.color;switch(i){case U.setup:{a.r=f.r,a.g=f.g,a.b=f.b;break}case U.first:{a.r+=(f.r-a.r)*n,a.g+=(f.g-a.g)*n,a.b+=(f.b-a.b)*n;break}}return}const d=et.search(h,s,4),m=this.curves[d>>2];switch(m){case 0:{const f=h[d];c=h[d+1],l=h[d+2],o=h[d+3];const u=(s-f)/(h[d+4]-f);c+=(h[d+4+1]-c)*u,l+=(h[d+4+2]-l)*u,o+=(h[d+4+3]-o)*u;break}case 1:c=h[d+1],l=h[d+2],o=h[d+3];break;default:c=this.getBezierValue(s,d,1,m-2),l=this.getBezierValue(s,d,2,m+18-2),o=this.getBezierValue(s,d,3,m+36-2)}if(n!==1)if(i===U.setup){const f=e.data.setupPose.color;c=f.r+(c-f.r)*n,l=f.g+(l-f.g)*n,o=f.b+(o-f.b)*n}else c=a.r+(c-a.r)*n,l=a.g+(l-a.g)*n,o=a.b+(o-a.b)*n;a.r=c<0?0:c>1?1:c,a.g=l<0?0:l>1?1:l,a.b=o<0?0:o>1?1:o}},ws=class extends me{slotIndex=0;constructor(e,t,s){super(e,t,`${G.alpha}|${s}`),this.slotIndex=s}apply(e,t,s,n,i,r,a,c,l){const o=e.slots[this.slotIndex];if(!o.bone.active)return;const h=(l?o.appliedPose:o.pose).color;let d=0;const m=this.frames;if(s<m[0]){const f=o.data.setupPose.color.a;switch(r){case U.setup:h.a=f;break;case U.first:h.a+=(f-h.a)*i;break}return}if(d=this.getCurveValue(s),i!==1)if(r===U.setup){const f=o.data.setupPose.color;d=f.a+(d-f.a)*i}else d=h.a+(d-h.a)*i;h.a=d<0?0:d>1?1:d}},ys=class extends ge{constructor(e,t,s){super(e,t,s,`${G.rgb}|${s}`,`${G.alpha}|${s}`,`${G.rgb2}|${s}`)}getFrameEntries(){return 8}setFrame(e,t,s,n,i,r,a,c,l){e<<=3,this.frames[e]=t,this.frames[e+1]=s,this.frames[e+2]=n,this.frames[e+3]=i,this.frames[e+4]=r,this.frames[e+5]=a,this.frames[e+6]=c,this.frames[e+7]=l}apply1(e,t,s,n,i,r){const a=t.color,c=t.darkColor;let l=0,o=0,h=0;const d=this.frames;if(s<d[0]){const b=e.data.setupPose,w=b.color,v=b.darkColor;switch(i){case U.setup:{a.setFromColor(w),c.r=v.r,c.g=v.g,c.b=v.b;break}case U.first:{a.add((w.r-a.r)*n,(w.g-a.g)*n,(w.b-a.b)*n,(w.a-a.a)*n),c.r+=(v.r-c.r)*n,c.g+=(v.g-c.g)*n,c.b+=(v.b-c.b)*n;break}}return}let m=0,f=0,u=0,g=0;const p=et.search(d,s,8),x=this.curves[p>>3];switch(x){case 0:{const b=d[p];m=d[p+1],f=d[p+2],u=d[p+3],g=d[p+4],l=d[p+5],o=d[p+6],h=d[p+7];const w=(s-b)/(d[p+8]-b);m+=(d[p+8+1]-m)*w,f+=(d[p+8+2]-f)*w,u+=(d[p+8+3]-u)*w,g+=(d[p+8+4]-g)*w,l+=(d[p+8+5]-l)*w,o+=(d[p+8+6]-o)*w,h+=(d[p+8+7]-h)*w;break}case 1:m=d[p+1],f=d[p+2],u=d[p+3],g=d[p+4],l=d[p+5],o=d[p+6],h=d[p+7];break;default:m=this.getBezierValue(s,p,1,x-2),f=this.getBezierValue(s,p,2,x+18-2),u=this.getBezierValue(s,p,3,x+36-2),g=this.getBezierValue(s,p,4,x+54-2),l=this.getBezierValue(s,p,5,x+72-2),o=this.getBezierValue(s,p,6,x+90-2),h=this.getBezierValue(s,p,7,x+108-2)}if(n===1)a.set(m,f,u,g);else if(i===U.setup){const b=e.data.setupPose;let w=b.color;a.set(w.r+(m-w.r)*n,w.g+(f-w.g)*n,w.b+(u-w.b)*n,w.a+(g-w.a)*n),w=b.darkColor,l=w.r+(l-w.r)*n,o=w.g+(o-w.g)*n,h=w.b+(h-w.b)*n}else a.add((m-a.r)*n,(f-a.g)*n,(u-a.b)*n,(g-a.a)*n),l=c.r+(l-c.r)*n,o=c.g+(o-c.g)*n,h=c.b+(h-c.b)*n;c.r=l<0?0:l>1?1:l,c.g=o<0?0:o>1?1:o,c.b=h<0?0:h>1?1:h}},vs=class extends ge{constructor(e,t,s){super(e,t,s,`${G.rgb}|${s}`,`${G.rgb2}|${s}`)}getFrameEntries(){return 7}setFrame(e,t,s,n,i,r,a,c){e*=7,this.frames[e]=t,this.frames[e+1]=s,this.frames[e+2]=n,this.frames[e+3]=i,this.frames[e+4]=r,this.frames[e+5]=a,this.frames[e+6]=c}apply1(e,t,s,n,i,r){const a=t.color,c=t.darkColor;let l=0,o=0,h=0,d=0,m=0,f=0;const u=this.frames;if(s<u[0]){const x=e.data.setupPose,b=x.color,w=x.darkColor;switch(i){case U.setup:a.r=b.r,a.g=b.g,a.b=b.b,c.r=w.r,c.g=w.g,c.b=w.b;break;case U.first:a.r+=(b.r-a.r)*n,a.g+=(b.g-a.g)*n,a.b+=(b.b-a.b)*n,c.r+=(w.r-c.r)*n,c.g+=(w.g-c.g)*n,c.b+=(w.b-c.b)*n;break}return}const g=et.search(u,s,7),p=this.curves[g/7];switch(p){case 0:{const x=u[g];l=u[g+1],o=u[g+2],h=u[g+3],d=u[g+4],m=u[g+5],f=u[g+6];const b=(s-x)/(u[g+7]-x);l+=(u[g+7+1]-l)*b,o+=(u[g+7+2]-o)*b,h+=(u[g+7+3]-h)*b,d+=(u[g+7+4]-d)*b,m+=(u[g+7+5]-m)*b,f+=(u[g+7+6]-f)*b;break}case 1:l=u[g+1],o=u[g+2],h=u[g+3],d=u[g+4],m=u[g+5],f=u[g+6];break;default:l=this.getBezierValue(s,g,1,p-2),o=this.getBezierValue(s,g,2,p+18-2),h=this.getBezierValue(s,g,3,p+36-2),d=this.getBezierValue(s,g,4,p+54-2),m=this.getBezierValue(s,g,5,p+72-2),f=this.getBezierValue(s,g,6,p+90-2)}if(n!==1)if(i===U.setup){const x=e.data.setupPose;let b=x.color;l=b.r+(l-b.r)*n,o=b.g+(o-b.g)*n,h=b.b+(h-b.b)*n,b=x.darkColor,d=b.r+(d-b.r)*n,m=b.g+(m-b.g)*n,f=b.b+(f-b.b)*n}else l=a.r+(l-a.r)*n,o=a.g+(o-a.g)*n,h=a.b+(h-a.b)*n,d=c.r+(d-c.r)*n,m=c.g+(m-c.g)*n,f=c.b+(f-c.b)*n;a.r=l<0?0:l>1?1:l,a.g=o<0?0:o>1?1:o,a.b=h<0?0:h>1?1:h,c.r=d<0?0:d>1?1:d,c.g=m<0?0:m>1?1:m,c.b=f<0?0:f>1?1:f}},ne=class extends et{slotIndex=0;attachmentNames;constructor(e,t){super(e,`${G.attachment}|${t}`),this.slotIndex=t,this.attachmentNames=new Array(e),this.instant=!0}getFrameCount(){return this.frames.length}setFrame(e,t,s){this.frames[e]=t,this.attachmentNames[e]=s}apply(e,t,s,n,i,r,a,c,l){const o=e.slots[this.slotIndex];if(!o.bone.active)return;const h=l?o.appliedPose:o.pose;c||s<this.frames[0]?r!==U.current&&this.setAttachment(e,h,o.data.attachmentName):this.setAttachment(e,h,this.attachmentNames[et.search(this.frames,s)])}setAttachment(e,t,s){t.setAttachment(s?e.getAttachment(this.slotIndex,s):null)}},Ts=class extends Nt{slotIndex;attachment;vertices;constructor(e,t,s,n){super(e,t,`${G.deform}|${s}|${n.id}`),this.slotIndex=s,this.attachment=n,this.vertices=new Array(e),this.additive=!0}getFrameCount(){return this.frames.length}setFrame(e,t,s){this.frames[e]=t,this.vertices[e]=s}setBezier(e,t,s,n,i,r,a,c,l,o,h){const d=this.curves;let m=this.getFrameCount()+e*18;s===0&&(d[t]=2+m);const f=(n-r*2+c)*.03,u=l*.03-a*.06,g=((r-c)*3-n+o)*.006,p=(a-l+.33333333)*.018;let x=f*2+g,b=u*2+p,w=(r-n)*.3+f+g*.16666667,v=a*.3+u+p*.16666667,y=n+w,T=v;for(let S=m+18;m<S;m+=2)d[m]=y,d[m+1]=T,w+=x,v+=b,x+=g,b+=p,y+=w,T+=v}getCurvePercent(e,t){const s=this.curves;let n=s[t];switch(n){case 0:{const c=this.frames[t];return(e-c)/(this.frames[t+this.getFrameEntries()]-c)}case 1:return 0}if(n-=2,s[n]>e){const c=this.frames[t];return s[n+1]*(e-c)/(s[n]-c)}const i=n+18;for(n+=2;n<i;n+=2)if(s[n]>=e){const c=s[n-2],l=s[n-1];return l+(e-c)/(s[n]-c)*(s[n+1]-l)}const r=s[i-2],a=s[i-1];return a+(1-a)*(e-r)/(this.frames[t+this.getFrameEntries()]-r)}apply(e,t,s,n,i,r,a,c,l){const o=e.slots;if(!this.attachment.isTimelineActive(o,this.slotIndex,l))return;const h=this.attachment.timelineSlots,d=this.frames;if(s<d[0]){this.applyBeforeFirst(o[this.slotIndex],l,i,r);for(const p of h)this.applyBeforeFirst(o[p],l,i,r);return}let m,f,u;if(s>=d[d.length-1])u=0,m=this.vertices[d.length-1],f=null;else{const p=et.search(d,s);u=this.getCurvePercent(s,p),m=this.vertices[p],f=this.vertices[p+1]}const g=this.vertices[0].length;this.applyToSlot(o[this.slotIndex],l,m,f,u,g,i,r,a);for(const p of h)this.applyToSlot(o[p],l,m,f,u,g,i,r,a)}applyBeforeFirst(e,t,s,n){if(!e.bone.active)return;const i=t?e.appliedPose:e.pose;if(i.attachment==null||i.attachment.timelineAttachment!==this.attachment)return;const r=i.deform;switch(r.length===0&&(n=U.setup),n){case U.setup:r.length=0;break;case U.first:{if(s===1){r.length=0;return}const a=this.vertices[0].length;r.length=a;const c=r,l=i.attachment;if(l.bones===null){const o=l.vertices;for(let h=0;h<a;h++)c[h]+=(o[h]-c[h])*s}else{s=1-s;for(let o=0;o<a;o++)c[o]*=s}}}}applyToSlot(e,t,s,n,i,r,a,c,l){if(!e.bone.active)return;const o=t?e.appliedPose:e.pose;if(o.attachment===null||o.attachment.timelineAttachment!==this.attachment)return;const h=o.attachment,d=o.deform;d.length===0&&(c=U.setup);const m=c===U.setup;if(d.length=r,n===null)if(a===1)if(l&&!m)if(h.bones)for(let f=0;f<r;f++)d[f]+=s[f];else{const f=h.vertices;for(let u=0;u<r;u++)d[u]+=s[u]-f[u]}else L.arrayCopy(s,0,d,0,r);else if(m)if(h.bones)for(let f=0;f<r;f++)d[f]=s[f]*a;else{const f=h.vertices;for(let u=0;u<r;u++){const g=f[u];d[u]=g+(s[u]-g)*a}}else if(l)if(h.bones)for(let f=0;f<r;f++)d[f]+=s[f]*a;else{const f=h.vertices;for(let u=0;u<r;u++)d[u]+=(s[u]-f[u])*a}else for(let f=0;f<r;f++)d[f]+=(s[f]-d[f])*a;else if(a===1)if(l&&!m)if(h.bones)for(let f=0;f<r;f++){const u=s[f];d[f]+=u+(n[f]-u)*i}else{const f=h.vertices;for(let u=0;u<r;u++){const g=s[u];d[u]+=g+(n[u]-g)*i-f[u]}}else if(i===0)L.arrayCopy(s,0,d,0,r);else for(let f=0;f<r;f++){const u=s[f];d[f]=u+(n[f]-u)*i}else if(m)if(h.bones)for(let f=0;f<r;f++){const u=s[f];d[f]=(u+(n[f]-u)*i)*a}else{const f=h.vertices;for(let u=0;u<r;u++){const g=s[u],p=f[u];d[u]=p+(g+(n[u]-g)*i-p)*a}}else if(l)if(h.bones)for(let f=0;f<r;f++){const u=s[f];d[f]+=(u+(n[f]-u)*i)*a}else{const f=h.vertices;for(let u=0;u<r;u++){const g=s[u];d[u]+=(g+(n[u]-g)*i-f[u])*a}}else for(let f=0;f<r;f++){const u=s[f];d[f]+=(u+(n[f]-u)*i-d[f])*a}}},Ss=class Wt extends et{static ENTRIES=3;static MODE=1;static DELAY=2;slotIndex;attachment;constructor(t,s,n){super(t,`${G.sequence}|${s}|${n.sequence.id}`),this.slotIndex=s,this.attachment=n,this.instant=!0}getFrameEntries(){return Wt.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,s,n,i,r){const a=this.frames;t*=Wt.ENTRIES,a[t]=s,a[t+Wt.MODE]=n|i<<4,a[t+Wt.DELAY]=r}apply(t,s,n,i,r,a,c,l,o){const h=t.slots;if(!this.attachment.isTimelineActive(h,this.slotIndex,o))return;const d=this.attachment.timelineSlots,m=this.frames;if(l||n<m[0]){if(a!==U.current){this.setupPose(h[this.slotIndex],o);for(const x of d)this.setupPose(h[x],o)}return}const f=et.search(m,n,Wt.ENTRIES),u=m[f],g=m[f+Wt.MODE],p=m[f+Wt.DELAY];this.applyToSlot(h[this.slotIndex],o,n,u,g,p);for(const x of d)this.applyToSlot(h[x],o,n,u,g,p)}setupPose(t,s){if(!t.bone.active)return;const n=s?t.appliedPose:t.pose;n.attachment===null||n.attachment.timelineAttachment!==this.attachment||(n.sequenceIndex=-1)}applyToSlot(t,s,n,i,r,a){if(!t.bone.active)return;const c=s?t.appliedPose:t.pose;if(c.attachment===null||c.attachment.timelineAttachment!==this.attachment)return;let l=r>>4,o=c.attachment.sequence.regions.length;const h=os[r&15];if(h!==at.hold)switch(l+=(n-i)/a+1e-5|0,h){case at.once:l=Math.min(o-1,l);break;case at.loop:l%=o;break;case at.pingpong:{const d=(o<<1)-2;l=d===0?0:l%d,l>=o&&(l=d-l);break}case at.onceReverse:l=Math.max(o-1-l,0);break;case at.loopReverse:l=o-1-l%o;break;case at.pingpongReverse:{const d=(o<<1)-2;l=d===0?0:(l+o-1)%d,l>=o&&(l=d-l)}}c.sequenceIndex=l}},Ye=class jn extends et{static propertyIds=[`${G.event}`];events;constructor(t){super(t,...jn.propertyIds),this.events=new Array(t),this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,s){this.frames[t]=s.time,this.events[t]=s}apply(t,s,n,i,r,a,c,l,o){if(!i)return;const h=this.frames,d=this.frames.length;if(s>n)this.apply(null,s,Number.MAX_VALUE,i,0,a,!1,!1,!1),s=-1;else if(s>=h[d-1])return;if(n<h[0])return;let m=0;if(s<h[0])m=0;else{m=et.search(h,s)+1;const f=h[m];for(;m>0&&h[m-1]===f;)m--}for(;m<d&&n>=h[m];m++)i.push(this.events[m])}},Ht=class hn extends et{static propertyID=`${G.drawOrder}`;static propertyIds=[hn.propertyID];drawOrders;constructor(t){super(t,...hn.propertyIds),this.drawOrders=new Array(t),this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,s,n){this.frames[t]=s,this.drawOrders[t]=n}apply(t,s,n,i,r,a,c,l,o){const h=o?t.drawOrder.appliedPose:t.drawOrder.pose,d=t.slots;if(l||n<this.frames[0]){a!==U.current&&L.arrayCopy(d,0,h,0,t.slots.length);return}const m=this.drawOrders[et.search(this.frames,n)];if(!m)L.arrayCopy(d,0,h,0,t.slots.length);else for(let f=0,u=m.length;f<u;f++)h[f]=d[m[f]]}},xe=class dn extends et{static propertyID=`${G.drawOrderFolder}`;slots;inFolder;drawOrders;constructor(t,s,n){super(t,...dn.propertyIds(s)),this.slots=s,this.drawOrders=new Array(t),this.inFolder=new Array(n);for(const i of s)this.inFolder[i]=!0;this.instant=!0}static propertyIds(t){const s=t.length,n=new Array(s);for(let i=0;i<s;i++)n[i]=`${dn.propertyID}|${t[i]}`;return n}getFrameCount(){return this.frames.length}getSlots(){return this.slots}getDrawOrders(){return this.drawOrders}setFrame(t,s,n){this.frames[t]=s,this.drawOrders[t]=n}apply(t,s,n,i,r,a,c,l,o){const h=o?t.drawOrder.appliedPose:t.drawOrder.pose,d=t.slots;if(l||n<this.frames[0])a!==U.current&&this.setup(h,d);else{const m=this.drawOrders[et.search(this.frames,n)];if(!m)this.setup(h,d);else{const f=this.inFolder,u=this.slots;for(let g=0,p=0,x=u.length;!(f[h[g].data.index]&&(h[g]=d[u[m[p]]],++p===x));g++);}}}setup(t,s){const{inFolder:n,slots:i}=this;for(let r=0,a=0,c=i.length;!(n[t[r].data.index]&&(t[r]=s[i[a]],++a===c));r++);}};function vn(e){return typeof e=="object"&&e!==null&&typeof e.constraintIndex=="number"}var Cs=class extends Nt{constraintIndex=0;constructor(e,t,s){super(e,t,`${G.ikConstraint}|${s}`),this.constraintIndex=s}getFrameEntries(){return 6}setFrame(e,t,s,n,i,r,a){e*=6,this.frames[e]=t,this.frames[e+1]=s,this.frames[e+2]=n,this.frames[e+3]=i,this.frames[e+4]=r?1:0,this.frames[e+5]=a?1:0}apply(e,t,s,n,i,r,a,c,l){const o=e.constraints[this.constraintIndex];if(!o.active)return;const h=l?o.appliedPose:o.pose,d=this.frames;if(s<d[0]){const x=o.data.setupPose;switch(r){case U.setup:{h.mix=x.mix,h.softness=x.softness,h.bendDirection=x.bendDirection,h.compress=x.compress,h.stretch=x.stretch;break}case U.first:{h.mix+=(x.mix-h.mix)*i,h.softness+=(x.softness-h.softness)*i,h.bendDirection=x.bendDirection,h.compress=x.compress,h.stretch=x.stretch;break}}return}let m=0,f=0;const u=et.search(d,s,6),g=this.curves[u/6];switch(g){case 0:{const x=d[u];m=d[u+1],f=d[u+2];const b=(s-x)/(d[u+6]-x);m+=(d[u+6+1]-m)*b,f+=(d[u+6+2]-f)*b;break}case 1:m=d[u+1],f=d[u+2];break;default:m=this.getBezierValue(s,u,1,g-2),f=this.getBezierValue(s,u,2,g+18-2)}const p=r===U.setup?o.data.setupPose:h;h.mix=p.mix+(m-p.mix)*i,h.softness=p.softness+(f-p.softness)*i,c?r===U.setup&&(h.bendDirection=p.bendDirection,h.compress=p.compress,h.stretch=p.stretch):(h.bendDirection=d[u+3],h.compress=d[u+4]!==0,h.stretch=d[u+5]!==0)}},As=class extends Nt{constraintIndex=0;constructor(e,t,s){super(e,t,`${G.transformConstraint}|${s}`),this.constraintIndex=s,this.additive=!0}getFrameEntries(){return 7}setFrame(e,t,s,n,i,r,a,c){const l=this.frames;e*=7,l[e]=t,l[e+1]=s,l[e+2]=n,l[e+3]=i,l[e+4]=r,l[e+5]=a,l[e+6]=c}apply(e,t,s,n,i,r,a,c,l){const o=e.constraints[this.constraintIndex];if(!o.active)return;const h=l?o.appliedPose:o.pose,d=this.frames;if(s<d[0]){const y=o.data.setupPose;switch(r){case U.setup:{h.mixRotate=y.mixRotate,h.mixX=y.mixX,h.mixY=y.mixY,h.mixScaleX=y.mixScaleX,h.mixScaleY=y.mixScaleY,h.mixShearY=y.mixShearY;break}case U.first:{h.mixRotate+=(y.mixRotate-h.mixRotate)*i,h.mixX+=(y.mixX-h.mixX)*i,h.mixY+=(y.mixY-h.mixY)*i,h.mixScaleX+=(y.mixScaleX-h.mixScaleX)*i,h.mixScaleY+=(y.mixScaleY-h.mixScaleY)*i,h.mixShearY+=(y.mixShearY-h.mixShearY)*i;break}}return}let m,f,u,g,p,x;const b=et.search(d,s,7),w=this.curves[b/7];switch(w){case 0:{const y=d[b];m=d[b+1],f=d[b+2],u=d[b+3],g=d[b+4],p=d[b+5],x=d[b+6];const T=(s-y)/(d[b+7]-y);m+=(d[b+7+1]-m)*T,f+=(d[b+7+2]-f)*T,u+=(d[b+7+3]-u)*T,g+=(d[b+7+4]-g)*T,p+=(d[b+7+5]-p)*T,x+=(d[b+7+6]-x)*T;break}case 1:m=d[b+1],f=d[b+2],u=d[b+3],g=d[b+4],p=d[b+5],x=d[b+6];break;default:m=this.getBezierValue(s,b,1,w-2),f=this.getBezierValue(s,b,2,w+18-2),u=this.getBezierValue(s,b,3,w+36-2),g=this.getBezierValue(s,b,4,w+54-2),p=this.getBezierValue(s,b,5,w+72-2),x=this.getBezierValue(s,b,6,w+90-2)}const v=r===U.setup?o.data.setupPose:h;a?(h.mixRotate=v.mixRotate+m*i,h.mixX=v.mixX+f*i,h.mixY=v.mixY+u*i,h.mixScaleX=v.mixScaleX+g*i,h.mixScaleY=v.mixScaleY+p*i,h.mixShearY=v.mixShearY+x*i):(h.mixRotate=v.mixRotate+(m-v.mixRotate)*i,h.mixX=v.mixX+(f-v.mixX)*i,h.mixY=v.mixY+(u-v.mixY)*i,h.mixScaleX=v.mixScaleX+(g-v.mixScaleX)*i,h.mixScaleY=v.mixScaleY+(p-v.mixScaleY)*i,h.mixShearY=v.mixShearY+(x-v.mixShearY)*i)}},ie=class extends me{constraintIndex;constructor(e,t,s,n){super(e,t,`${n}|${s}`),this.constraintIndex=s}},ks=class extends ie{constructor(e,t,s){super(e,t,s,G.pathConstraintPosition),this.additive=!0}apply(e,t,s,n,i,r,a,c,l){const o=e.constraints[this.constraintIndex];if(o.active){const h=l?o.appliedPose:o.pose;h.position=this.getAbsoluteValue(s,i,r,a,h.position,o.data.setupPose.position)}}},Ps=class extends ie{constructor(e,t,s){super(e,t,s,G.pathConstraintSpacing)}apply(e,t,s,n,i,r,a,c,l){const o=e.constraints[this.constraintIndex];if(o.active){const h=l?o.appliedPose:o.pose;h.spacing=this.getAbsoluteValue(s,i,r,!1,h.spacing,o.data.setupPose.spacing)}}},Is=class extends Nt{constraintIndex;constructor(e,t,s){super(e,t,`${G.pathConstraintMix}|${s}`),this.constraintIndex=s}getFrameEntries(){return 4}setFrame(e,t,s,n,i){const r=this.frames;e<<=2,r[e]=t,r[e+1]=s,r[e+2]=n,r[e+3]=i}apply(e,t,s,n,i,r,a,c,l){const o=e.constraints[this.constraintIndex];if(!o.active)return;const h=l?o.appliedPose:o.pose,d=this.frames;if(s<d[0]){const b=o.data.setupPose;switch(r){case U.setup:{h.mixRotate=b.mixRotate,h.mixX=b.mixX,h.mixY=b.mixY;break}case U.first:{h.mixRotate+=(b.mixRotate-h.mixRotate)*i,h.mixX+=(b.mixX-h.mixX)*i,h.mixY+=(b.mixY-h.mixY)*i;break}}return}let m,f,u;const g=et.search(d,s,4),p=this.curves[g>>2];switch(p){case 0:{const b=d[g];m=d[g+1],f=d[g+2],u=d[g+3];const w=(s-b)/(d[g+4]-b);m+=(d[g+4+1]-m)*w,f+=(d[g+4+2]-f)*w,u+