@esotericsoftware/spine-player
Version:
The official Spine Runtimes for the web.
1 lines • 283 kB
JavaScript
"use strict";var $n=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}},Ni=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,i=e.length;s<i;s++)this.add(e[s]);return t!==this.size}contains(e){return this.entries[e]}clear(){this.entries={},this.size=0}},q=class se{constructor(t=0,s=0,i=0,n=0){this.r=t,this.g=s,this.b=i,this.a=n}static WHITE=new se(1,1,1,1);static RED=new se(1,0,0,1);static GREEN=new se(0,1,0,1);static BLUE=new se(0,0,1,1);static MAGENTA=new se(1,0,1,1);set(t,s,i,n){return this.r=t,this.g=s,this.b=i,this.a=n,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,i,n){return this.r+=t,this.g+=s,this.b+=i,this.a+=n,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 se){return s.setFromString(t)}},X=class Mt{static epsilon=1e-5;static epsilon2=Mt.epsilon*Mt.epsilon;static PI=3.1415927;static PI2=Mt.PI*2;static invPI2=1/Mt.PI2;static radiansToDegrees=180/Mt.PI;static radDeg=Mt.radiansToDegrees;static degreesToRadians=Mt.PI/180;static degRad=Mt.degreesToRadians;static clamp(t,s,i){return t<s?s:t>i?i:t}static cosDeg(t){return Math.cos(t*Mt.degRad)}static sinDeg(t){return Math.sin(t*Mt.degRad)}static atan2Deg(t,s){return Math.atan2(t,s)*Mt.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 Mt.randomTriangularWith(t,s,(t+s)*.5)}static randomTriangularWith(t,s,i){const n=Math.random(),r=s-t;return n<=(i-t)/r?t+Math.sqrt(n*r*(i-t)):s-Math.sqrt((1-n)*r*(s-i))}static isPowerOfTwo(t){return t&&(t&t-1)===0}},ge=class fe{static linear=new class extends fe{applyInternal(t){return t}};static smooth=new class extends fe{applyInternal(t){return t*t*(3-2*t)}};static slowFast=new class extends fe{applyInternal(t){return t*t}};static fastSlow=new class extends fe{applyInternal(t){return(t-1)*(t-1)*-1+1}};static circle=new class extends fe{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,i){return s===void 0||i===void 0?this.applyInternal(t):t+(s-t)*this.applyInternal(i)}},Ui=class extends ge{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}},Zn=class extends Ui{constructor(e){super(e)}applyInternal(e){return Math.pow(e-1,this.power)*(this.power%2===0?-1:1)+1}},O=class me{static SUPPORTS_TYPED_ARRAYS=typeof Float32Array<"u";static arrayCopy(t,s,i,n,r){for(let a=s,h=n;a<s+r;a++,h++)i[h]=t[a]}static arrayFill(t,s,i,n){for(let r=s;r<i;r++)t[r]=n}static setArraySize(t,s,i=0){const n=t.length;if(n===s)return t;if(t.length=s,n<s)for(let r=n;r<s;r++)t[r]=i;return t}static ensureArrayCapacity(t,s,i=0){return t.length>=s?t:me.setArraySize(t,s,i)}static newArray(t,s){const i=[];for(let n=0;n<t;n++)i[n]=s;return i}static newFloatArray(t){if(me.SUPPORTS_TYPED_ARRAYS)return new Float32Array(t);{const s=[];for(let i=0;i<s.length;i++)s[i]=0;return s}}static newShortArray(t){if(me.SUPPORTS_TYPED_ARRAYS)return new Int16Array(t);{const s=[];for(let i=0;i<s.length;i++)s[i]=0;return s}}static toFloatArray(t){return me.SUPPORTS_TYPED_ARRAYS?new Float32Array(t):t}static toSinglePrecision(t){return me.SUPPORTS_TYPED_ARRAYS?Math.fround(t):t}static webkit602BugfixHelper(t){}static contains(t,s,i=!0){for(let n=0;n<t.length;n++)if(t[n]===s)return!0;return!1}static enumValue(t,s){return t[s[0].toUpperCase()+s.slice(1)]}},Kn=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}`)}}},we=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}},zt=class{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}},Re=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)}},Jn=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}},us=class{_image;constructor(e){this._image=e}getImage(){return this._image}},Ye=(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",e))(Ye||{}),zi=(e=>(e[e.MirroredRepeat=33648]="MirroredRepeat",e[e.ClampToEdge=33071]="ClampToEdge",e[e.Repeat=10497]="Repeat",e))(zi||{}),qi=class{texture;u=0;v=0;u2=0;v2=0;width=0;height=0;degrees=0;offsetX=0;offsetY=0;originalWidth=0;originalHeight=0},Qn=class extends us{setFilters(e,t){}setWraps(e,t){}dispose(){}},fs=class{pages=[];regions=[];constructor(e){const t=new tr(e),s=new Array(4),i={};i.size=o=>{o.width=parseInt(s[1]),o.height=parseInt(s[2])},i.format=()=>{},i.filter=o=>{o.minFilter=O.enumValue(Ye,s[1]),o.magFilter=O.enumValue(Ye,s[2])},i.repeat=o=>{s[1].indexOf("x")!==-1&&(o.uWrap=10497),s[1].indexOf("y")!==-1&&(o.vWrap=10497)},i.pma=o=>{o.pma=s[1]==="true"};var n={};n.xy=o=>{o.x=parseInt(s[1]),o.y=parseInt(s[2])},n.size=o=>{o.width=parseInt(s[1]),o.height=parseInt(s[2])},n.bounds=o=>{o.x=parseInt(s[1]),o.y=parseInt(s[2]),o.width=parseInt(s[3]),o.height=parseInt(s[4])},n.offset=o=>{o.offsetX=parseInt(s[1]),o.offsetY=parseInt(s[2])},n.orig=o=>{o.originalWidth=parseInt(s[1]),o.originalHeight=parseInt(s[2])},n.offsets=o=>{o.offsetX=parseInt(s[1]),o.offsetY=parseInt(s[2]),o.originalWidth=parseInt(s[3]),o.originalHeight=parseInt(s[4])},n.rotate=o=>{const c=s[1];c==="true"?o.degrees=90:c!=="false"&&(o.degrees=parseInt(c))},n.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,h=null,l=null;for(;r!==null;)if(r.trim().length===0)a=null,r=t.readLine();else if(a){const o=new ms(a,r);for(;;){const c=t.readEntry(s,r=t.readLine());if(c===0)break;const d=n[s[0]];if(d)d(o);else{h||(h=[]),l||(l=[]),h.push(s[0]);const m=[];for(let u=0;u<c;u++)m.push(parseInt(s[u+1]));l.push(m)}}o.originalWidth===0&&o.originalHeight===0&&(o.originalWidth=o.width,o.originalHeight=o.height),h&&h.length>0&&l&&l.length>0&&(o.names=h,o.values=l,h=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 Wi(r.trim());t.readEntry(s,r=t.readLine())!==0;){const o=i[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()}},tr=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 i=1,n=s+1;;i++){const r=t.indexOf(",",n);if(r===-1)return e[i]=t.substr(n).trim(),i;if(e[i]=t.substr(n,r-n).trim(),n=r+1,i===4)return 4}}},Wi=class{name;minFilter=9728;magFilter=9728;uWrap=33071;vWrap=33071;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}},ms=class extends qi{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)}},ps=class Yn{static empty=[];name;timelineAttachment;timelineSlots=Yn.empty;constructor(t){if(!t)throw new Error("name cannot be null.");this.name=t,this.timelineAttachment=this}isTimelineActive(t,s,i){let n=t[s];if(n.bone.isActive()){const r=(i?n.getAppliedPose():n.getPose()).getAttachment();if(r!=null&&r.timelineAttachment===this)return!0}for(let r=0,a=this.timelineSlots.length;r<a;r++){if(n=t[this.timelineSlots[r]],!n.bone.isActive())continue;const h=(i?n.getAppliedPose():n.getPose()).getAttachment();if(h!=null&&h.timelineAttachment===this)return!0}return!1}},qt=class Pn extends ps{static nextID=0;id=Pn.nextID++;bones=null;vertices=[];worldVerticesLength=0;constructor(t){super(t)}computeWorldVertices(t,s,i,n,r,a,h){n=a+(n>>1)*h;const l=s.appliedPose.deform;let o=this.vertices;const c=this.bones;if(!c){l.length>0&&(o=l);const f=s.bone.appliedPose,g=f.worldX,p=f.worldY,w=f.a,x=f.b,b=f.c,v=f.d;for(let y=i,S=a;S<n;y+=2,S+=h){const T=o[y],A=o[y+1];r[S]=T*w+A*x+g,r[S+1]=T*b+A*v+p}return}let d=0,m=0;for(let f=0;f<i;f+=2){const g=c[d];d+=g+1,m+=g}const u=t.bones;if(l.length===0)for(let f=a,g=m*3;f<n;f+=h){let p=0,w=0,x=c[d++];for(x+=d;d<x;d++,g+=3){const b=u[c[d]].appliedPose,v=o[g],y=o[g+1],S=o[g+2];p+=(v*b.a+y*b.b+b.worldX)*S,w+=(v*b.c+y*b.d+b.worldY)*S}r[f]=p,r[f+1]=w}else{const f=l;for(let g=a,p=m*3,w=m<<1;g<n;g+=h){let x=0,b=0,v=c[d++];for(v+=d;d<v;d++,p+=3,w+=2){const y=u[c[d]].appliedPose,S=o[p]+f[w],T=o[p+1]+f[w+1],A=o[p+2];x+=(S*y.a+T*y.b+y.worldX)*A,b+=(S*y.c+T*y.d+y.worldY)*A}r[g]=x,r[g+1]=b}}}copyTo(t){this.bones?(t.bones=[],O.arrayCopy(this.bones,0,t.bones,0,this.bones.length)):t.bones=null,this.vertices&&(t.vertices=O.newFloatArray(this.vertices.length),O.arrayCopy(this.vertices,0,t.vertices,0,this.vertices.length)),t.worldVerticesLength=this.worldVerticesLength,t.timelineAttachment=this.timelineAttachment,t.timelineSlots=this.timelineSlots}},Nt=class Yi extends qt{sequence;regionUVs=[];triangles=[];hullLength=0;path;color=new q(1,1,1,1);sourceMesh=null;edges=[];width=0;height=0;tempColor=new q(0,0,0,0);constructor(t,s){super(t),this.sequence=s}copy(){if(this.sourceMesh)return this.newLinkedMesh();const t=new Yi(this.name,this.sequence.copy());return t.path=this.path,t.color.setFromColor(this.color),this.copyTo(t),t.regionUVs=[],O.arrayCopy(this.regionUVs,0,t.regionUVs,0,this.regionUVs.length),t.triangles=[],O.arrayCopy(this.triangles,0,t.triangles,0,this.triangles.length),t.hullLength=this.hullLength,this.edges&&(t.edges=[],O.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 Yi(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,i){if(!t)throw new Error("Region not set.");const n=i.length;let r=t.u,a=t.v,h=0,l=0;if(t instanceof ms){const o=t.page,c=o.width,d=o.height;switch(t.degrees){case 90:r-=(t.originalHeight-t.offsetY-t.height)/c,a-=(t.originalWidth-t.offsetX-t.width)/d,h=t.originalHeight/c,l=t.originalWidth/d;for(let m=0;m<n;m+=2)i[m]=r+s[m+1]*h,i[m+1]=a+(1-s[m])*l;return;case 180:r-=(t.originalWidth-t.offsetX-t.width)/c,a-=t.offsetY/d,h=t.originalWidth/c,l=t.originalHeight/d;for(let m=0;m<n;m+=2)i[m]=r+(1-s[m])*h,i[m+1]=a+(1-s[m+1])*l;return;case 270:r-=t.offsetY/c,a-=t.offsetX/d,h=t.originalHeight/c,l=t.originalWidth/d;for(let m=0;m<n;m+=2)i[m]=r+(1-s[m+1])*h,i[m+1]=a+s[m]*l;return;default:r-=t.offsetX/c,a-=(t.originalHeight-t.offsetY-t.height)/d,h=t.originalWidth/c,l=t.originalHeight/d}}else t?(h=t.u2-r,l=t.v2-a):(r=a=0,h=l=1);for(let o=0;o<n;o+=2)i[o]=r+s[o]*h,i[o+1]=a+s[o+1]*l}},Wt=class Vn extends ps{sequence;x=0;y=0;scaleX=1;scaleY=1;rotation=0;width=0;height=0;path;color=new q(1,1,1,1);tempColor=new q(1,1,1,1);constructor(t,s){super(t),this.sequence=s}copy(){const t=new Vn(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,i,n,r){const a=t.bone.appliedPose,h=a.worldX,l=a.worldY,o=a.a,c=a.b,d=a.c,m=a.d;let u=s[0],f=s[1];i[n]=u*o+f*c+h,i[n+1]=u*d+f*m+l,n+=r,u=s[2],f=s[3],i[n]=u*o+f*c+h,i[n+1]=u*d+f*m+l,n+=r,u=s[4],f=s[5],i[n]=u*o+f*c+h,i[n+1]=u*d+f*m+l,n+=r,u=s[6],f=s[7],i[n]=u*o+f*c+h,i[n+1]=u*d+f*m+l}getOffsets(t){return this.sequence.offsets[this.sequence.resolveIndex(t)]}updateSequence(){this.sequence.update(this)}static computeUVs(t,s,i,n,r,a,h,l,o,c){if(!t)throw new Error("Region not set.");const d=h/t.originalWidth*n,m=l/t.originalHeight*r,u=-h/2*n+t.offsetX*d,f=-l/2*r+t.offsetY*m,g=u+t.width*d,p=f+t.height*m,w=a*X.degRad,x=Math.cos(w),b=Math.sin(w),v=u*x+s,y=u*b,S=f*x+i,T=f*b,A=g*x+s,C=g*b,E=p*x+i,k=p*b;o[0]=v-T,o[1]=S+y,o[2]=v-k,o[3]=E+y,o[4]=A-k,o[5]=E+C,o[6]=A-T,o[7]=S+C,t==null?(c[0]=0,c[1]=0,c[2]=0,c[3]=1,c[4]=1,c[5]=1,c[6]=1,c[7]=0):(c[1]=t.v2,c[2]=t.u,c[5]=t.v,c[6]=t.u2,t.degrees===90?(c[0]=t.u2,c[3]=t.v2,c[4]=t.u,c[7]=t.v):(c[0]=t.u,c[3]=t.v,c[4]=t.u2,c[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},xe=class cs{static _nextID=0;id=cs.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 cs(t,this.pathSuffix);if(O.arrayCopy(this.regions,0,s.regions,0,t),s.start=this.start,s.digits=this.digits,s.setupIndex=this.setupIndex,this.uvs!=null){const i=this.uvs[0].length;s.uvs=[];for(let n=0;n<t;n++)s.uvs[n]=O.newFloatArray(i),O.arrayCopy(this.uvs[n],0,s.uvs[n],0,i)}if(this.offsets!=null){s.offsets=[];for(let i=0;i<t;i++)s.offsets[i]=[],O.arrayCopy(this.offsets[i],0,s.offsets[i],0,8)}return s}update(t){const s=this.regions.length;if(t instanceof Wt){this.uvs=[],this.offsets=[];for(let i=0;i<s;i++)this.uvs[i]=O.newFloatArray(8),this.offsets[i]=[],Wt.computeUVs(this.regions[i],t.x,t.y,t.scaleX,t.scaleY,t.rotation,t.width,t.height,this.offsets[i],this.uvs[i])}else if(t instanceof Nt){const i=t.regionUVs;this.uvs=[],this.offsets=void 0;for(let n=0;n<s;n++)this.uvs[n]=O.newFloatArray(i.length),Nt.computeUVs(this.regions[n],i,this.uvs[n])}}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 i=t;const n=(this.start+s).toString();for(let r=this.digits-n.length;r>0;r--)i+="0";return i+=n,i}static nextID(){return cs._nextID++}},gs=(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",e))(gs||{}),ws=[0,1,2,3,4,5,6],Pe=class{name;timelines=[];timelineIds;bones;color=new q(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 Ni,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,i=e;for(let n=0;n<t;n++){const r=i[n];this.timelineIds.addAll(r.propertyIds),ji(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,i,n,r,a,h,l,o){if(!e)throw new Error("skeleton cannot be null.");i&&this.duration!==0&&(s%=this.duration,t>0&&(t%=this.duration));const c=this.timelines;for(let d=0,m=c.length;d<m;d++)c[d].apply(e,t,s,n,r,a,h,l,o)}},_i=(e=>(e[e.current=0]="current",e[e.setup=1]="setup",e[e.first=2]="first",e))(_i||{}),Gi=(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",e))(Gi||{}),pt=class{propertyIds;frames;additive=!1;instant=!1;constructor(e,...t){this.propertyIds=t,this.frames=O.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 i=e.length;for(let n=s;n<i;n+=s)if(e[n]>t)return n-s;return i-s}};function Hi(e){return typeof e=="object"&&e!==null&&typeof e.slotIndex=="number"}var _t=class extends pt{curves;constructor(e,t,...s){super(e,...s),this.curves=O.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=O.newFloatArray(t);O.arrayCopy(this.curves,0,s,0,t),this.curves=s}}setBezier(e,t,s,i,n,r,a,h,l,o,c){const d=this.curves;let m=this.getFrameCount()+e*18;s===0&&(d[t]=2+m);const u=(i-r*2+h)*.03,f=(n-a*2+l)*.03,g=((r-h)*3-i+o)*.006,p=((a-l)*3-n+c)*.006;let w=u*2+g,x=f*2+p,b=(r-i)*.3+u+g*.16666667,v=(a-n)*.3+f+p*.16666667,y=i+b,S=n+v;for(let T=m+18;m<T;m+=2)d[m]=y,d[m+1]=S,b+=w,v+=x,w+=g,x+=p,y+=b,S+=v}getBezierValue(e,t,s,i){const n=this.curves;if(n[i]>e){const l=this.frames[t],o=this.frames[t+s];return o+(e-l)/(n[i]-l)*(n[i+1]-o)}const r=i+18;for(i+=2;i<r;i+=2)if(n[i]>=e){const l=n[i-2],o=n[i-1];return o+(e-l)/(n[i]-l)*(n[i+1]-o)}t+=this.getFrameEntries();const a=n[r-2],h=n[r-1];return h+(e-a)/(this.frames[t]-a)*(this.frames[t+s]-h)}},be=class Fe extends _t{constructor(t,s,i){super(t,s,i)}getFrameEntries(){return 2}setFrame(t,s,i){t<<=1,this.frames[t]=s,this.frames[t+1]=i}getCurveValue(t){const s=this.frames;let i=s.length-2;for(let r=2;r<=i;r+=2)if(s[r]>t){i=r-2;break}const n=this.curves[i>>1];switch(n){case 0:{const r=s[i],a=s[i+1];return a+(t-r)/(s[i+2]-r)*(s[i+2+1]-a)}case 1:return s[i+1]}return this.getBezierValue(t,i,1,n-2)}getRelativeValue(t,s,i,n,r,a){if(t<this.frames[0])return Fe.beforeFirstKey(i,s,r,a);const h=this.getCurveValue(t);return i===1?a+h*s:r+(n?h:h+a-r)*s}getAbsoluteValue(t,s,i,n,r,a,h){return h===void 0?this.getAbsoluteValue1(t,s,i,n,r,a):this.getAbsoluteValue2(t,s,i,n,r,a,h)}getAbsoluteValue1(t,s,i,n,r,a){if(t<this.frames[0])return Fe.beforeFirstKey(i,s,r,a);const h=this.getCurveValue(t);return i===1?a+(n?h:h-a)*s:r+(n?h:h-r)*s}getAbsoluteValue2(t,s,i,n,r,a,h){return t<this.frames[0]?Fe.beforeFirstKey(i,s,r,a):i===1?a+(n?h:h-a)*s:r+(n?h:h-r)*s}getScaleValue(t,s,i,n,r,a,h){if(t<this.frames[0])return Fe.beforeFirstKey(i,s,a,h);const l=this.getCurveValue(t)*h;if(s===1&&!n)return l;let o=i===1?h:a;return n?o+(l-h)*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,i,n){switch(t){case 1:return n;case 2:return i+(n-i)*s;case 0:return i}}};function ji(e){return typeof e=="object"&&e!==null&&typeof e.boneIndex=="number"}var Gt=class extends be{boneIndex;constructor(e,t,s,i){super(e,t,`${i}|${s}`),this.boneIndex=s,this.additive=!0}apply(e,t,s,i,n,r,a,h,l){const o=e.bones[this.boneIndex];o.active&&this.apply1(l?o.appliedPose:o.pose,o.data.setupPose,s,n,r,a,h)}},Ve=class extends _t{boneIndex;constructor(e,t,s,i,n){super(e,t,`${i}|${s}`,`${n}|${s}`),this.boneIndex=s,this.additive=!0}getFrameEntries(){return 3}setFrame(e,t,s,i){e*=3,this.frames[e]=t,this.frames[e+1]=s,this.frames[e+2]=i}apply(e,t,s,i,n,r,a,h,l){const o=e.bones[this.boneIndex];o.active&&this.apply1(l?o.appliedPose:o.pose,o.data.setupPose,s,n,r,a,h)}},ye=class extends Gt{constructor(e,t,s){super(e,t,s,0)}apply1(e,t,s,i,n,r,a){e.rotation=this.getRelativeValue(s,i,n,r,e.rotation,t.rotation)}},xs=class extends Ve{constructor(e,t,s){super(e,t,s,1,2)}apply1(e,t,s,i,n,r,a){const h=this.frames;if(s<h[0]){switch(n){case 1:e.x=t.x,e.y=t.y;break;case 2:e.x+=(t.x-e.x)*i,e.y+=(t.y-e.y)*i;break}return}let l=0,o=0;const c=pt.search(h,s,3),d=this.curves[c/3];switch(d){case 0:{const m=h[c];l=h[c+1],o=h[c+2];const u=(s-m)/(h[c+3]-m);l+=(h[c+3+1]-l)*u,o+=(h[c+3+2]-o)*u;break}case 1:l=h[c+1],o=h[c+2];break;default:l=this.getBezierValue(s,c,1,d-2),o=this.getBezierValue(s,c,2,d+18-2)}n===1?(e.x=t.x+l*i,e.y=t.y+o*i):r?(e.x+=l*i,e.y+=o*i):(e.x+=(t.x+l-e.x)*i,e.y+=(t.y+o-e.y)*i)}},bs=class extends Gt{constructor(e,t,s){super(e,t,s,1)}apply1(e,t,s,i,n,r,a){e.x=this.getRelativeValue(s,i,n,r,e.x,t.x)}},ys=class extends Gt{constructor(e,t,s){super(e,t,s,2)}apply1(e,t,s,i,n,r,a){e.y=this.getRelativeValue(s,i,n,r,e.y,t.y)}},vs=class extends Ve{constructor(e,t,s){super(e,t,s,3,4)}apply1(e,t,s,i,n,r,a){const h=this.frames;if(s<h[0]){switch(n){case 1:e.scaleX=t.scaleX,e.scaleY=t.scaleY;break;case 2:e.scaleX+=(t.scaleX-e.scaleX)*i,e.scaleY+=(t.scaleY-e.scaleY)*i;break}return}let l,o;const c=pt.search(h,s,3),d=this.curves[c/3];switch(d){case 0:{const m=h[c];l=h[c+1],o=h[c+2];const u=(s-m)/(h[c+3]-m);l+=(h[c+3+1]-l)*u,o+=(h[c+3+2]-o)*u;break}case 1:l=h[c+1],o=h[c+2];break;default:l=this.getBezierValue(s,c,1,d-2),o=this.getBezierValue(s,c,2,d+18-2)}if(l*=t.scaleX,o*=t.scaleY,i===1&&!r)e.scaleX=l,e.scaleY=o;else{let m=0,u=0;n===1?(m=t.scaleX,u=t.scaleY):(m=e.scaleX,u=e.scaleY),r?(e.scaleX=m+(l-t.scaleX)*i,e.scaleY=u+(o-t.scaleY)*i):a?(e.scaleX=m+(Math.abs(l)*Math.sign(m)-m)*i,e.scaleY=u+(Math.abs(o)*Math.sign(u)-u)*i):(m=Math.abs(m)*Math.sign(l),u=Math.abs(u)*Math.sign(o),e.scaleX=m+(l-m)*i,e.scaleY=u+(o-u)*i)}}},Ss=class extends Gt{constructor(e,t,s){super(e,t,s,3)}apply1(e,t,s,i,n,r,a){e.scaleX=this.getScaleValue(s,i,n,r,a,e.scaleX,t.scaleX)}},Ts=class extends Gt{constructor(e,t,s){super(e,t,s,4)}apply1(e,t,s,i,n,r,a){e.scaleY=this.getScaleValue(s,i,n,r,a,e.scaleY,t.scaleY)}},As=class extends Ve{constructor(e,t,s){super(e,t,s,5,6)}apply1(e,t,s,i,n,r,a){const h=this.frames;if(s<h[0]){switch(n){case 1:e.shearX=t.shearX,e.shearY=t.shearY;break;case 2:e.shearX+=(t.shearX-e.shearX)*i,e.shearY+=(t.shearY-e.shearY)*i;break}return}let l=0,o=0;const c=pt.search(h,s,3),d=this.curves[c/3];switch(d){case 0:{const m=h[c];l=h[c+1],o=h[c+2];const u=(s-m)/(h[c+3]-m);l+=(h[c+3+1]-l)*u,o+=(h[c+3+2]-o)*u;break}case 1:l=h[c+1],o=h[c+2];break;default:l=this.getBezierValue(s,c,1,d-2),o=this.getBezierValue(s,c,2,d+18-2)}n===1?(e.shearX=t.shearX+l*i,e.shearY=t.shearY+o*i):r?(e.shearX+=l*i,e.shearY+=o*i):(e.shearX+=(t.shearX+l-e.shearX)*i,e.shearY+=(t.shearY+o-e.shearY)*i)}},Cs=class extends Gt{constructor(e,t,s){super(e,t,s,5)}apply1(e,t,s,i,n,r,a){e.shearX=this.getRelativeValue(s,i,n,r,e.shearX,t.shearX)}},Es=class extends Gt{constructor(e,t,s){super(e,t,s,6)}apply1(e,t,s,i,n,r,a){e.shearY=this.getRelativeValue(s,i,n,r,e.shearY,t.shearY)}},Is=class extends pt{boneIndex;constructor(e,t){super(e,`7|${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,i,n,r,a,h,l){const o=e.bones[this.boneIndex];if(!o.active)return;const c=l?o.appliedPose:o.pose;if(h)r!==0&&(c.inherit=o.data.setupPose.inherit);else{const d=this.frames;s<d[0]?r!==0&&(c.inherit=o.data.setupPose.inherit):c.inherit=this.frames[pt.search(d,s,2)+1]}}},ve=class extends _t{slotIndex;constructor(e,t,s,...i){super(e,t,...i),this.slotIndex=s}apply(e,t,s,i,n,r,a,h,l){const o=e.slots[this.slotIndex];o.bone.active&&this.apply1(o,l?o.appliedPose:o.pose,s,n,r,a)}},Ms=class extends ve{constructor(e,t,s){super(e,t,s,`8|${s}`,`9|${s}`)}getFrameEntries(){return 5}setFrame(e,t,s,i,n,r){e*=5,this.frames[e]=t,this.frames[e+1]=s,this.frames[e+2]=i,this.frames[e+3]=n,this.frames[e+4]=r}apply1(e,t,s,i,n,r){const a=t.color,h=this.frames;if(s<h[0]){const f=e.data.setupPose.color;switch(n){case 1:a.setFromColor(f);break;case 2:a.add((f.r-a.r)*i,(f.g-a.g)*i,(f.b-a.b)*i,(f.a-a.a)*i);break}return}let l=0,o=0,c=0,d=0;const m=pt.search(h,s,5),u=this.curves[m/5];switch(u){case 0:{const f=h[m];l=h[m+1],o=h[m+2],c=h[m+3],d=h[m+4];const g=(s-f)/(h[m+5]-f);l+=(h[m+5+1]-l)*g,o+=(h[m+5+2]-o)*g,c+=(h[m+5+3]-c)*g,d+=(h[m+5+4]-d)*g;break}case 1:l=h[m+1],o=h[m+2],c=h[m+3],d=h[m+4];break;default:l=this.getBezierValue(s,m,1,u-2),o=this.getBezierValue(s,m,2,u+18-2),c=this.getBezierValue(s,m,3,u+18*2-2),d=this.getBezierValue(s,m,4,u+18*3-2)}if(i===1)a.set(l,o,c,d);else if(n===1){const f=e.data.setupPose.color;a.set(f.r+(l-f.r)*i,f.g+(o-f.g)*i,f.b+(c-f.b)*i,f.a+(d-f.a)*i)}else a.add((l-a.r)*i,(o-a.g)*i,(c-a.b)*i,(d-a.a)*i)}},ks=class extends ve{constructor(e,t,s){super(e,t,s,`8|${s}`)}getFrameEntries(){return 4}setFrame(e,t,s,i,n){e<<=2,this.frames[e]=t,this.frames[e+1]=s,this.frames[e+2]=i,this.frames[e+3]=n}apply1(e,t,s,i,n,r){const a=t.color;let h=0,l=0,o=0;const c=this.frames;if(s<c[0]){const u=e.data.setupPose.color;switch(n){case 1:{a.r=u.r,a.g=u.g,a.b=u.b;break}case 2:{a.r+=(u.r-a.r)*i,a.g+=(u.g-a.g)*i,a.b+=(u.b-a.b)*i;break}}return}const d=pt.search(c,s,4),m=this.curves[d>>2];switch(m){case 0:{const u=c[d];h=c[d+1],l=c[d+2],o=c[d+3];const f=(s-u)/(c[d+4]-u);h+=(c[d+4+1]-h)*f,l+=(c[d+4+2]-l)*f,o+=(c[d+4+3]-o)*f;break}case 1:h=c[d+1],l=c[d+2],o=c[d+3];break;default:h=this.getBezierValue(s,d,1,m-2),l=this.getBezierValue(s,d,2,m+18-2),o=this.getBezierValue(s,d,3,m+18*2-2)}if(i!==1)if(n===1){const u=e.data.setupPose.color;h=u.r+(h-u.r)*i,l=u.g+(l-u.g)*i,o=u.b+(o-u.b)*i}else h=a.r+(h-a.r)*i,l=a.g+(l-a.g)*i,o=a.b+(o-a.b)*i;a.r=h<0?0:h>1?1:h,a.g=l<0?0:l>1?1:l,a.b=o<0?0:o>1?1:o}},Fs=class extends be{slotIndex=0;constructor(e,t,s){super(e,t,`9|${s}`),this.slotIndex=s}apply(e,t,s,i,n,r,a,h,l){const o=e.slots[this.slotIndex];if(!o.bone.active)return;const c=(l?o.appliedPose:o.pose).color;let d=0;const m=this.frames;if(s<m[0]){const u=o.data.setupPose.color.a;switch(r){case 1:c.a=u;break;case 2:c.a+=(u-c.a)*n;break}return}if(d=this.getCurveValue(s),n!==1)if(r===1){const u=o.data.setupPose.color;d=u.a+(d-u.a)*n}else d=c.a+(d-c.a)*n;c.a=d<0?0:d>1?1:d}},Ls=class extends ve{constructor(e,t,s){super(e,t,s,`8|${s}`,`9|${s}`,`10|${s}`)}getFrameEntries(){return 8}setFrame(e,t,s,i,n,r,a,h,l){e<<=3,this.frames[e]=t,this.frames[e+1]=s,this.frames[e+2]=i,this.frames[e+3]=n,this.frames[e+4]=r,this.frames[e+5]=a,this.frames[e+6]=h,this.frames[e+7]=l}apply1(e,t,s,i,n,r){const a=t.color,h=t.darkColor;let l=0,o=0,c=0;const d=this.frames;if(s<d[0]){const x=e.data.setupPose,b=x.color,v=x.darkColor;switch(n){case 1:{a.setFromColor(b),h.r=v.r,h.g=v.g,h.b=v.b;break}case 2:{a.add((b.r-a.r)*i,(b.g-a.g)*i,(b.b-a.b)*i,(b.a-a.a)*i),h.r+=(v.r-h.r)*i,h.g+=(v.g-h.g)*i,h.b+=(v.b-h.b)*i;break}}return}let m=0,u=0,f=0,g=0;const p=pt.search(d,s,8),w=this.curves[p>>3];switch(w){case 0:{const x=d[p];m=d[p+1],u=d[p+2],f=d[p+3],g=d[p+4],l=d[p+5],o=d[p+6],c=d[p+7];const b=(s-x)/(d[p+8]-x);m+=(d[p+8+1]-m)*b,u+=(d[p+8+2]-u)*b,f+=(d[p+8+3]-f)*b,g+=(d[p+8+4]-g)*b,l+=(d[p+8+5]-l)*b,o+=(d[p+8+6]-o)*b,c+=(d[p+8+7]-c)*b;break}case 1:m=d[p+1],u=d[p+2],f=d[p+3],g=d[p+4],l=d[p+5],o=d[p+6],c=d[p+7];break;default:m=this.getBezierValue(s,p,1,w-2),u=this.getBezierValue(s,p,2,w+18-2),f=this.getBezierValue(s,p,3,w+18*2-2),g=this.getBezierValue(s,p,4,w+18*3-2),l=this.getBezierValue(s,p,5,w+18*4-2),o=this.getBezierValue(s,p,6,w+18*5-2),c=this.getBezierValue(s,p,7,w+18*6-2)}if(i===1)a.set(m,u,f,g);else if(n===1){const x=e.data.setupPose;let b=x.color;a.set(b.r+(m-b.r)*i,b.g+(u-b.g)*i,b.b+(f-b.b)*i,b.a+(g-b.a)*i),b=x.darkColor,l=b.r+(l-b.r)*i,o=b.g+(o-b.g)*i,c=b.b+(c-b.b)*i}else a.add((m-a.r)*i,(u-a.g)*i,(f-a.b)*i,(g-a.a)*i),l=h.r+(l-h.r)*i,o=h.g+(o-h.g)*i,c=h.b+(c-h.b)*i;h.r=l<0?0:l>1?1:l,h.g=o<0?0:o>1?1:o,h.b=c<0?0:c>1?1:c}},Rs=class extends ve{constructor(e,t,s){super(e,t,s,`8|${s}`,`10|${s}`)}getFrameEntries(){return 7}setFrame(e,t,s,i,n,r,a,h){e*=7,this.frames[e]=t,this.frames[e+1]=s,this.frames[e+2]=i,this.frames[e+3]=n,this.frames[e+4]=r,this.frames[e+5]=a,this.frames[e+6]=h}apply1(e,t,s,i,n,r){const a=t.color,h=t.darkColor;let l=0,o=0,c=0,d=0,m=0,u=0;const f=this.frames;if(s<f[0]){const w=e.data.setupPose,x=w.color,b=w.darkColor;switch(n){case 1:a.r=x.r,a.g=x.g,a.b=x.b,h.r=b.r,h.g=b.g,h.b=b.b;break;case 2:a.r+=(x.r-a.r)*i,a.g+=(x.g-a.g)*i,a.b+=(x.b-a.b)*i,h.r+=(b.r-h.r)*i,h.g+=(b.g-h.g)*i,h.b+=(b.b-h.b)*i;break}return}const g=pt.search(f,s,7),p=this.curves[g/7];switch(p){case 0:{const w=f[g];l=f[g+1],o=f[g+2],c=f[g+3],d=f[g+4],m=f[g+5],u=f[g+6];const x=(s-w)/(f[g+7]-w);l+=(f[g+7+1]-l)*x,o+=(f[g+7+2]-o)*x,c+=(f[g+7+3]-c)*x,d+=(f[g+7+4]-d)*x,m+=(f[g+7+5]-m)*x,u+=(f[g+7+6]-u)*x;break}case 1:l=f[g+1],o=f[g+2],c=f[g+3],d=f[g+4],m=f[g+5],u=f[g+6];break;default:l=this.getBezierValue(s,g,1,p-2),o=this.getBezierValue(s,g,2,p+18-2),c=this.getBezierValue(s,g,3,p+18*2-2),d=this.getBezierValue(s,g,4,p+18*3-2),m=this.getBezierValue(s,g,5,p+18*4-2),u=this.getBezierValue(s,g,6,p+18*5-2)}if(i!==1)if(n===1){const w=e.data.setupPose;let x=w.color;l=x.r+(l-x.r)*i,o=x.g+(o-x.g)*i,c=x.b+(c-x.b)*i,x=w.darkColor,d=x.r+(d-x.r)*i,m=x.g+(m-x.g)*i,u=x.b+(u-x.b)*i}else l=a.r+(l-a.r)*i,o=a.g+(o-a.g)*i,c=a.b+(c-a.b)*i,d=h.r+(d-h.r)*i,m=h.g+(m-h.g)*i,u=h.b+(u-h.b)*i;a.r=l<0?0:l>1?1:l,a.g=o<0?0:o>1?1:o,a.b=c<0?0:c>1?1:c,h.r=d<0?0:d>1?1:d,h.g=m<0?0:m>1?1:m,h.b=u<0?0:u>1?1:u}},oe=class extends pt{slotIndex=0;attachmentNames;constructor(e,t){super(e,`11|${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,i,n,r,a,h,l){const o=e.slots[this.slotIndex];if(!o.bone.active)return;const c=l?o.appliedPose:o.pose;h||s<this.frames[0]?r!==0&&this.setAttachment(e,c,o.data.attachmentName):this.setAttachment(e,c,this.attachmentNames[pt.search(this.frames,s)])}setAttachment(e,t,s){t.setAttachment(s?e.getAttachment(this.slotIndex,s):null)}},Ys=class extends _t{slotIndex;attachment;vertices;constructor(e,t,s,i){super(e,t,`12|${s}|${i.id}`),this.slotIndex=s,this.attachment=i,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,i,n,r,a,h,l,o,c){const d=this.curves;let m=this.getFrameCount()+e*18;s===0&&(d[t]=2+m);const u=(i-r*2+h)*.03,f=l*.03-a*.06,g=((r-h)*3-i+o)*.006,p=(a-l+.33333333)*.018;let w=u*2+g,x=f*2+p,b=(r-i)*.3+u+g*.16666667,v=a*.3+f+p*.16666667,y=i+b,S=v;for(let T=m+18;m<T;m+=2)d[m]=y,d[m+1]=S,b+=w,v+=x,w+=g,x+=p,y+=b,S+=v}getCurvePercent(e,t){const s=this.curves;let i=s[t];switch(i){case 0:{const h=this.frames[t];return(e-h)/(this.frames[t+this.getFrameEntries()]-h)}case 1:return 0}if(i-=2,s[i]>e){const h=this.frames[t];return s[i+1]*(e-h)/(s[i]-h)}const n=i+18;for(i+=2;i<n;i+=2)if(s[i]>=e){const h=s[i-2],l=s[i-1];return l+(e-h)/(s[i]-h)*(s[i+1]-l)}const r=s[n-2],a=s[n-1];return a+(1-a)*(e-r)/(this.frames[t+this.getFrameEntries()]-r)}apply(e,t,s,i,n,r,a,h,l){const o=e.slots;if(!this.attachment.isTimelineActive(o,this.slotIndex,l))return;const c=this.attachment.timelineSlots,d=this.frames;if(s<d[0]){this.applyBeforeFirst(o[this.slotIndex],l,n,r);for(const p of c)this.applyBeforeFirst(o[p],l,n,r);return}let m,u,f;if(s>=d[d.length-1])f=0,m=this.vertices[d.length-1],u=null;else{const p=pt.search(d,s);f=this.getCurvePercent(s,p),m=this.vertices[p],u=this.vertices[p+1]}const g=this.vertices[0].length;this.applyToSlot(o[this.slotIndex],l,m,u,f,g,n,r,a);for(const p of c)this.applyToSlot(o[p],l,m,u,f,g,n,r,a)}applyBeforeFirst(e,t,s,i){if(!e.bone.active)return;const n=t?e.appliedPose:e.pose;if(n.attachment==null||n.attachment.timelineAttachment!==this.attachment)return;const r=n.deform;switch(r.length===0&&(i=1),i){case 1:r.length=0;break;case 2:{if(s===1){r.length=0;return}const a=this.vertices[0].length;r.length=a;const h=r,l=n.attachment;if(l.bones===null){const o=l.vertices;for(let c=0;c<a;c++)h[c]+=(o[c]-h[c])*s}else{s=1-s;for(let o=0;o<a;o++)h[o]*=s}}}}applyToSlot(e,t,s,i,n,r,a,h,l){if(!e.bone.active)return;const o=t?e.appliedPose:e.pose;if(o.attachment===null||o.attachment.timelineAttachment!==this.attachment)return;const c=o.attachment,d=o.deform;d.length===0&&(h=1);const m=h===1;if(d.length=r,i===null)if(a===1)if(l&&!m)if(c.bones)for(let u=0;u<r;u++)d[u]+=s[u];else{const u=c.vertices;for(let f=0;f<r;f++)d[f]+=s[f]-u[f]}else O.arrayCopy(s,0,d,0,r);else if(m)if(c.bones)for(let u=0;u<r;u++)d[u]=s[u]*a;else{const u=c.vertices;for(let f=0;f<r;f++){const g=u[f];d[f]=g+(s[f]-g)*a}}else if(l)if(c.bones)for(let u=0;u<r;u++)d[u]+=s[u]*a;else{const u=c.vertices;for(let f=0;f<r;f++)d[f]+=(s[f]-u[f])*a}else for(let u=0;u<r;u++)d[u]+=(s[u]-d[u])*a;else if(a===1)if(l&&!m)if(c.bones)for(let u=0;u<r;u++){const f=s[u];d[u]+=f+(i[u]-f)*n}else{const u=c.vertices;for(let f=0;f<r;f++){const g=s[f];d[f]+=g+(i[f]-g)*n-u[f]}}else if(n===0)O.arrayCopy(s,0,d,0,r);else for(let u=0;u<r;u++){const f=s[u];d[u]=f+(i[u]-f)*n}else if(m)if(c.bones)for(let u=0;u<r;u++){const f=s[u];d[u]=(f+(i[u]-f)*n)*a}else{const u=c.vertices;for(let f=0;f<r;f++){const g=s[f],p=u[f];d[f]=p+(g+(i[f]-g)*n-p)*a}}else if(l)if(c.bones)for(let u=0;u<r;u++){const f=s[u];d[u]+=(f+(i[u]-f)*n)*a}else{const u=c.vertices;for(let f=0;f<r;f++){const g=s[f];d[f]+=(g+(i[f]-g)*n-u[f])*a}}else for(let u=0;u<r;u++){const f=s[u];d[u]+=(f+(i[u]-f)*n-d[u])*a}}},Ps=class Zt extends pt{static ENTRIES=3;static MODE=1;static DELAY=2;slotIndex;attachment;constructor(t,s,i){super(t,`29|${s}|${i.sequence.id}`),this.slotIndex=s,this.attachment=i,this.instant=!0}getFrameEntries(){return Zt.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,s,i,n,r){const a=this.frames;t*=Zt.ENTRIES,a[t]=s,a[t+Zt.MODE]=i|n<<4,a[t+Zt.DELAY]=r}apply(t,s,i,n,r,a,h,l,o){const c=t.slots;if(!this.attachment.isTimelineActive(c,this.slotIndex,o))return;const d=this.attachment.timelineSlots,m=this.frames;if(l||i<m[0]){if(a!==0){this.setupPose(c[this.slotIndex],o);for(const w of d)this.setupPose(c[w],o)}return}const u=pt.search(m,i,Zt.ENTRIES),f=m[u],g=m[u+Zt.MODE],p=m[u+Zt.DELAY];this.applyToSlot(c[this.slotIndex],o,i,f,g,p);for(const w of d)this.applyToSlot(c[w],o,i,f,g,p)}setupPose(t,s){if(!t.bone.active)return;const i=s?t.appliedPose:t.pose;i.attachment===null||i.attachment.timelineAttachment!==this.attachment||(i.sequenceIndex=-1)}applyToSlot(t,s,i,n,r,a){if(!t.bone.active)return;const h=s?t.appliedPose:t.pose;if(h.attachment===null||h.attachment.timelineAttachment!==this.attachment)return;let l=r>>4,o=h.attachment.sequence.regions.length;const c=ws[r&15];if(c!==0)switch(l+=(i-n)/a+1e-5|0,c){case 1:l=Math.min(o-1,l);break;case 2:l%=o;break;case 3:{const d=(o<<1)-2;l=d===0?0:l%d,l>=o&&(l=d-l);break}case 4:l=Math.max(o-1-l,0);break;case 5:l=o-1-l%o;break;case 6:{const d=(o<<1)-2;l=d===0?0:(l+o-1)%d,l>=o&&(l=d-l)}}h.sequenceIndex=l}},Be=class Bn extends pt{static propertyIds=["13"];events;constructor(t){super(t,...Bn.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,i,n,r,a,h,l,o){if(!n)return;const c=this.frames,d=this.frames.length;if(s>i)this.apply(null,s,Number.MAX_VALUE,n,0,a,!1,!1,!1),s=-1;else if(s>=c[d-1])return;if(i<c[0])return;let m=0;if(s<c[0])m=0;else{m=pt.search(c,s)+1;const u=c[m];for(;m>0&&c[m-1]===u;)m--}for(;m<d&&i>=c[m];m++)n.push(this.events[m])}},Kt=class Pi extends pt{static propertyID="14";static propertyIds=[Pi.propertyID];drawOrders;constructor(t){super(t,...Pi.propertyIds),this.drawOrders=new Array(t),this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,s,i){this.frames[t]=s,this.drawOrders[t]=i}apply(t,s,i,n,r,a,h,l,o){const c=o?t.drawOrder.appliedPose:t.drawOrder.pose,d=t.slots;if(l||i<this.frames[0]){a!==0&&O.arrayCopy(d,0,c,0,t.slots.length);return}const m=this.drawOrders[pt.search(this.frames,i)];if(!m)O.arrayCopy(d,0,c,0,t.slots.length);else for(let u=0,f=m.length;u<f;u++)c[u]=d[m[u]]}},Se=class Vi extends pt{static propertyID="15";slots;inFolder;drawOrders;constructor(t,s,i){super(t,...Vi.propertyIds(s)),this.slots=s,this.drawOrders=new Array(t),this.inFolder=new Array(i);for(const n of s)this.inFolder[n]=!0;this.instant=!0}static propertyIds(t){const s=t.length,i=new Array(s);for(let n=0;n<s;n++)i[n]=`${Vi.propertyID}|${t[n]}`;return i}getFrameCount(){return this.frames.length}getSlots(){return this.slots}getDrawOrders(){return this.drawOrders}setFrame(t,s,i){this.frames[t]=s,this.drawOrders[t]=i}apply(t,s,i,n,r,a,h,l,o){const c=o?t.drawOrder.appliedPose:t.drawOrder.pose,d=t.slots;if(l||i<this.frames[0])a!==0&&this.setup(c,d);else{const m=this.drawOrders[pt.search(this.frames,i)];if(!m)this.setup(c,d);else{const u=this.inFolder,f=this.slots;for(let g=0,p=0,w=f.length;!(u[c[g].data.index]&&(c[g]=d[f[m[p]]],++p===w));g++);}}}setup(t,s){const{inFolder:i,slots:n}=this;for(let r=0,a=0,h=n.length;!(i[t[r].data.index]&&(t[r]=s[n[a]],++a===h));r++);}};function $i(e){return typeof e=="object"&&e!==null&&typeof e.constraintIndex=="number"}var Vs=class extends _t{constraintIndex=0;constructor(e,t,s){super(e,t,`16|${s}`),this.constraintIndex=s}getFrameEntries(){return 6}setFrame(e,t,s,i,n,r,a){e*=6,this.frames[e]=t,this.frames[e+1]=s,this.frames[e+2]=i,this.frames[e+3]=n,this.frames[e+4]=r?1:0,this.frames[e+5]=a?1:0}apply(e,t,s,i,n,r,a,h,l){const o=e.constraints[this.constraintIndex];if(!o.active)return;const c=l?o.appliedPose:o.pose,d=this.frames;if(s<d[0]){const w=o.data.setupPose;switch(r){case 1:{c.mix=w.mix,c.softness=w.softness,c.bendDirection=w.bendDirection,c.compress=w.compress,c.stretch=w.stretch;break}case 2:{c.mix+=(w.mix-c.mix)*n,c.softness+=(w.softness-c.softness)*n,c.bendDirection=w.bendDirection,c.compress=w.compress,c.stretch=w.stretch;break}}return}let m=0,u=0;const f=pt.search(d,s,6),g=this.curves[f/6];switch(g){case 0:{const w=d[f];m=d[f+1],u=d[f+2];const x=(s-w)/(d[f+6]-w);m+=(d[f+6+1]-m)*x,u+=(d[f+6+2]-u)*x;break}case 1:m=d[f+1],u=d[f+2];break;default:m=this.getBezierValue(s,f,1,g-2),u=this.getBezierValue(s,f,2,g+18-2)}const p=r===1?o.data.setupPose:c;c.mix=p.mix+(m-p.mix)*n,c.softness=p.softness+(u-p.softness)*n,h?r===1&&(c.bendDirection=p.bendDirection,c.compress=p.compress,c.stretch=p.stretch):(c.bendDirection=d[f+3],c.compress=d[f+4]!==0,c.stretch=d[f+5]!==0)}},Bs=class extends _t{constraintIndex=0;constructor(e,t,s){super(e,t,`17|${s}`),this.constraintIndex=s,this.additive=!0}getFrameEntries(){return 7}setFrame(e,t,s,i,n,r,a,h){const l=this.frames;e*=7,l[e]=t,l[e+1]=s,l[e+2]=i,l[e+3]=n,l[e+4]=r,l[e+5]=a,l[e+6]=h}apply(e,t,s,i,n,r,a,h,l){const o=e.constraints[this.constraintIndex];if(!o.active)return;const c=l?o.appliedPose:o.pose,d=this.frames;if(s<d[0]){const y=o.data.setupPose;switch(r){case 1:{c.mixRotate=y.mixRotate,c.mixX=y.mixX,c.mixY=y.mixY,c.mixScaleX=y.mixScaleX,c.mixScaleY=y.mixScaleY,c.mixShearY=y.mixShearY;break}case 2:{c.mixRotate+=(y.mixRotate-c.mixRotate)*n,c.mixX+=(y.mixX-c.mixX)*n,c.mixY+=(y.mixY-c.mixY)*n,c.mixScaleX+=(y.mixScaleX-c.mixScaleX)*n,c.mixScaleY+=(y.mixScaleY-c.mixScaleY)*n,c.mixShearY+=(y.mixShearY-c.mixShearY)*n;break}}return}let m,u,f,g,p,w;const x=pt.search(d,s,7),b=this.curves[x/7];switch(b){case 0:{const y=d[x];m=d[x+1],u=d[x+2],f=d[x+3],g=d[x+4],p=d[x+5],w=d[x+6];const S=(s-y)/(d[x+7]-y);m+=(d[x+7+1]-m)*S,u+=(d[x+7+2]-u)*S,f+=(d[x+7+3]-f)*S,g+=(d[x+7+4]-g)*S,p+=(d[x+7+5]-p)*S,w+=(d[x+7+6]-w)*S;break}case 1:m=d[x+1],u=d[x+2],f=d[x+3],g=d[x+4],p=d[x+5],w=d[x+6];break;default:m=this.getBezierValue(s,x,1,b-2),u=this.getBezierValue(s,x,2,b+18-2),f=this.getBezierValue(s,x,3,b+18*2-2),g=this.getBezierValue(s,x,4,b+18*3-2),p=this.getBezierValue(s,x,5,b+18*4-2),w=this.getBezierValue(s,x,6,b+18*5-2)}const v=r===1?o.data.setupPose:c;a?(c.mixRotate=v.mixRotate+m*n,c.mixX=v.mixX+u*n,c.mixY=v.mixY+f*n,c.mixScaleX=v.mixScaleX+g*n,c.mixScaleY=v.mixScaleY+p*n,c.mixShearY=v.mixShearY+w*n):(c.mixRotate=v.mixRotate+(m-v.mixRotate)*n,c.mixX=v.mixX+(u-v.mixX)*n,c.mixY=v.mixY+(f-v.mixY)*n,c.mixScaleX=v.mixScaleX+(g-v.mixScaleX)*n,c.mixScaleY=v.mixScaleY+(p-v.mixScaleY)*n,c.mixShearY=v.mixShearY+(w-v.mixShearY)*n)}},ae=class extends be{constraintIndex;constructor(e,t,s,i){super(e,t,`${i}|${s}`),this.constraintIndex=s}},Xs=class extends ae{constructor(e,t,s){super(e,t,s,18),this.additive=!0}apply(e,t,s,i,n,r,a,h,l){const o=e.constraints[this.constraintIndex];if(o.active){const c=l?o.appliedPose:o.pose;c.position=this.getAbsoluteValue(s,n,r,a,c.position,o.data.setupPose.position)}}},Os=class extends ae{constructor(e,t,s){super(e,t,s,19)}apply(e,t,s,i,n,r,a,h,l){const o=e.constraints[this.constraintIndex];if(o.active){const c=l?o.appliedPose:o.pose;c.spacing=this.getAbsoluteValue(s,n,r,!1,c.spacing,o.data.setupPose.spacing)}}},Ds=class extends _t{constraintIndex;constructor(e,t,s){super(e,t,`20|${s}`),this.constraintIndex=s}getFrameEntries(){return 4}setFrame(e,t,s,i,n){const r=this.frames;e<<=2,r[e]=t,r[e+1]=s,r[e+2]=i,r[e+3]=n}apply(e,t,s,i,n,r,a,h,l){const o=e.constraints[this.constraintIndex];if(!o.active)return;const c=l?o.appliedPose:o.pose,d=this.frames;if(s<d[0]){const x=o.data.setupPose;switch(r){case 1:{c.mixRotate=x.mixRotate,c.mixX=x.mixX,c.mixY=x.mixY;break}case 2:{c.mixRotate+=(x.mixRotate-c.mixRotate)*n,c.mixX+=(x.mixX-c.mixX)*n,c.mixY+=(x.mixY-c.mixY)*n;break}}return}let m,u,f;const g=pt.search(d,s,4),p=this.curves[g>>2];switch(p){case 0:{const x=d[g];m=d[g+1],u=d[g+2],f=d[g+3];const b=(s-x)/(d[g+4]-x);m+=(d[g+4+1]-m)*b,u+=(d[g+4+2]-u)*b,f+=(d[g+4+3]-f)*b;break}case 1:m=d[g+1],u=d[g+2],f=d[g+3];break;default:m=this.getBezierValue(s,g,1,p-2),u=this.getBezierValue(s,g,2,p+18-2),f=this.getBezierValue(s,g,3,p+18*2-2)}const w=r===1?o.data.setupPose:c;a?(c.mixRotate=w.mixRotate+m*n,c.mixX=w.mixX+u*n,c.mixY=w.mixY+f*n):(c.mixRotate=w.mixRotate+(m-w.mixRotate)*n,c.mixX=w.mixX+(u-w.mixX)*n,c.mixY=w.mixY+(f-w.mixY)*n)}},Ut=class extends ae{constructor(e,t,s,i){super(e,t,s,i)}apply(e,t,s,i,n,r,a,h,l){if(a&&!this.additive&&(a=!1),this.constraintIndex===-1){const o=s>=this.frames[0]?this.getCurveValue(s):0,c=e.physics;for(const d of c)if(d.active&&this.global(d.data)){const m=l?d.appliedPose:d.pose;this.set(m,this.getAbsoluteValue(s,n,r,a,this.get(m),this.get(d.data.setupPose),o))}}else{const o=e.constraints[this.constraintIndex];if(o.active){const c=l?o.appliedPose:o.pose;this.set(c,this.getAbsoluteValue(s,n,r,a,this.get(c),this.get(o.data.setupPose)))}}}},Ns=class extends Ut{constructor(e,t,s){super(e,t,s,21)}get(e){return e.inertia}set(e,t){e.inertia=t}global(e){return e.inertiaGlobal}},Us=class extends Ut{constructor(e,t,s){super(e,t,s,22)}get(e){return e.strength}set(e,t){e.strength=t}global(e){return e.strengthGlobal}},zs=class extends Ut{constructor(e,t,s){super(e,t,s,23)}get(e){return e.damping}set(e,t){e.damping=t}global(e){return e.dampingGlobal}},qs=class extends Ut{constructor(e,t,s){super(e,t,s,24)}get(e){return 1/e.massInverse}set(e,t){e.massInverse=1/t}global(e){return e.massGlobal}},Ws=class extends Ut{constructor(e,t,s){super(e,t,s,25),this.additive=!0}get(e){return e.wind}set(e,t){e.wind=t}global(e){return e.windGlobal}},_s=class extends Ut{constructor(e,t,s){super(e,t,s,26),this.additive=!0}get(e){return e.gravity}set(e,t){e.gravity=t}global(e){return e.gravityGlobal}},Gs=class extends Ut{constructor(e,t,s){super(e,t,s,27)}get(e){return e.mix}set(e,t){e.mix=t}global(e){return e.mixGlobal}},Hs=class Xn extends pt{static propertyIds=["28"];constraintIndex;constructor(t,s){super(t,...Xn.propertyIds),this.constraintIndex=s,this.instant=!0}getFrameCount(){return this.frames.length}setFrame(t,s){this.frames[t]=s}apply(t,s,i,n,r,a,h,l,o){let c;if(this.constraintIndex!==-1&&(c=t.constraints[this.constraintIndex],!c.active))return;const d=this.frames;if(s>i)this.apply(t,s,Number.MAX_VALUE,[],r,a,!1,!1,!1),s=-1;else if(s>=d[d.length-1])return;if(!(i<d[0])&&(s<d[0]||i>=d[pt.search(d,s)+1]))if(c!=null)c.reset(t);else for(const m of t.physics)m.active&&m.reset(t)}},js=class extends ae{constructor(e,t,s){super(e,t,s,30)}apply(e,t,s,i,n,r,a,h,l){const o=e.constraints[this.constraintIndex];if(o.active){const c=l?o.appliedPose:o.pose;c.time=this.getAbsoluteValue(s,n,r,a,c.time,o.data.setupPose.time)}}},$s=class extends ae{constructor(e,t,s){super(e,t,s,31),this.additive=!0}apply(e,t,s,i,n,r,a,h,l){const o=e.constraints[this.constraintIndex];if(o.active){const c=l?o.appliedPose:o.pose;c.mix=this.getAbsoluteValue(s,n,r,a,c.mix,o.data.setupPose.mix)}}},Zi=class Bi{static emptyAnimation=new Pe("<empty>",[],0);data;tracks=[];timeScale=1;unkeyedState=0;events=[];listeners=[];queue=new Ji(this);propertyIds=new Map;animationsChanged=!1;trackEntryPool=new we(()=>new Ki);constructor(t){this.data=t}update(t){t*=this.timeScale;const s=this.tracks;for(let i=0,n=s.length;i<n;i++){const r=s[i];if(!r)continue;r.animationLast=r.nextAnimationLast,r.trackLast=r.nextTrackLast;let a=t*r.timeScale;if(r.delay>0){if(r.delay-=a,r.delay>0)continue;a=-r.delay,r.delay=0}let h=r.next;if(h){const l=r.trackLast-h.delay;if(l>=0){for(h.delay=0,h.trackTime+=r.timeScale===0?0:(l/r.timeScale+t)*h.timeScale,r.trackTime+=a,this.setTrack(i,h,!0);h.mixingFrom;)h.mixTime+=t,h=h.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&!r.mixingFrom){s[i]=null,this.queue.end(r),this.clearNext(r);continue}if(r.mixingFrom&&this.updateMixingFrom(r,t)){let l=r.mixingFrom;for(r.mixingFrom=null,l&&(l.mixingTo=null);l;)this.queue.end(l),l=l.mixingFrom}r.trackTime+=a}this.queue.drain()}updateMixingFrom(t,s){const i=t.mixingFrom;if(!i)return!0;const n=this.updateMixingFrom(i,s);if(i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.nextTrackLast!==-1&&t.mixTime>=t.mixDuration){if(i.totalAlpha===0||t.mixDuration===0){if(t.mixingFrom=i.mixingFrom,i.mixingFrom!=null&&(i.mixingFrom.mixingTo=t),i.totalAlpha===0)for(let r=t;r.mixingTo!=null;r=r.mixingTo)r.keepHold=!0;this.queue.end(i)}return n}return i.trackTime+=s*i.timeScale,t.mixTime+=s,!1}apply(t){if(!t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();const s=this.events,i=this.tracks;let n=!1;for(let h=0,l=i.length;h<l;h++){const o=i[h];if(!o||o.delay>0)continue;n=!0;let c=o.alpha;o.mixingFrom?c*=this.applyMixingFrom(o,t):o.trackTime>=o.trackEnd&&!o.next&&(c=0);let d=o.animationLast,m=o.getAnimationTime(),u=m,f=s;o.reverse&&(u=o.animation.duration-u,f=null);const g=o.animation.timelines,p=g.length;if(h===0&&c===1)for(let w=0;w<p;w++){O.webkit602BugfixHelper(c);const x=g[w];x instanceof oe?this.applyAttachmentTimeline(x,t,u,1,!0):x.apply(t,d,u,f,c,1,!1,!1,!1)}else{const w=o.timelineMode,x=c>=o.alphaAttachmentThreshold,b=o.additive,v=b||o.shortestRotation,y=!v&&o.timelinesRotation.length!==p<<1;y&&(o.timelinesRotation.length=p<<1);for(let S=0;S<p;S++){const T=g[S],A=w[S]&Js;!v&&T instanceof ye?this.applyRotateTimelin