PageSourceSearch

https://kzkktk.kz/public/00277eeb/chunk.da8f2b17.js

js kzkktk.kz collected 2026-10-08 22:19:28 UTC 148,232 bytes, 1 lines download raw bytes

1try{let t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="54a4f6b7-2b3f-4c7b-8b1f-4fa48389317d",t._sentryDebugIdIdentifier="sentry-dbid-54a4f6b7-2b3f-4c7b-8b1f-4fa48389317d")}catch(t){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"31.31.0"};(self.webpackChunkwl_spa_front=self.webpackChunkwl_spa_front||[]).push([["vendors-node_modules_react-transition-group_esm_SwitchTransition_js-node_modules_pixi-spine_a-895d30"],{45989:(t,e,s)=>{s.d(e,{Z:()=>g});var n,r,a=s(94578),i=s(67294),o=s(12666),h=s(220);var l="out-in",c="in-out",d=function(t,e,s){return function(){var n;t.props[e]&&(n=t.props)[e].apply(n,arguments),s()}},u=((n={})[l]=function(t){var e=t.current,s=t.changeState;return i.cloneElement(e,{in:!1,onExited:d(e,"onExited",(function(){s(o.d0,null)}))})},n[c]=function(t){var e=t.current,s=t.changeState,n=t.children;return[e,i.cloneElement(n,{in:!0,onEntered:d(n,"onEntered",(function(){s(o.d0)}))})]},n),m=((r={})[l]=function(t){var e=t.children,s=t.changeState;return i.cloneElement(e,{in:!0,onEntered:d(e,"onEntered",(function(){s(o.cn,i.cloneElement(e,{in:!0}))}))})},r[c]=function(t){var e=t.current,s=t.children,n=t.changeState;return[i.cloneElement(e,{in:!1,onExited:d(e,"onExited",(function(){n(o.cn,i.cloneElement(s,{in:!0}))}))}),i.cloneElement(s,{in:!0})]},r),f=function(t){function e(){for(var e,s=arguments.length,n=new Array(s),r=0;r<s;r++)n[r]=arguments[r];return(e=t.call.apply(t,[this].concat(n))||this).state={status:o.cn,current:null},e.appeared=!1,e.changeState=function(t,s){void 0===s&&(s=e.state.current),e.setState({status:t,current:s})},e}(0,a.Z)(e,t);var s=e.prototype;return s.componentDidMount=function(){this.appeared=!0},e.getDerivedStateFromProps=function(t,e){return null==t.children?{current:null}:e.status===o.d0&&t.mode===c?{status:o.d0}:!e.current||(s=e.current,n=t.children,s===n||i.isValidElement(s)&&i.isValidElement(n)&&null!=s.key&&s.key===n.key)?{current:i.cloneElement(t.children,{in:!0})}:{status:o.Ix};var s,n},s.render=function(){var t,e=this.props,s=e.children,n=e.mode,r=this.state,a=r.status,l=r.current,c={children:s,current:l,changeState:this.changeState,status:a};switch(a){case o.d0:t=m[n](c);break;case o.Ix:t=u[n](c);break;case o.cn:t=l}return i.createElement(h.Z.Provider,{value:{isMounting:!this.appeared}},t)},e}(i.Component);f.propTypes={},f.defaultProps={mode:l};const g=f},14857:(t,e,s)=>{s.d(e,{Z7:()=>Ve,PY:()=>As});var n=(t=>(t[t.Region=0]="Region",t[t.BoundingBox=1]="BoundingBox",t[t.Mesh=2]="Mesh",t[t.LinkedMesh=3]="LinkedMesh",t[t.Path=4]="Path",t[t.Point=5]="Point",t[t.Clipping=6]="Clipping",t))(n||{});class r{constructor(t,e=new Array,s=0,n=new DataView(t.buffer)){this.strings=e,this.index=s,this.buffer=n}readByte(){return this.buffer.getInt8(this.index++)}readUnsignedByte(){return this.buffer.getUint8(this.index++)}readShort(){const t=this.buffer.getInt16(this.index);return this.index+=2,t}readInt32(){const t=this.buffer.getInt32(this.index);return this.index+=4,t}readInt(t){let e=this.readByte(),s=127&e;return 0!=(128&e)&&(e=this.readByte(),s|=(127&e)<<7,0!=(128&e)&&(e=this.readByte(),s|=(127&e)<<14,0!=(128&e)&&(e=this.readByte(),s|=(127&e)<<21,0!=(128&e)&&(e=this.readByte(),s|=(127&e)<<28)))),t?s:s>>>1^-(1&s)}readStringRef(){const t=this.readInt(!0);return 0==t?null:this.strings[t-1]}readString(){let t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;let e="";for(let s=0;s<t;){const t=this.readUnsignedByte();switch(t>>4){case 12:case 13:e+=String.fromCharCode((31&t)<<6|63&this.readByte()),s+=2;break;case 14:e+=String.fromCharCode((15&t)<<12|(63&this.readByte())<<6|63&this.readByte()),s+=3;break;default:e+=String.fromCharCode(t),s++}}return e}readFloat(){const t=this.buffer.getFloat32(this.index);return this.index+=4,t}readBoolean(){return 0!=this.readByte()}}var a=(t=>(t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",t))(a||{}),i=(t=>(t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut",t))(i||{}),o=(t=>(t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent",t))(o||{}),h=(t=>(t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale",t))(h||{}),l=(t=>(t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection",t))(l||{}),c=s(93055);function d(t){switch(t.toLowerCase()){case"nearest":return u.Nearest;case"linear":return u.Linear;case"mipmap":return u.MipMap;case"mipmapnearestnearest":return u.MipMapNearestNearest;case"mipmaplinearnearest":return u.MipMapLinearNearest;case"mipmapnearestlinear":return u.MipMapNearestLinear;case"mipmaplinearlinear":return u.MipMapLinearLinear;default:throw new Error(`Unknown texture filter ${t}`)}}var u=(t=>(t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear",t))(u||{}),m=(t=>(t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat",t))(m||{});class f{constructor(){this.size=null,this.names=null,this.values=null,this.renderObject=null}get width(){const t=this.texture;return t.trim?t.trim.width:t.orig.width}get height(){const t=this.texture;return t.trim?t.trim.height:t.orig.height}get u(){return this.texture._uvs.x0}
1get v(){return this.texture._uvs.y0}get u2(){return this.texture._uvs.x2}get v2(){return this.texture._uvs.y2}get offsetX(){const t=this.texture;return t.trim?t.trim.x:0}get offsetY(){return this.spineOffsetY}get pixiOffsetY(){const t=this.texture;return t.trim?t.trim.y:0}get spineOffsetY(){const t=this.texture;return this.originalHeight-this.height-(t.trim?t.trim.y:0)}get originalWidth(){return this.texture.orig.width}get originalHeight(){return this.texture.orig.height}get x(){return this.texture.frame.x}get y(){return this.texture.frame.y}get rotate(){return 0!==this.texture.rotate}get degrees(){return(360-45*this.texture.rotate)%360}}class g{constructor(){this.x=0,this.y=0,this.width=0,this.height=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0,this.rotate=0,this.index=0}}class p{constructor(t,e,s){this.pages=new Array,this.regions=new Array,t&&this.addSpineAtlas(t,e,s)}addTexture(t,e){const s=this.pages;let n=null;for(let t=0;t<s.length;t++)if(s[t].baseTexture===e.baseTexture){n=s[t];break}if(null===n){n=new w,n.name="texturePage";const t=e.baseTexture;n.width=t.realWidth,n.height=t.realHeight,n.baseTexture=t,n.minFilter=n.magFilter=u.Nearest,n.uWrap=m.ClampToEdge,n.vWrap=m.ClampToEdge,s.push(n)}const r=new b;return r.name=t,r.page=n,r.texture=e,r.index=-1,this.regions.push(r),r}addTextureHash(t,e){for(const s in t)t.hasOwnProperty(s)&&this.addTexture(e&&-1!==s.indexOf(".")?s.substr(0,s.lastIndexOf(".")):s,t[s])}addSpineAtlas(t,e,s){return this.load(t,e,s)}load(t,e,s){if(null==e)throw new Error("textureLoader cannot be null.");const n=new x(t),r=new Array(4);let a=null;const i={};let o=null;i.size=()=>{a.width=parseInt(r[1]),a.height=parseInt(r[2])},i.format=()=>{},i.filter=()=>{a.minFilter=d(r[1]),a.magFilter=d(r[2])},i.repeat=()=>{-1!=r[1].indexOf("x")&&(a.uWrap=m.Repeat),-1!=r[1].indexOf("y")&&(a.vWrap=m.Repeat)},i.pma=()=>{a.pma="true"==r[1]};const h={xy:()=>{o.x=parseInt(r[1]),o.y=parseInt(r[2])},size:()=>{o.width=parseInt(r[1]),o.height=parseInt(r[2])},bounds:()=>{o.x=parseInt(r[1]),o.y=parseInt(r[2]),o.width=parseInt(r[3]),o.height=parseInt(r[4])},offset:()=>{o.offsetX=parseInt(r[1]),o.offsetY=parseInt(r[2])},orig:()=>{o.originalWidth=parseInt(r[1]),o.originalHeight=parseInt(r[2])},offsets:()=>{o.offsetX=parseInt(r[1]),o.offsetY=parseInt(r[2]),o.originalWidth=parseInt(r[3]),o.originalHeight=parseInt(r[4])},rotate:()=>{const t=r[1];let e=0;e="true"==t.toLocaleLowerCase()?6:"false"==t.toLocaleLowerCase()?0:(720-parseFloat(t))%360/45,o.rotate=e},index:()=>{o.index=parseInt(r[1])}};let l=n.readLine();for(;null!=l&&0==l.trim().length;)l=n.readLine();for(;null!=l&&0!=l.trim().length&&0!=n.readEntry(r,l);)l=n.readLine();const u=()=>{for(;;){if(null==l)return s&&s(this);if(0==l.trim().length)a=null,l=n.readLine();else{if(null===a){for(a=new w,a.name=l.trim();0!=n.readEntry(r,l=n.readLine());){const t=i[r[0]];t&&t()}this.pages.push(a),e(a.name,(t=>{if(null===t)return this.pages.splice(this.pages.indexOf(a),1),s&&s(null);a.baseTexture=t,a.pma&&(t.alphaMode=c.iw.PMA),t.valid||t.setSize(a.width,a.height),a.setFilters(),a.width&&a.height||(a.width=t.realWidth,a.height=t.realHeight,a.width&&a.height||console.log(`ERROR spine atlas page ${a.name}: meshes wont work if you dont specify size in atlas (http://www.html5gamedevs.com/topic/18888-pixi-spines-and-meshes/?p=107121)`)),u()}));break}{o=new g;const t=new b;t.name=l,t.page=a;let e=null,s=null;for(;;){const t=n.readEntry(r,l=n.readLine());if(0==t)break;const a=h[r[0]];if(a)a();else{null==e&&(e=[],s=[]),e.push(r[0]);const n=[];for(let e=0;e<t;e++)n.push(parseInt(r[e+1]));s.push(n)}}0==o.originalWidth&&0==o.originalHeight&&(o.originalWidth=o.width,o.originalHeight=o.height);const i=a.baseTexture.resolution;o.x/=i,o.y/=i,o.width/=i,o.height/=i,o.originalWidth/=i,o.originalHeight/=i,o.offsetX/=i,o.offsetY/=i;const d=o.rotate%4!=0,u=new c.Ae(o.x,o.y,d?o.height:o.width,d?o.width:o.height),m=new c.Ae(0,0,o.originalWidth,o.originalHeight),f=new c.Ae(o.offsetX,o.originalHeight-o.height-o.offsetY,o.width,o.height);t.texture=new c.xE(t.page.baseTexture,u,m,f,o.rotate),t.index=o.index,t.texture.updateUvs(),this.regions.push(t)}}}};u()}findRegion(t){for(let e=0;e<this.regions.length;e++)if(this.regions[e].name==t)return this.regions[e];return null}dispose(){for(let t=0;t<this.pages.length;t++)this.pages[t].baseTexture.dispose()}}class x{constructor(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}readLine(){return this.index>=this.lines.length?null:this.lines[this.index++]}readEntry(t,e){if(null==e)return 0;if(0==(e=e.trim()).length)return 0;const s=e.indexOf(":");if(-1==s)return 0;t[0]=e.substr(0,s).trim();for(let n=1,r=s+1;;n++){const s=e.indexOf(",",r);if(-1==s)return t[n]=e.substr(r).trim(),n;
1if(t[n]=e.substr(r,s-r).trim(),r=s+1,4==n)return 4}}}class w{constructor(){this.minFilter=u.Nearest,this.magFilter=u.Nearest,this.uWrap=m.ClampToEdge,this.vWrap=m.ClampToEdge}setFilters(){const t=this.baseTexture,e=this.minFilter;e==u.Linear?t.scaleMode=c.aH.LINEAR:this.minFilter==u.Nearest?t.scaleMode=c.aH.NEAREST:(t.mipmap=c.KI.POW2,e==u.MipMapNearestNearest?t.scaleMode=c.aH.NEAREST:t.scaleMode=c.aH.LINEAR)}}class b extends f{}class y{constructor(){this.entries={},this.size=0}add(t){const e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)}addAll(t){const e=this.size;for(let e=0,s=t.length;e<s;e++)this.add(t[e]);return e!=this.size}contains(t){return this.entries[t]}clear(){this.entries={},this.size=0}}const k=class{constructor(t=0,e=0,s=0,n=0){this.r=t,this.g=e,this.b=s,this.a=n}set(t,e,s,n){return this.r=t,this.g=e,this.b=s,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=8!=t.length?1:parseInt(t.substr(6,2),16)/255,this}add(t,e,s,n){return this.r+=t,this.g+=e,this.b+=s,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,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255}static rgb888ToColor(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255}static fromString(t){return(new k).setFromString(t)}};let S=k;S.WHITE=new k(1,1,1,1),S.RED=new k(1,0,0,1),S.GREEN=new k(0,1,0,1),S.BLUE=new k(0,0,1,1),S.MAGENTA=new k(1,0,1,1);const A=class{static clamp(t,e,s){return t<e?e:t>s?s:t}static cosDeg(t){return Math.cos(t*A.degRad)}static sinDeg(t){return Math.sin(t*A.degRad)}static signum(t){return Math.sign(t)}static toInt(t){return t>0?Math.floor(t):Math.ceil(t)}static cbrt(t){const e=Math.pow(Math.abs(t),1/3);return t<0?-e:e}static randomTriangular(t,e){return A.randomTriangularWith(t,e,.5*(t+e))}static randomTriangularWith(t,e,s){const n=Math.random(),r=e-t;return n<=(s-t)/r?t+Math.sqrt(n*r*(s-t)):e-Math.sqrt((1-n)*r*(e-s))}static isPowerOfTwo(t){return t&&0==(t&t-1)}};let I=A;I.PI=3.1415927,I.PI2=2*A.PI,I.radiansToDegrees=180/A.PI,I.radDeg=A.radiansToDegrees,I.degreesToRadians=A.PI/180,I.degRad=A.degreesToRadians;const M=class{static arrayCopy(t,e,s,n,r){for(let a=e,i=n;a<e+r;a++,i++)s[i]=t[a]}static arrayFill(t,e,s,n){for(let r=e;r<s;r++)t[r]=n}static setArraySize(t,e,s=0){const n=t.length;if(n==e)return t;if(t.length=e,n<e)for(let r=n;r<e;r++)t[r]=s;return t}static ensureArrayCapacity(t,e,s=0){return t.length>=e?t:M.setArraySize(t,e,s)}static newArray(t,e){const s=new Array(t);for(let n=0;n<t;n++)s[n]=e;return s}static newFloatArray(t){if(M.SUPPORTS_TYPED_ARRAYS)return new Float32Array(t);const e=new Array(t);for(let t=0;t<e.length;t++)e[t]=0;return e}static newShortArray(t){if(M.SUPPORTS_TYPED_ARRAYS)return new Int16Array(t);const e=new Array(t);for(let t=0;t<e.length;t++)e[t]=0;return e}static toFloatArray(t){return M.SUPPORTS_TYPED_ARRAYS?new Float32Array(t):t}static toSinglePrecision(t){return M.SUPPORTS_TYPED_ARRAYS?Math.fround(t):t}static webkit602BugfixHelper(t,e){}static contains(t,e,s=!0){for(let s=0;s<t.length;s++)if(t[s]==e)return!0;return!1}static enumValue(t,e){return t[e[0].toUpperCase()+e.slice(1)]}};let v=M;v.SUPPORTS_TYPED_ARRAYS="undefined"!=typeof Float32Array;class C{constructor(t){this.items=new Array,this.instantiator=t}obtain(){return this.items.length>0?this.items.pop():this.instantiator()}free(t){t.reset&&t.reset(),this.items.push(t)}freeAll(t){for(let e=0;e<t.length;e++)this.free(t[e])}clear(){this.items.length=0}}class F{constructor(t=0,e=0){this.x=t,this.y=e}set(t,e){return this.x=t,this.y=e,this}length(){const t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}normalize(){const t=this.length();return 0!=t&&(this.x/=t,this.y/=t),this}}const Y=!0,E=!1,T=!0,R=0,X=!0;var B=s(58820),P=s(32274),D=s(55638),N=s(33879);const L=[0,0,0];class V extends P.j{constructor(){super(...arguments),this.region=null,this.attachment=null}}class $ extends D.AL{constructor(t,e,s,n,r){super(t,e,s,n,r),this.region=null,this.attachment=null}}const W=class extends B.W2{constructor(t){if(super(),!t)throw new Error("The spineData param is required.");
1if("string"==typeof t)throw new Error('spineData param cant be string. Please use spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.');this.spineData=t,this.createSkeleton(t),this.slotContainers=[],this.tempClipContainers=[];for(let t=0,e=this.skeleton.slots.length;t<e;t++){const e=this.skeleton.slots[t],s=e.getAttachment(),r=this.newContainer();if(this.slotContainers.push(r),this.addChild(r),this.tempClipContainers.push(null),s)if(s.type===n.Region){const t=s.name,n=this.createSprite(e,s,t);e.currentSprite=n,e.currentSpriteName=t,r.addChild(n)}else if(s.type===n.Mesh){const t=this.createMesh(e,s);e.currentMesh=t,e.currentMeshId=s.id,e.currentMeshName=s.name,r.addChild(t)}else s.type===n.Clipping&&(this.createGraphics(e,s),r.addChild(e.clippingContainer),r.addChild(e.currentGraphics))}this.tintRgb=new Float32Array([1,1,1]),this.autoUpdate=!0,this.visible=!0}get debug(){return this._debug}set debug(t){t!=this._debug&&(this._debug?.unregisterSpine(this),t?.registerSpine(this),this._debug=t)}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,this.updateTransform=t?W.prototype.autoUpdateTransform:B.W2.prototype.updateTransform)}get tint(){return c.P6.rgb2hex(this.tintRgb)}set tint(t){this.tintRgb=c.P6.hex2rgb(t,this.tintRgb)}get delayLimit(){return(void 0!==this.localDelayLimit?this.localDelayLimit:R)||Number.MAX_VALUE}update(t){const e=this.delayLimit;if(t>e&&(t=e),this.state.update(t),this.state.apply(this.skeleton),!this.skeleton)return;this.skeleton.updateWorldTransform();const s=this.skeleton.slots,r=this.color;let a=null,i=null;r?(a=r.light,i=r.dark):a=this.tintRgb;for(let t=0,e=s.length;t<e;t++){const e=s[t],r=e.getAttachment(),o=this.slotContainers[t];if(!r){o.visible=!1;continue}let h=null;r.sequence&&r.sequence.apply(e,r);let l=r.region;const d=r.color;switch(null!=r&&r.type){case n.Region:if(o.transform.setFromMatrix(e.bone.matrix),l=r.region,e.currentMesh&&(e.currentMesh.visible=!1,e.currentMesh=null,e.currentMeshId=void 0,e.currentMeshName=void 0),!l){e.currentSprite&&(e.currentSprite.renderable=!1);break}if(!e.currentSpriteName||e.currentSpriteName!==r.name){const t=r.name;if(e.currentSprite&&(e.currentSprite.visible=!1),e.sprites=e.sprites||{},void 0!==e.sprites[t])e.sprites[t].visible=!0;else{const s=this.createSprite(e,r,t);o.addChild(s)}e.currentSprite=e.sprites[t],e.currentSpriteName=t}e.currentSprite.renderable=!0,e.hackRegion||this.setSpriteRegion(r,e.currentSprite,l),e.currentSprite.color?h=e.currentSprite.color:(L[0]=a[0]*e.color.r*d.r,L[1]=a[1]*e.color.g*d.g,L[2]=a[2]*e.color.b*d.b,e.currentSprite.tint=c.P6.rgb2hex(L)),e.currentSprite.blendMode=e.blendMode;break;case n.Mesh:if(e.currentSprite){e.currentSprite.visible=!1,e.currentSprite=null,e.currentSpriteName=void 0;const t=new c.wx;t._parentID=-1,t._worldID=o.transform._worldID,o.transform=t}if(!l){e.currentMesh&&(e.currentMesh.renderable=!1);break}const t=r.id;if(void 0===e.currentMeshId||e.currentMeshId!==t){const s=t;if(e.currentMesh&&(e.currentMesh.visible=!1),e.meshes=e.meshes||{},void 0!==e.meshes[s])e.meshes[s].visible=!0;else{const t=this.createMesh(e,r);o.addChild(t)}e.currentMesh=e.meshes[s],e.currentMeshName=r.name,e.currentMeshId=s}e.currentMesh.renderable=!0,r.computeWorldVerticesOld(e,e.currentMesh.vertices),e.currentMesh.color?h=e.currentMesh.color:(L[0]=a[0]*e.color.r*d.r,L[1]=a[1]*e.color.g*d.g,L[2]=a[2]*e.color.b*d.b,e.currentMesh.tint=c.P6.rgb2hex(L)),e.currentMesh.blendMode=e.blendMode,e.hackRegion||this.setMeshRegion(r,e.currentMesh,l);break;case n.Clipping:e.currentGraphics||(this.createGraphics(e,r),o.addChild(e.clippingContainer),o.addChild(e.currentGraphics)),this.updateGraphics(e,r),o.alpha=1,o.visible=!0;continue;default:o.visible=!1;continue}if(o.visible=!0,h){let t=e.color.r*d.r,s=e.color.g*d.g,n=e.color.b*d.b;h.setLight(a[0]*t+i[0]*(1-t),a[1]*s+i[1]*(1-s),a[2]*n+i[2]*(1-n)),e.darkColor?(t=e.darkColor.r,s=e.darkColor.g,n=e.darkColor.b):(t=0,s=0,n=0),h.setDark(a[0]*t+i[0]*(1-t),a[1]*s+i[1]*(1-s),a[2]*n+i[2]*(1-n))}o.alpha=e.color.a}const o=this.skeleton.drawOrder;let h=null,l=null;for(let t=0,e=o.length;t<e;t++){const e=s[o[t].data.index],n=this.slotContainers[o[t].data.index];if(l||null!==n.parent&&n.parent!==this&&(n.parent.removeChild(n),n.parent=this),e.currentGraphics&&e.getAttachment())l=e.clippingContainer,h=e.getAttachment(),l.children.length=0,this.children[t]=n,h.endSlot===e.data&&(h.endSlot=null);else if(l){let s=this.tempClipContainers[t];s||(s=this.tempClipContainers[t]=this.newContainer(),s.visible=!1),this.children[t]=s,n.parent=null,l.addChild(n),h.endSlot==e.data&&(l.renderable=!0,l=null,h=null)}else this.children[t]=n}this._debug?.renderDebug(this)}
1setSpriteRegion(t,e,s){e.attachment===t&&e.region===s||(e.region=s,e.attachment=t,e.texture=s.texture,e.rotation=t.rotation*I.degRad,e.position.x=t.x,e.position.y=t.y,e.alpha=t.color.a,s.size?(e.scale.x=s.size.width/s.originalWidth,e.scale.y=-s.size.height/s.originalHeight):(e.scale.x=t.scaleX*t.width/s.originalWidth,e.scale.y=-t.scaleY*t.height/s.originalHeight))}setMeshRegion(t,e,s){e.attachment===t&&e.region===s||(e.region=s,e.attachment=t,e.texture=s.texture,s.texture.updateUvs(),e.uvBuffer.update(t.regionUVs))}autoUpdateTransform(){if(T){this.lastTime=this.lastTime||Date.now();const t=.001*(Date.now()-this.lastTime);this.lastTime=Date.now(),this.update(t)}else this.lastTime=0;B.W2.prototype.updateTransform.call(this)}createSprite(t,e,s){let n=e.region;t.hackAttachment===e&&(n=t.hackRegion);const r=n?n.texture:null,a=this.newSprite(r);return a.anchor.set(.5),n&&this.setSpriteRegion(e,a,e.region),t.sprites=t.sprites||{},t.sprites[s]=a,a}createMesh(t,e){!e.region&&e.sequence&&e.sequence.apply(t,e);let s=e.region;t.hackAttachment===e&&(s=t.hackRegion,t.hackAttachment=null,t.hackRegion=null);const n=this.newMesh(s?s.texture:null,new Float32Array(e.regionUVs.length),e.regi
1onUVs,new Uint16Array(e.triangles),c.lg.TRIANGLES);return void 0!==n._canvasPadding&&(n._canvasPadding=1.5),n.alpha=e.color.a,n.region=e.region,s&&this.setMeshRegion(e,n,s),t.meshes=t.meshes||{},t.meshes[e.id]=n,n}createGraphics(t,e){const s=this.newGraphics(),n=new c.mg([]);return s.clear(),s.beginFill(16777215,1),s.drawPolygon(n),s.renderable=!1,t.currentGraphics=s,t.clippingContainer=this.newContainer(),t.clippingContainer.mask=t.currentGraphics,s}updateGraphics(t,e){const s=t.currentGraphics.geometry,n=s.graphicsData[0].shape.points,r=e.worldVerticesLength;n.length=r,e.computeWorldVertices(t,0,r,n,0,2),s.invalidate()}hackTextureBySlotIndex(t,e=null,s=null){const n=this.skeleton.slots[t];if(!n)return!1;const r=n.getAttachment();let a=r.region;return e?(a=new f,a.texture=e,a.size=s,n.hackRegion=a,n.hackAttachment=r):(n.hackRegion=null,n.hackAttachment=null),n.currentSprite?this.setSpriteRegion(r,n.currentSprite,a):n.currentMesh&&this.setMeshRegion(r,n.currentMesh,a),!0}hackTextureBySlotName(t,e=null,s=null){const n=this.skeleton.findSlotIndex(t);return-1!=n&&this.hackTextureBySlotIndex(n,e,s)}hackTextureAttachment(t,e,s,n=null){const r=this.skeleton.findSlotIndex(t),a=this.skeleton.getAttachmentByName(t,e);a.region.texture=s;const i=this.skeleton.slots[r];if(!i)return!1;const o=i.getAttachment();if(e===o.name){let t=a.region;return s?(t=new f,t.texture=s,t.size=n,i.hackRegion=t,i.hackAttachment=o):(i.hackRegion=null,i.hackAttachment=null),i.currentSprite&&i.currentSprite.region!=t?(this.setSpriteRegion(o,i.currentSprite,t),i.currentSprite.region=t):i.currentMesh&&i.currentMesh.region!=t&&this.setMeshRegion(o,i.currentMesh,t),!0}return!1}newContainer(){return new B.W2}newSprite(t){return new V(t)}newGraphics(){return new N.TC}newMesh(t,e,s,n,r){return new $(t,e,s,n,r)}transformHack(){return 1}hackAttachmentGroups(t,e,s){if(!t)return;const n=[],r=[];for(let a=0,i=this.skeleton.slots.length;a<i;a++){const i=this.skeleton.slots[a],o=i.currentSpriteName||i.currentMeshName||"",h=i.currentSprite||i.currentMesh;o.endsWith(t)?(h.parentGroup=e,r.push(h)):s&&h&&(h.parentGroup=s,n.push(h))}return[n,r]}destroy(t){this.debug=null;for(let e=0,s=this.skeleton.slots.length;e<s;e++){const s=this.skeleton.slots[e];for(const e in s.meshes)s.meshes[e].destroy(t);s.meshes=null;for(const e in s.sprites)s.sprites[e].destroy(t);s.sprites=null}for(let e=0,s=this.slotContainers.length;e<s;e++)this.slotContainers[e].destroy(t);this.spineData=null,this.skeleton=null,this.slotContainers=null,this.stateData=null,this.state=null,this.tempClipContainers=null,super.destroy(t)}};let q=W;q.clippingPolygon=[],Object.defineProperty(q.prototype,"visible",{get(){return this._visible},set(t){t!==this._visible&&(this._visible=t,t&&(this.lastTime=0))}});var O=s(24069);const U={extension:c.nw.Asset,loader:{extension:{type:c.nw.LoadParser,priority:O.Q2.Normal},test:t=>(0,O.gN)(t,".atlas"),async load(t){const e=await c.Xd.ADAPTER.fetch(t);return await e.text()},testParse(t,e){const s=(0,O.gN)(e.src,".atlas"),n="string"==typeof t;return Promise.resolve(s&&n)},async parse(t,e,s){const n=e.data;let r=c.P6.path.dirname(e.src);r&&r.lastIndexOf("/")!==r.length-1&&(r+="/");let a=null,i=null;const o=new Promise(((t,e)=>{a=t,i=e}));let h;const l=t=>{t||i("Something went terribly wrong loading a spine .atlas file\nMost likely your texture failed to load."),a(h)};if(n.image||n.images){const e=Object.assign(n.image?{default:n.image}:{},n.images);h=new p(t,((t,s)=>{const n=e[t]||e.default;n&&n.baseTexture?s(n.baseTexture):s(n)}),l)}else h=new p(t,_(s,r,n.imageMetadata),l);return await o},unload(t){t.dispose()}}},_=(t,e,s)=>async(n,r)=>{try{const a=c.P6.path.normalize([...e.split(c.P6.path.sep),n].join(c.P6.path.sep));r((await t.load({src:a,data:s})).baseTexture)}catch(t){X&&console.error("Spine: error in texture loader",t),r(null)}};function z(t){return t.hasOwnProperty("bones")}c.Rw.add(U);class H{constructor(){}installLoader(){const t=this,e={extension:c.nw.Asset,loader:{extension:{type:c.nw.LoadParser,priority:O.Q2.Normal},test:t=>(0,O.gN)(t,".skel"),async load(t){const e=await c.Xd.ADAPTER.fetch(t);return await e.arrayBuffer()},testParse(t,e){const s=(0,O.gN)(e.src,".json")&&z(t),n=(0,O.gN)(e.src,".skel")&&t instanceof ArrayBuffer;const r=!1===e.data?.spineAtlas;return Promise.resolve(s&&!r||n)},async parse(e,s,n){const r=c.P6.path.extname(s.src).toLowerCase(),a=c.P6.path.basename(s.src,r);let i=c.P6.path.dirname(s.src);i&&i.lastIndexOf("/")!==i.length-1&&(i+="/");let o=null,h=e;(0,O.gN)(s.src,".json")&&z(e)?o=t.createJsonParser():(o=t.createBinaryParser(),h=new Uint8Array(e));const l=s.data||{},d=l?.spineSkeletonScale??null;d&&(o.scale=d);const u=l.spineAtlas;if(u&&u.pages)return t.parseData(o,u,h);const m=l.atlasRawData;if(m){let e=null,s=null;const r=new Promise(((t,n)=>{e=t,s=n})),a=new p(m,_(n,i,l.imageMetadata),(t=>{t||s("Something went terribly wrong loading a spine .atlas file\nMost likely your texture failed to load."),e(a)})),c=await r;return t.parseData(o,c,h)}let f=l.spineAtlasFile;f||(f=`${i+a}.atlas`);const g=await n.load({src:f,data:l,alias:l.spineAtlasAlias});return t.parseData(o,g,h)}}};return c.Rw.add(e),e}}class j{constructor(t){if(!t)throw new Error("name cannot be null.");this.name=t}}const G=class extends j{constructor(t){super(t),this.id=G.nextID++,this.bones=null,this.vertices=[],this.worldVerticesLength=0,this.timelineAttachment=this}computeWorldVerticesOld(t,e){this.computeWorldVertices(t,0,this.worldVerticesLength,e,0,2)}computeWorldVertices(t,e,s,n,r,a){s=r+(s>>1)*a;const i=t.bone.skeleton,o=t.deform;let h=this.vertices;const l=this.bones;if(!l){o.length>0&&(h=o);const i=t.bone.matrix,l=i.tx,c=i.ty,d=i.a,u=i.c,m=i.b,f=i.d;for(let t=e,i=r;i<s;t+=2,i+=a){const e=h[t],s=h[t+1];n[i]=e*d+s*u+l,n[i+1]=e*m+s*f+c}return}let c=0,d=0;for(let t=0;t<e;t+=2){const t=l[c];c+=t+1,d+=t}const u=i.bones;if(0==o.length)for(let t=r,e=3*d;t<s;t+=a){let s=0,r=0,a=l[c++];for(a+=c;c<a;c++,e+=3){const t=u[l[c]].matrix,n=h[e],a=h[e+1],i=h[e+2];s+=(n*t.a+a*t.c+t.tx)*i,r+=(n*t.b+a*t.d+t.ty)*i}n[t]=s,n[t+1]=r}else{const t=o;for(let e=r,i=3*d,o=d<<1;e<s;e+=a){let s=0,r=0,a=l[c++];for(a+=c;c<a;c++,i+=3,o+=2){const e=u[l[c]].matrix,n=h[i]+t[o],a=h[i+1]+t[o+1],d=h[i+2];s+=(n*e.a+a*e.c+e.tx)*d,r+=(n*e.b+a*e.d+e.ty)*d}n[e]=s,n[e+1]=r}}}copyTo(t){this.bones?(t.bones=new Array(this.bones.length),v.arrayCopy(this.bones,0,t.bone
vendor: 4,495 bytes, line 1
1s,0,this.bones.length)):t.bones=null,this.vertices&&(t.vertices=v.newFloatArray(this.vertices.length),v.arrayCopy(this.vertices,0,t.vertices,0,this.vertices.length)),t.worldVerticesLength=this.worldVerticesLength,t.timelineAttachment=this.timelineAttachment}};let K=G;K.nextID=0;class Z extends K{constructor(t){super(t),this.type=n.BoundingBox,this.color=new S(1,1,1,1)}copy(){const t=new Z(this.name);return this.copyTo(t),t.color.setFromColor(this.color),t}}class J extends K{constructor(t){super(t),this.type=n.Clipping,this.endSlot=null,this.color=new S(.2275,.2275,.8078,1)}copy(){const t=new J(this.name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t}}class Q extends K{constructor(t,e){super(t),this.type=n.Mesh,this.region=null,this.triangles=[],this.color=new S(1,1,1,1),this.width=0,this.height=0,this.hullLength=0,this.edges=[],this.parentMesh=null,this.sequence=null,this.tempColor=new S(0,0,0,0),this.path=e}getParentMesh(){return this.parentMesh}setParentMesh(t){this.parentMesh=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)}copy(){if(this.parentMesh)return this.newLinkedMesh();const t=new Q(this.name,this.path);return t.region=this.region,t.color.setFromColor(this.color),this.copyTo(t),t.regionUVs=new Float32Array(this.regionUVs.length),v.arrayCopy(this.regionUVs,0,t.regionUVs,0,this.regionUVs.length),t.triangles=new Array(this.triangles.length),v.arrayCopy(this.triangles,0,t.triangles,0,this.triangles.length),t.hullLength=this.hullLength,t.sequence=null!=this.sequence?this.sequence.copy():null,this.edges&&(t.edges=new Array(this.edges.length),v.arrayCopy(this.edges,0,t.edges,0,this.edges.length)),t.width=this.width,t.height=this.height,t}computeWorldVertices(t,e,s,n,r,a){null!=this.sequence&&this.sequence.apply(t,this),super.computeWorldVertices(t,e,s,n,r,a)}newLinkedMesh(){const t=new Q(this.name,this.path);return t.region=this.region,t.color.setFromColor(this.color),t.timelineAttachment=this.timelineAttachment,t.setParentMesh(this.parentMesh?this.parentMesh:this),t}}class tt extends K{constructor(t){super(t),this.type=n.Path,this.lengths=[],this.closed=!1,this.constantSpeed=!1,this.color=new S(1,1,1,1)}copy(){const t=new tt(this.name);return this.copyTo(t),t.lengths=new Array(this.lengths.length),v.arrayCopy(this.lengths,0,t.lengths,0,this.lengths.length),t.closed=closed,t.constantSpeed=this.constantSpeed,t.color.setFromColor(this.color),t}}class et extends K{constructor(t){super(t),this.type=n.Point,this.x=0,this.y=0,this.rotation=0,this.color=new S(.38,.94,0,1)}computeWorldPosition(t,e){const s=t.matrix;return e.x=this.x*s.a+this.y*s.c+t.worldX,e.y=this.x*s.b+this.y*s.d+t.worldY,e}computeWorldRotation(t){const e=t.matrix,s=I.cosDeg(this.rotation),n=I.sinDeg(this.rotation),r=s*e.a+n*e.c,a=s*e.b+n*e.d;return Math.atan2(a,r)*I.radDeg}copy(){const t=new et(this.name);return t.x=this.x,t.y=this.y,t.rotation=this.rotation,t.color.setFromColor(this.color),t}}const st=class extends j{constructor(t,e){super(t),this.type=n.Region,this.x=0,this.y=0,this.scaleX=1,this.scaleY=1,this.rotation=0,this.width=0,this.height=0,this.color=new S(1,1,1,1),this.rendererObject=null,this.region=null,this.sequence=null,this.offset=v.newFloatArray(8),this.uvs=v.newFloatArray(8),this.tempColor=new S(1,1,1,1),this.path=e}updateRegion(){if(!this.region)throw new Error("Region not set.");const t=this.region,e=this.width/this.region.originalWidth*this.scaleX,s=this.height/this.region.originalHeight*this.scaleY,n=-this.width/2*this.scaleX+this.region.offsetX*e,r=-this.height/2*this.scaleY+this.region.offsetY*s,a=n+this.region.width*e,i=r+this.region.height*s,o=this.rotation*Math.PI/180,h=Math.cos(o),l=Math.sin(o),c=this.x,d=this.y,u=n*h+c,m=n*l,f=r*h+d,g=r*l,p=a*h+c,x=a*l,w=i*h+d,b=i*l,y=this.offset;y[0]=u-g,y[1]=f+m,y[2]=u-b,y[3]=w+m,y[4]=p-b,y[5]=w+x,y[6]=p-g,y[7]=f+x;const k=this.uvs;90==t.degrees?(k[2]=t.u,k[3]=t.v2,k[4]=t.u,k[5]=t.v,k[6]=t.u2,k[7]=t.v,k[0]=t.u2,k[1]=t.v2):(k[0]=t.u,k[1]=t.v2,k[2]=t.u,k[3]=t.v,k[4]=t.u2,k[5]=t.v,k[6]=t.u2,k[7]=t.v2)}computeWorldVertices(t,e,s,n){null!=this.sequence&&this.sequence.apply(t,this);const r=t.bone,a=this.offset,i=r.matrix,o=i.tx,h=i.ty,l=i.a,c=i.c,d=i.b,u=i.d;let m=0,f=0;m=a[0],f=a[1],e[s]=m*l+f*c+o,e[s+1]=m*d+f*u+h,s+=n,m=a[2],f=a[3],e[s]=m*l+f*c+o,e[s+1]=m*d+f*u+h,s+=n,m=a[4],f=
1a[5],e[s]=m*l+f*c+o,e[s+1]=m*d+f*u+h,s+=n,m=a[6],f=a[7],e[s]=m*l+f*c+o,e[s+1]=m*d+f*u+h}copy(){const t=new st(this.name,this.path);return t.region=this.region,t.rendererObject=this.rendererObject,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,v.arrayCopy(this.uvs,0,t.uvs,0,8),v.arrayCopy(this.offset,0,t.offset,0,8),t.color.setFromColor(this.color),t.sequence=null!=this.sequence?this.sequence.copy():null,t}};let nt=st;nt.X1=0,nt.Y1=1,nt.C1R=2,nt.C1G=3,nt.C1B=4,nt.C1A=5,nt.U1=6,nt.V1=7,nt.X2=8,nt.Y2=9,nt.C2R=10,nt.C2G=11,nt.C2B=12,nt.C2A=13,nt.U2=14,nt.V2=15,nt.X3=16,nt.Y3=17,nt.C3R=18,nt.C3G=19,nt.C3B=20,nt.C3A=21,nt.U3=22,nt.V3=23,nt.X4=24,nt.Y4=25,nt.C4R=26,nt.C4G=27,nt.C4B=28,nt.C4A=29,nt.U4=30,nt.V4=31;const rt=class{constructor(t){this.id=rt.nextID(),this.start=0,this.digits=0,this.setupIndex=0,this.regions=new Array(t)}copy(){const t=new rt(this.regions.length);return v.arrayCopy(this.regions,0,t.regions,0,this.regions.length),t.start=this.start,t.digits=this.digits,t.setupIndex=this.setupIndex,t}apply(t,e){let s=t.sequenceIndex;-1==s&&(s=this.setupIndex),s>=this.regions.length&&(s=this.regions.length-1);const n=this.regions[s];e.region!=n&&(e.region=n)}getPath(t,e){let s=t;const n=(this.start+e).toString();for(let t=this.digits-n.length;t>0;t--)s+="0";return s+=n,s}static nextID(){return rt._nextID++}};let at=rt;at._nextID=0;var it=(t=>(t[t.hold=0]="hold",t[t.once=1]="once",t[t.loop=2]="loop",t[t.pingpong=3]="pingpong",t[t.onceReverse=4]="onceReverse",t[t.loopReverse=5]="loopReverse",t[t.pingpongReverse=6]="pingpongReverse",t))(it||{});const ot=[0,1,2,3,4,5,6];class ht{constructor(t,e,s){if(this.timelines=[],this.timelineIds=new y,!t)throw new Error("name cannot be null.");this.name=t,this.setTimelines(e),this.duration=s}setTimelines(t){if(!t)throw new Error("timelines cannot be null.");this.timelines=t,this.timelineIds.clear();for(let e=0;e<t.length;e++)this.timelineIds.addAll(t[e].getPropertyIds())}hasTimeline(t){for(let e=0;e<t.length;e++)if(this.timelineIds.contains(t[e]))return!0;return!1}apply(t,e,s,n,r,a,i,o){if(!t)throw new Error("skeleton cannot be null.");n&&0!=this.duration&&(s%=this.duration,e>0&&(e%=this.duration));const h=this.timelines;for(let n=0,l=h.length;n<l;n++)h[n].apply(t,e,s,r,a,i,o)}}const lt=0,ct=1,dt=2,ut=3,mt=4,ft=5,gt=6,pt=7,xt=8,wt=9,bt=10,yt=11,kt=12,St=13,At=14,It=15,Mt=16,vt=17,Ct=18,Ft=19;class Yt{constructor(t,e){this.propertyIds=e,this.frames=v.newFloatArray(t*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 search1(t,e){const s=t.length;for(let n=1;n<s;n++)if(t[n]>e)return n-1;return s-1}static search(t,e,s){const n=t.length;for(let r=s;r<n;r+=s)if(t[r]>e)return r-s;return n-s}}class Et extends Yt{constructor(t,e,s){super(t,s),this.curves=v.newFloatArray(t+18*e),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){const e=this.getFrameCount()+18*t;if(this.curves.length>e){const t=v.newFloatArray(e);v.arrayCopy(this.curves,0,t,0,e),this.curves=t}}setBezier(t,e,s,n,r,a,i,o,h,l,c){const d=this.curves;let u=this.getFrameCount()+18*t;0==s&&(d[e]=2+u);const m=.03*(n-2*a+o),f=.03*(r-2*i+h),g=.006*(3*(a-o)-n+l),p=.006*(3*(i-h)-r+c);let x=2*m+g,w=2*f+p,b=.3*(a-n)+m+.16666667*g,y=.3*(i-r)+f+.16666667*p,k=n+b,S=r+y;for(let t=u+18;u<t;u+=2)d[u]=k,d[u+1]=S,b+=x,y+=w,x+=g,w+=p,k+=b,S+=y}getBezierValue(t,e,s,n){const r=this.curves;if(r[n]>t){const a=this.frames[e],i=this.frames[e+s];return i+(t-a)/(r[n]-a)*(r[n+1]-i)}const a=n+18;for(n+=2;n<a;n+=2)if(r[n]>=t){const e=r[n-2],s=r[n-1];return s+(t-e)/(r[n]-e)*(r[n+1]-s)}e+=this.getFrameEntries();const i=r[a-2],o=r[a-1];return o+(t-i)/(this.frames[e]-i)*(this.frames[e+s]-o)}}class Tt extends Et{constructor(t,e,s){super(t,e,[s])}getFrameEntries(){return 2}setFrame(t,e,s){t<<=1,this.frames[t]=e,this.frames[t+1]=s}getCurveValue(t){const e=this.frames;let s=e.length-2;for(let n=2;n<=s;n+=2)if(e[n]>t){s=n-2;break}const n=this.curves[s>>1];switch(n){case 0:const n=e[s],r=e[s+1];return r+(t-n)/(e[s+2]-n)*(e[s+2+1]-r);case 1:return e[s+1]}return this.getBezierValue(t,s,1,n-2)}}
vendor: 5,150 bytes, line 1
1class Rt extends Et{constructor(t,e,s,n){super(t,e,[s,n])}getFrameEntries(){return 3}setFrame(t,e,s,n){t*=3,this.frames[t]=e,this.frames[t+1]=s,this.frames[t+2]=n}}class Xt extends Tt{constructor(t,e,s){super(t,e,`${lt}|${s}`),this.boneIndex=0,this.boneIndex=s}apply(t,e,s,n,r,i,o){const h=t.bones[this.boneIndex];if(!h.active)return;if(s<this.frames[0]){switch(i){case a.setup:return void(h.rotation=h.data.rotation);case a.first:h.rotation+=(h.data.rotation-h.rotation)*r}return}let l=this.getCurveValue(s);switch(i){case a.setup:h.rotation=h.data.rotation+l*r;break;case a.first:case a.replace:l+=h.data.rotation-h.rotation;case a.add:h.rotation+=l*r}}}class Bt extends Rt{constructor(t,e,s){super(t,e,`${ct}|${s}`,`${dt}|${s}`),this.boneIndex=0,this.boneIndex=s}apply(t,e,s,n,r,i,o){const h=t.bones[this.boneIndex];if(!h.active)return;const l=this.frames;if(s<l[0]){switch(i){case a.setup:return h.x=h.data.x,void(h.y=h.data.y);case a.first:h.x+=(h.data.x-h.x)*r,h.y+=(h.data.y-h.y)*r}return}let c=0,d=0;const u=Yt.search(l,s,3),m=this.curves[u/3];switch(m){case 0:const t=l[u];c=l[u+1],d=l[u+2];const e=(s-t)/(l[u+3]-t);c+=(l[u+3+1]-c)*e,d+=(l[u+3+2]-d)*e;break;case 1:c=l[u+1],d=l[u+2];break;default:c=this.getBezierValue(s,u,1,m-2),d=this.getBezierValue(s,u,2,m+18-2)}switch(i){case a.setup:h.x=h.data.x+c*r,h.y=h.data.y+d*r;break;case a.first:case a.replace:h.x+=(h.data.x+c-h.x)*r,h.y+=(h.data.y+d-h.y)*r;break;case a.add:h.x+=c*r,h.y+=d*r}}}class Pt extends Tt{constructor(t,e,s){super(t,e,`${ct}|${s}`),this.boneIndex=0,this.boneIndex=s}apply(t,e,s,n,r,i,o){const h=t.bones[this.boneIndex];if(!h.active)return;if(s<this.frames[0]){switch(i){case a.setup:return void(h.x=h.data.x);case a.first:h.x+=(h.data.x-h.x)*r}return}const l=this.getCurveValue(s);switch(i){case a.setup:h.x=h.data.x+l*r;break;case a.first:case a.replace:h.x+=(h.data.x+l-h.x)*r;break;case a.add:h.x+=l*r}}}class Dt extends Tt{constructor(t,e,s){super(t,e,`${dt}|${s}`),this.boneIndex=0,this.boneIndex=s}apply(t,e,s,n,r,i,o){const h=t.bones[this.boneIndex];if(!h.active)return;if(s<this.frames[0]){switch(i){case a.setup:return void(h.y=h.data.y);case a.first:h.y+=(h.data.y-h.y)*r}return}const l=this.getCurveValue(s);switch(i){case a.setup:h.y=h.data.y+l*r;break;case a.first:case a.replace:h.y+=(h.data.y+l-h.y)*r;break;case a.add:h.y+=l*r}}}class Nt extends Rt{constructor(t,e,s){super(t,e,`${ut}|${s}`,`${mt}|${s}`),this.boneIndex=0,this.boneIndex=s}apply(t,e,s,n,r,o,h){const l=t.bones[this.boneIndex];if(!l.active)return;const c=this.frames;if(s<c[0]){switch(o){case a.setup:return l.scaleX=l.data.scaleX,void(l.scaleY=l.data.scaleY);case a.first:l.scaleX+=(l.data.scaleX-l.scaleX)*r,l.scaleY+=(l.data.scaleY-l.scaleY)*r}return}let d,u;const m=Yt.search(c,s,3),f=this.curves[m/3];switch(f){case 0:const t=c[m];d=c[m+1],u=c[m+2];const e=(s-t)/(c[m+3]-t);d+=(c[m+3+1]-d)*e,u+=(c[m+3+2]-u)*e;break;case 1:d=c[m+1],u=c[m+2];break;default:d=this.getBezierValue(s,m,1,f-2),u=this.getBezierValue(s,m,2,f+18-2)}if(d*=l.data.scaleX,u*=l.data.scaleY,1==r)o==a.add?(l.scaleX+=d-l.data.scaleX,l.scaleY+=u-l.data.scaleY):(l.scaleX=d,l.scaleY=u);else{let t=0,e=0;if(h==i.mixOut)switch(o){case a.setup:t=l.data.scaleX,e=l.data.scaleY,l.scaleX=t+(Math.abs(d)*I.signum(t)-t)*r,l.scaleY=e+(Math.abs(u)*I.signum(e)-e)*r;break;case a.first:case a.replace:t=l.scaleX,e=l.scaleY,l.scaleX=t+(Math.abs(d)*I.signum(t)-t)*r,l.scaleY=e+(Math.abs(u)*I.signum(e)-e)*r;break;case a.add:l.scaleX+=(d-l.data.scaleX)*r,l.scaleY+=(u-l.data.scaleY)*r}else switch(o){case a.setup:t=Math.abs(l.data.scaleX)*I.signum(d),e=Math.abs(l.data.scaleY)*I.signum(u),l.scaleX=t+(d-t)*r,l.scaleY=e+(u-e)*r;break;case a.first:case a.replace:t=Math.abs(l.scaleX)*I.signum(d),e=Math.abs(l.scaleY)*I.signum(u),l.scaleX=t+(d-t)*r,l.scaleY=e+(u-e)*r;break;case a.add:l.scaleX+=(d-l.data.scaleX)*r,l.scaleY+=(u-l.data.scaleY)*r}}}}class Lt extends Tt{constructor(t,e,s){super(t,e,`${ut}|${s}`),this.boneIndex=0,this.boneIndex=s}apply(t,e,s,n,r,o,h){const l=t.bones[this.boneIndex];if(!l.active)return;if(s<this.frames[0]){switch(o){case a.setup:return void(l.scaleX=l.data.scaleX);case a.first:l.scaleX+=(l.data.scaleX-l.scaleX)*r}return}const c=this.getCurveValue(s)*l.data.scaleX;if(1==r)o==a.add?l.scaleX+=c-l.data.scaleX:l.scaleX=c;else{let t=0;if(h==i.mixOut)switch(o){case a.setup:t=l.data.scaleX,l.scaleX=t+(Math.abs(c)*I.signum(t)-t)*r;break;case a.first:case a.replace:t=l.scaleX,l.scaleX=t+(Math.abs(c)*I.signum(t)-t)*r;break;case a.add:l.scaleX+=(c-l.data.scaleX)*r}else switch(o){case a.setup:t=Math.abs(l.data.scaleX)*I.signum(c),l.scaleX=t+(c-t)*r;break;case a.first:case a.replace:t=Math.abs(l.scaleX)*I.signum(c),l.scaleX=t+(c-t)*r;break;case a.add:l.scaleX+=(c-l.data.scaleX)*r}}}}class Vt extends Tt{constructor(t,e,s){super(t,e,`${mt}|${s}`),this.boneIndex=0,this.boneIndex=s}apply(t,e,s,n,r,o,h){const l=t.bones[this.boneIndex];if(!l.active)return;if(s<this.frames[0]){switch(o){case a.setup:return void(l.scaleY=l.data.scaleY);case a.first:l.scaleY+=(l.data.scaleY-l.scaleY)*r}return}const c=this.getCurveValue(s)*l.data.scaleY;if(1==r)o==a.add?l.scaleY+=c-l.data.scaleY:l.scaleY=c;else{let t=0;
1if(h==i.mixOut)switch(o){case a.setup:t=l.data.scaleY,l.scaleY=t+(Math.abs(c)*I.signum(t)-t)*r;break;case a.first:case a.replace:t=l.scaleY,l.scaleY=t+(Math.abs(c)*I.signum(t)-t)*r;break;case a.add:l.scaleY+=(c-l.data.scaleY)*r}else switch(o){case a.setup:t=Math.abs(l.data.scaleY)*I.signum(c),l.scaleY=t+(c-t)*r;break;case a.first:case a.replace:t=Math.abs(l.scaleY)*I.signum(c),l.scaleY=t+(c-t)*r;break;case a.add:l.scaleY+=(c-l.data.scaleY)*r}}}}class $t extends Rt{constructor(t,e,s){super(t,e,`${ft}|${s}`,`${gt}|${s}`),this.boneIndex=0,this.boneIndex=s}apply(t,e,s,n,r,i,o){const h=t.bones[this.boneIndex];if(!h.active)return;const l=this.frames;if(s<l[0]){switch(i){case a.setup:return h.shearX=h.data.shearX,void(h.shearY=h.data.shearY);case a.first:h.shearX+=(h.data.shearX-h.shearX)*r,h.shearY+=(h.data.shearY-h.shearY)*r}return}let c=0,d=0;const u=Yt.search(l,s,3),m=this.curves[u/3];switch(m){case 0:const t=l[u];c=l[u+1],d=l[u+2];const e=(s-t)/(l[u+3]-t);c+=(l[u+3+1]-c)*e,d+=(l[u+3+2]-d)*e;break;case 1:c=l[u+1],d=l[u+2];break;default:c=this.getBezierValue(s,u,1,m-2),d=this.getBezierValue(s,u,2,m+18-2)}switch(i){case a.setup:h.shearX=h.data.shearX+c*r,h.shearY=h.data.shearY+d*r;break;case a.first:case a.replace:h.shearX+=(h.data.shearX+c-h.shearX)*r,h.shearY+=(h.data.shearY+d-h.shearY)*r;break;case a.add:h.shearX+=c*r,h.shearY+=d*r}}}class Wt extends Tt{constructor(t,e,s){super(t,e,`${ft}|${s}`),this.boneIndex=0,this.boneIndex=s}apply(t,e,s,n,r,i,o){const h=t.bones[this.boneIndex];if(!h.active)return;if(s<this.frames[0]){switch(i){case a.setup:return void(h.shearX=h.data.shearX);case a.first:h.shearX+=(h.data.shearX-h.shearX)*r}return}const l=this.getCurveValue(s);switch(i){case a.setup:h.shearX=h.data.shearX+l*r;break;case a.first:case a.replace:h.shearX+=(h.data.shearX+l-h.shearX)*r;break;case a.add:h.shearX+=l*r}}}class qt extends Tt{constructor(t,e,s){super(t,e,`${gt}|${s}`),this.boneIndex=0,this.boneIndex=s}apply(t,e,s,n,r,i,o){const h=t.bones[this.boneIndex];if(!h.active)return;if(s<this.frames[0]){switch(i){case a.setup:return void(h.shearY=h.data.shearY);case a.first:h.shearY+=(h.data.shearY-h.shearY)*r}return}const l=this.getCurveValue(s);switch(i){case a.setup:h.shearY=h.data.shearY+l*r;break;case a.first:case a.replace:h.shearY+=(h.data.shearY+l-h.shearY)*r;break;case a.add:h.shearY+=l*r}}}class Ot extends Et{constructor(t,e,s){super(t,e,[`${pt}|${s}`,`${xt}|${s}`]),this.slotIndex=0,this.slotIndex=s}getFrameEntries(){return 5}setFrame(t,e,s,n,r,a){t*=5,this.frames[t]=e,this.frames[t+1]=s,this.frames[t+2]=n,this.frames[t+3]=r,this.frames[t+4]=a}apply(t,e,s,n,r,i,o){const h=t.slots[this.slotIndex];if(!h.bone.active)return;const l=this.frames,c=h.color;if(s<l[0]){const t=h.data.color;switch(i){case a.setup:return void c.setFromColor(t);case a.first:c.add((t.r-c.r)*r,(t.g-c.g)*r,(t.b-c.b)*r,(t.a-c.a)*r)}return}let d=0,u=0,m=0,f=0;const g=Yt.search(l,s,5),p=this.curves[g/5];switch(p){case 0:const t=l[g];d=l[g+1],u=l[g+2],m=l[g+3],f=l[g+4];const e=(s-t)/(l[g+5]-t);d+=(l[g+5+1]-d)*e,u+=(l[g+5+2]-u)*e,m+=(l[g+5+3]-m)*e,f+=(l[g+5+4]-f)*e;break;case 1:d=l[g+1],u=l[g+2],m=l[g+3],f=l[g+4];break;default:d=this.getBezierValue(s,g,1,p-2),u=this.getBezierValue(s,g,2,p+18-2),m=this.getBezierValue(s,g,3,p+36-2),f=this.getBezierValue(s,g,4,p+54-2)}1==r?c.set(d,u,m,f):(i==a.setup&&c.setFromColor(h.data.color),c.add((d-c.r)*r,(u-c.g)*r,(m-c.b)*r,(f-c.a)*r))}}class Ut extends Et{constructor(t,e,s){super(t,e,[`${pt}|${s}`]),this.slotIndex=0,this.slotIndex=s}getFrameEntries(){return 4}setFrame(t,e,s,n,r){t<<=2,this.frames[t]=e,this.frames[t+1]=s,this.frames[t+2]=n,this.frames[t+3]=r}apply(t,e,s,n,r,i,o){const h=t.slots[this.slotIndex];if(!h.bone.active)return;const l=this.frames,c=h.color;if(s<l[0]){const t=h.data.color;switch(i){case a.setup:return c.r=t.r,c.g=t.g,void(c.b=t.b);case a.first:c.r+=(t.r-c.r)*r,c.g+=(t.g-c.g)*r,c.b+=(t.b-c.b)*r}return}let d=0,u=0,m=0;const f=Yt.search(l,s,4),g=this.curves[f>>2];switch(g){case 0:const t=l[f];d=l[f+1],u=l[f+2],m=l[f+3];const e=(s-t)/(l[f+4]-t);d+=(l[f+4+1]-d)*e,u+=(l[f+4+2]-u)*e,m+=(l[f+4+3]-m)*e;break;case 1:d=l[f+1],u=l[f+2],m=l[f+3];break;default:d=this.getBezierValue(s,f,1,g-2),u=this.getBezierValue(s,f,2,g+18-2),m=this.getBezierValue(s,f,3,g+36-2)}if(1==r)c.r=d,c.g=u,c.b=m;else{if(i==a.setup){const t=h.data.color;c.r=t.r,c.g=t.g,c.b=t.b}c.r+=(d-c.r)*r,c.g+=(u-c.g)*r,c.b+=(m-c.b)*r}}}class _t extends Tt{constructor(t,e,s){super(t,e,`${xt}|${s}`),this.slotIndex=0,this.slotIndex=s}apply(t,e,s,n,r,i,o){const h=t.slots[this.slotIndex];if(!h.bone.active)return;const l=h.color;if(s<this.frames[0]){const t=h.data.color;switch(i){case a.setup:return void(l.a=t.a);case a.first:l.a+=(t.a-l.a)*r}return}const c=this.getCurveValue(s);1==r?l.a=c:(i==a.setup&&(l.a=h.data.color.a),l.a+=(c-l.a)*r)}}
1class zt extends Et{constructor(t,e,s){super(t,e,[`${pt}|${s}`,`${xt}|${s}`,`${wt}|${s}`]),this.slotIndex=0,this.slotIndex=s}getFrameEntries(){return 8}setFrame(t,e,s,n,r,a,i,o,h){t<<=3,this.frames[t]=e,this.frames[t+1]=s,this.frames[t+2]=n,this.frames[t+3]=r,this.frames[t+4]=a,this.frames[t+5]=i,this.frames[t+6]=o,this.frames[t+7]=h}apply(t,e,s,n,r,i,o){const h=t.slots[this.slotIndex];if(!h.bone.active)return;const l=this.frames,c=h.color,d=h.darkColor;if(s<l[0]){const t=h.data.color,e=h.data.darkColor;switch(i){case a.setup:return c.setFromColor(t),d.r=e.r,d.g=e.g,void(d.b=e.b);case a.first:c.add((t.r-c.r)*r,(t.g-c.g)*r,(t.b-c.b)*r,(t.a-c.a)*r),d.r+=(e.r-d.r)*r,d.g+=(e.g-d.g)*r,d.b+=(e.b-d.b)*r}return}let u=0,m=0,f=0,g=0,p=0,x=0,w=0;const b=Yt.search(l,s,8),y=this.curves[b>>3];switch(y){case 0:const t=l[b];u=l[b+1],m=l[b+2],f=l[b+3],g=l[b+4],p=l[b+5],x=l[b+6],w=l[b+7];const e=(s-t)/(l[b+8]-t);u+=(l[b+8+1]-u)*e,m+=(l[b+8+2]-m)*e,f+=(l[b+8+3]-f)*e,g+=(l[b+8+4]-g)*e,p+=(l[b+8+5]-p)*e,x+=(l[b+8+6]-x)*e,w+=(l[b+8+7]-w)*e;break;case 1:u=l[b+1],m=l[b+2],f=l[b+3],g=l[b+4],p=l[b+5],x=l[b+6],w=l[b+7];break;default:u=this.getBezierValue(s,b,1,y-2),m=this.getBezierValue(s,b,2,y+18-2),f=this.getBezierValue(s,b,3,y+36-2),g=this.getBezierValue(s,b,4,y+54-2),p=this.getBezierValue(s,b,5,y+72-2),x=this.getBezierValue(s,b,6,y+90-2),w=this.getBezierValue(s,b,7,y+108-2)}if(1==r)c.set(u,m,f,g),d.r=p,d.g=x,d.b=w;else{if(i==a.setup){c.setFromColor(h.data.color);const t=h.data.darkColor;d.r=t.r,d.g=t.g,d.b=t.b}c.add((u-c.r)*r,(m-c.g)*r,(f-c.b)*r,(g-c.a)*r),d.r+=(p-d.r)*r,d.g+=(x-d.g)*r,d.b+=(w-d.b)*r}}}class Ht extends Et{constructor(t,e,s){super(t,e,[`${pt}|${s}`,`${wt}|${s}`]),this.slotIndex=0,this.slotIndex=s}getFrameEntries(){return 7}setFrame(t,e,s,n,r,a,i,o){t*=7,this.frames[t]=e,this.frames[t+1]=s,this.frames[t+2]=n,this.frames[t+3]=r,this.frames[t+4]=a,this.frames[t+5]=i,this.frames[t+6]=o}apply(t,e,s,n,r,i,o){const h=t.slots[this.slotIndex];if(!h.bone.active)return;const l=this.frames,c=h.color,d=h.darkColor;if(s<l[0]){const t=h.data.color,e=h.data.darkColor;switch(i){case a.setup:return c.r=t.r,c.g=t.g,c.b=t.b,d.r=e.r,d.g=e.g,void(d.b=e.b);case a.first:c.r+=(t.r-c.r)*r,c.g+=(t.g-c.g)*r,c.b+=(t.b-c.b)*r,d.r+=(e.r-d.r)*r,d.g+=(e.g-d.g)*r,d.b+=(e.b-d.b)*r}return}let u=0,m=0,f=0,g=0,p=0,x=0;const w=Yt.search(l,s,7),b=this.curves[w/7];switch(b){case 0:const t=l[w];u=l[w+1],m=l[w+2],f=l[w+3],g=l[w+4],p=l[w+5],x=l[w+6];const e=(s-t)/(l[w+7]-t);u+=(l[w+7+1]-u)*e,m+=(l[w+7+2]-m)*e,f+=(l[w+7+3]-f)*e,g+=(l[w+7+4]-g)*e,p+=(l[w+7+5]-p)*e,x+=(l[w+7+6]-x)*e;break;case 1:u=l[w+1],m=l[w+2],f=l[w+3],g=l[w+4],p=l[w+5],x=l[w+6];break;default:u=this.getBezierValue(s,w,1,b-2),m=this.getBezierValue(s,w,2,b+18-2),f=this.getBezierValue(s,w,3,b+36-2),g=this.getBezierValue(s,w,4,b+54-2),p=this.getBezierValue(s,w,5,b+72-2),x=this.getBezierValue(s,w,6,b+90-2)}if(1==r)c.r=u,c.g=m,c.b=f,d.r=g,d.g=p,d.b=x;else{if(i==a.setup){const t=h.data.color,e=h.data.darkColor;c.r=t.r,c.g=t.g,c.b=t.b,d.r=e.r,d.g=e.g,d.b=e.b}c.r+=(u-c.r)*r,c.g+=(m-c.g)*r,c.b+=(f-c.b)*r,d.r+=(g-d.r)*r,d.g+=(p-d.g)*r,d.b+=(x-d.b)*r}}}class jt extends Yt{constructor(t,e){super(t,[`${bt}|${e}`]),this.slotIndex=0,this.slotIndex=e,this.attachmentNames=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e,s){this.frames[t]=e,this.attachmentNames[t]=s}apply(t,e,s,n,r,o,h){const l=t.slots[this.slotIndex];l.bone.active&&(h!=i.mixOut?s<this.frames[0]?o!=a.setup&&o!=a.first||this.setAttachment(t,l,l.data.attachmentName):this.setAttachment(t,l,this.attachmentNames[Yt.search1(this.frames,s)]):o==a.setup&&this.setAttachment(t,l,l.data.attachmentName))}setAttachment(t,e,s){e.setAttachment(s?t.getAttachment(this.slotIndex,s):null)}}class Gt extends Et{constructor(t,e,s,n){super(t,e,[`${yt}|${s}|${n.id}`]),this.slotIndex=0,this.slotIndex=s,this.attachment=n,this.vertices=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e,s){this.frames[t]=e,this.vertices[t]=s}setBezier(t,e,s,n,r,a,i,o,h,l,c){const d=this.curves;let u=this.getFrameCount()+18*t;0==s&&(d[e]=2+u);const m=.03*(n-2*a+o),f=.03*h-.06*i,g=.006*(3*(a-o)-n+l),p=.018*(i-h+.33333333);let x=2*m+g,w=2*f+p,b=.3*(a-n)+m+.16666667*g,y=.3*i+f+.16666667*p,k=n+b,S=y;for(let t=u+18;u<t;u+=2)d[u]=k,d[u+1]=S,b+=x,y+=w,x+=g,w+=p,k+=b,S+=y}getCurvePercent(t,e){const s=this.curves;let n=s[e];switch(n){case 0:const s=this.frames[e];return(t-s)/(this.frames[e+this.getFrameEntries()]-s);case 1:return 0}if(n-=2,s[n]>t){const r=this.frames[e];return s[n+1]*(t-r)/(s[n]-r)}const r=n+18;for(n+=2;n<r;n+=2)if(s[n]>=t){const e=s[n-2],r=s[n-1];return r+(t-e)/(s[n]-e)*(s[n+1]-r)}const a=s[r-2],i=s[r-1];return i+(1-i)*(t-a)/(this.frames[e+this.getFrameEntries()]-a)}apply(t,e,s,n,r,i,o){const h=t.slots[this.slotIndex];if(!h.bone.active)return;const l=h.getAttachment();if(!l)return;if(!(l instanceof K)||l.timelineAttachment!=this.attachment)return;const c=h.deform;0==c.length&&(i=a.setup);const d=this.vertices,u=d[0].length,m=this.frames;if(s<m[0]){switch(i){case a.setup:return void(c.length=0);case a.first:if(1==r)return void(c.length=0);c.length=u;const t=l;if(t.bones){r=1-r;for(let t=0;t<u;t++)c[t]*=r}else{const e=t.vertices;for(let t=0;t<u;t++)c[t]+=(e[t]-c[t])*r}}return}if(c.length=u,s>=m[m.length-1]){const t=d[m.length-1];if(1==r)if(i==a.add){const e=l;
1if(e.bones)for(let e=0;e<u;e++)c[e]+=t[e];else{const s=e.vertices;for(let e=0;e<u;e++)c[e]+=t[e]-s[e]}}else v.arrayCopy(t,0,c,0,u);else switch(i){case a.setup:{const e=l;if(e.bones)for(let e=0;e<u;e++)c[e]=t[e]*r;else{const s=e.vertices;for(let e=0;e<u;e++){const n=s[e];c[e]=n+(t[e]-n)*r}}break}case a.first:case a.replace:for(let e=0;e<u;e++)c[e]+=(t[e]-c[e])*r;break;case a.add:const e=l;if(e.bones)for(let e=0;e<u;e++)c[e]+=t[e]*r;else{const s=e.vertices;for(let e=0;e<u;e++)c[e]+=(t[e]-s[e])*r}}return}const f=Yt.search1(m,s),g=this.getCurvePercent(s,f),p=d[f],x=d[f+1];if(1==r)if(i==a.add){const t=l;if(t.bones)for(let t=0;t<u;t++){const e=p[t];c[t]+=e+(x[t]-e)*g}else{const e=t.vertices;for(let t=0;t<u;t++){const s=p[t];c[t]+=s+(x[t]-s)*g-e[t]}}}else for(let t=0;t<u;t++){const e=p[t];c[t]=e+(x[t]-e)*g}else switch(i){case a.setup:{const t=l;if(t.bones)for(let t=0;t<u;t++){const e=p[t];c[t]=(e+(x[t]-e)*g)*r}else{const e=t.vertices;for(let t=0;t<u;t++){const s=p[t],n=e[t];c[t]=n+(s+(x[t]-s)*g-n)*r}}break}case a.first:case a.replace:for(let t=0;t<u;t++){const e=p[t];c[t]+=(e+(x[t]-e)*g-c[t])*r}break;case a.add:const t=l;if(t.bones)for(let t=0;t<u;t++){const e=p[t];c[t]+=(e+(x[t]-e)*g)*r}else{const e=t.vertices;for(let t=0;t<u;t++){const s=p[t];c[t]+=(s+(x[t]-s)*g-e[t])*r}}}}}const Kt=class extends Yt{constructor(t){super(t,Kt.propertyIds),this.events=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e){this.frames[t]=e.time,this.events[t]=e}apply(t,e,s,n,r,a,i){if(!n)return;const o=this.frames,h=this.frames.length;if(e>s)this.apply(t,e,Number.MAX_VALUE,n,r,a,i),e=-1;else if(e>=o[h-1])return;if(s<o[0])return;let l=0;if(e<o[0])l=0;else{l=Yt.search1(o,e)+1;const t=o[l];for(;l>0&&o[l-1]==t;)l--}for(;l<h&&s>=o[l];l++)n.push(this.events[l])}};let Zt=Kt;Zt.propertyIds=[`${kt}`];const Jt=class extends Yt{constructor(t){super(t,Jt.propertyIds),this.drawOrders=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e,s){this.frames[t]=e,this.drawOrders[t]=s}apply(t,e,s,n,r,o,h){if(h==i.mixOut)return void(o==a.setup&&v.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length));if(s<this.frames[0])return void(o!=a.setup&&o!=a.first||v.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length));const l=Yt.search1(this.frames,s),c=this.drawOrders[l];if(c){const e=t.drawOrder,s=t.slots;for(let t=0,n=c.length;t<n;t++)e[t]=s[c[t]]}else v.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length)}};let Qt=Jt;Qt.propertyIds=[`${St}`];class te extends Et{constructor(t,e,s){super(t,e,[`${At}|${s}`]),this.ikConstraintIndex=0,this.ikConstraintIndex=s}getFrameEntries(){return 6}setFrame(t,e,s,n,r,a,i){t*=6,this.frames[t]=e,this.frames[t+1]=s,this.frames[t+2]=n,this.frames[t+3]=r,this.frames[t+4]=a?1:0,this.frames[t+5]=i?1:0}apply(t,e,s,n,r,o,h){const l=t.ikConstraints[this.ikConstraintIndex];if(!l.active)return;const c=this.frames;if(s<c[0]){switch(o){case a.setup:return l.mix=l.data.mix,l.softness=l.data.softness,l.bendDirection=l.data.bendDirection,l.compress=l.data.compress,void(l.stretch=l.data.stretch);case a.first:l.mix+=(l.data.mix-l.mix)*r,l.softness+=(l.data.softness-l.softness)*r,l.bendDirection=l.data.bendDirection,l.compress=l.data.compress,l.stretch=l.data.stretch}return}let d=0,u=0;const m=Yt.search(c,s,6),f=this.curves[m/6];switch(f){case 0:const t=c[m];d=c[m+1],u=c[m+2];const e=(s-t)/(c[m+6]-t);d+=(c[m+6+1]-d)*e,u+=(c[m+6+2]-u)*e;break;case 1:d=c[m+1],u=c[m+2];break;default:d=this.getBezierValue(s,m,1,f-2),u=this.getBezierValue(s,m,2,f+18-2)}o==a.setup?(l.mix=l.data.mix+(d-l.data.mix)*r,l.softness=l.data.softness+(u-l.data.softness)*r,h==i.mixOut?(l.bendDirection=l.data.bendDirection,l.compress=l.data.compress,l.stretch=l.data.stretch):(l.bendDirection=c[m+3],l.compress=0!=c[m+4],l.stretch=0!=c[m+5])):(l.mix+=(d-l.mix)*r,l.softness+=(u-l.softness)*r,h==i.mixIn&&(l.bendDirection=c[m+3],l.compress=0!=c[m+4],l.stretch=0!=c[m+5]))}}class ee extends Et{constructor(t,e,s){super(t,e,[`${It}|${s}`]),this.transformConstraintIndex=0,this.transformConstraintIndex=s}getFrameEntries(){return 7}setFrame(t,e,s,n,r,a,i,o){const h=this.frames;h[t*=7]=e,h[t+1]=s,h[t+2]=n,h[t+3]=r,h[t+4]=a,h[t+5]=i,h[t+6]=o}apply(t,e,s,n,r,i,o){const h=t.transformConstraints[this.transformConstraintIndex];if(!h.active)return;const l=this.frames;if(s<l[0]){const t=h.data;switch(i){case a.setup:return h.mixRotate=t.mixRotate,h.mixX=t.mixX,h.mixY=t.mixY,h.mixScaleX=t.mixScaleX,h.mixScaleY=t.mixScaleY,void(h.mixShearY=t.mixShearY);case a.first:h.mixRotate+=(t.mixRotate-h.mixRotate)*r,h.mixX+=(t.mixX-h.mixX)*r,h.mixY+=(t.mixY-h.mixY)*r,h.mixScaleX+=(t.mixScaleX-h.mixScaleX)*r,h.mixScaleY+=(t.mixScaleY-h.mixScaleY)*r,h.mixShearY+=(t.mixShearY-h.mixShearY)*r}return}let c,d,u,m,f,g;const p=Yt.search(l,s,7),x=this.curves[p/7];switch(x){case 0:const t=l[p];c=l[p+1],d=l[p+2],u=l[p+3],m=l[p+4],f=l[p+5],g=l[p+6];const e=(s-t)/(l[p+7]-t);c+=(l[p+7+1]-c)*e,d+=(l[p+7+2]-d)*e,u+=(l[p+7+3]-u)*e,m+=(l[p+7+4]-m)*e,f+=(l[p+7+5]-f)*e,g+=(l[p+7+6]-g)*e;break;case 1:c=l[p+1],d=l[p+2],u=l[p+3],m=l[p+4],f=l[p+5],g=l[p+6];break;default:c=this.getBezierValue(s,p,1,x-2),d=this.getBezierValue(s,p,2,x+18-2),u=this.getBezierValue(s,p,3,x+36-2),m=this.getBezierValue(s,p,4,x+54-2),f=this.getBezierValue(s,p,5,x+72-2),g=this.getBezierValue(s,p,6,x+90-2)}if(i==a.setup){const t=h.data;h.mixRotate=t.mixRotate+(c-t.mixRotate)*r,h.mixX=t.mixX+(d-t.mixX)*r,h.mixY=t.mixY+(u-t.mixY)*r,h.mixScaleX=t.mixScaleX+(m-t.mixScaleX)*r,h.mixScaleY=t.mixScaleY+(f-t.mixScaleY)*r,h.mixShearY=t.mixShearY+(g-t.mixShearY)*r}
1else h.mixRotate+=(c-h.mixRotate)*r,h.mixX+=(d-h.mixX)*r,h.mixY+=(u-h.mixY)*r,h.mixScaleX+=(m-h.mixScaleX)*r,h.mixScaleY+=(f-h.mixScaleY)*r,h.mixShearY+=(g-h.mixShearY)*r}}class se extends Tt{constructor(t,e,s){super(t,e,`${Mt}|${s}`),this.pathConstraintIndex=0,this.pathConstraintIndex=s}apply(t,e,s,n,r,i,o){const h=t.pathConstraints[this.pathConstraintIndex];if(!h.active)return;if(s<this.frames[0]){switch(i){case a.setup:return void(h.position=h.data.position);case a.first:h.position+=(h.data.position-h.position)*r}return}const l=this.getCurveValue(s);i==a.setup?h.position=h.data.position+(l-h.data.position)*r:h.position+=(l-h.position)*r}}class ne extends Tt{constructor(t,e,s){super(t,e,`${vt}|${s}`),this.pathConstraintIndex=0,this.pathConstraintIndex=s}apply(t,e,s,n,r,i,o){const h=t.pathConstraints[this.pathConstraintIndex];if(!h.active)return;if(s<this.frames[0]){switch(i){case a.setup:return void(h.spacing=h.data.spacing);case a.first:h.spacing+=(h.data.spacing-h.spacing)*r}return}const l=this.getCurveValue(s);i==a.setup?h.spacing=h.data.spacing+(l-h.data.spacing)*r:h.spacing+=(l-h.spacing)*r}}class re extends Et{constructor(t,e,s){super(t,e,[`${Ct}|${s}`]),this.pathConstraintIndex=0,this.pathConstraintIndex=s}getFrameEntries(){return 4}setFrame(t,e,s,n,r){const a=this.frames;a[t<<=2]=e,a[t+1]=s,a[t+2]=n,a[t+3]=r}apply(t,e,s,n,r,i,o){const h=t.pathConstraints[this.pathConstraintIndex];if(!h.active)return;const l=this.frames;if(s<l[0]){switch(i){case a.setup:return h.mixRotate=h.data.mixRotate,h.mixX=h.data.mixX,void(h.mixY=h.data.mixY);case a.first:h.mixRotate+=(h.data.mixRotate-h.mixRotate)*r,h.mixX+=(h.data.mixX-h.mixX)*r,h.mixY+=(h.data.mixY-h.mixY)*r}return}let c,d,u;const m=Yt.search(l,s,4),f=this.curves[m>>2];switch(f){case 0:const t=l[m];c=l[m+1],d=l[m+2],u=l[m+3];const e=(s-t)/(l[m+4]-t);c+=(l[m+4+1]-c)*e,d+=(l[m+4+2]-d)*e,u+=(l[m+4+3]-u)*e;break;case 1:c=l[m+1],d=l[m+2],u=l[m+3];break;default:c=this.getBezierValue(s,m,1,f-2),d=this.getBezierValue(s,m,2,f+18-2),u=this.getBezierValue(s,m,3,f+36-2)}if(i==a.setup){const t=h.data;h.mixRotate=t.mixRotate+(c-t.mixRotate)*r,h.mixX=t.mixX+(d-t.mixX)*r,h.mixY=t.mixY+(u-t.mixY)*r}else h.mixRotate+=(c-h.mixRotate)*r,h.mixX+=(d-h.mixX)*r,h.mixY+=(u-h.mixY)*r}}const ae=class extends Yt{constructor(t,e,s){super(t,[`${Ft}|${e}|${s.sequence.id}`]),this.slotIndex=e,this.attachment=s}getFrameEntries(){return ae.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,e,s,n,r){const a=this.frames;a[t*=ae.ENTRIES]=e,a[t+ae.MODE]=s|n<<4,a[t+ae.DELAY]=r}apply(t,e,s,n,r,i,o){const h=t.slots[this.slotIndex];if(!h.bone.active)return;const l=h.attachment,c=this.attachment;if(!(l==c||l instanceof K&&l.timelineAttachment==c))return;const d=this.frames;if(s<d[0])return void(i!=a.setup&&i!=a.first||(h.sequenceIndex=-1));const u=Yt.search(d,s,ae.ENTRIES),m=d[u],f=d[u+ae.MODE],g=d[u+ae.DELAY];if(!this.attachment.sequence)return;let p=f>>4;const x=this.attachment.sequence.regions.length,w=ot[15&f];if(w!=it.hold)switch(p+=(s-m)/g+1e-5|0,w){case it.once:p=Math.min(x-1,p);break;case it.loop:p%=x;break;case it.pingpong:{const t=(x<<1)-2;p=0==t?0:p%t,p>=x&&(p=t-p);break}case it.onceReverse:p=Math.max(x-1-p,0);break;case it.loopReverse:p=x-1-p%x;break;case it.pingpongReverse:{const t=(x<<1)-2;p=0==t?0:(p+x-1)%t,p>=x&&(p=t-p)}}h.sequenceIndex=p}};let ie=ae;ie.ENTRIES=3,ie.MODE=1,ie.DELAY=2;const oe=class{constructor(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new de(this),this.propertyIDs=new y,this.animationsChanged=!1,this.trackEntryPool=new C((()=>new ce)),this.data=t}static emptyAnimation(){return oe._emptyAnimation}update(t){t*=this.timeScale;const e=this.tracks;for(let s=0,n=e.length;s<n;s++){const n=e[s];if(!n)continue;n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast;let r=t*n.timeScale;if(n.delay>0){if(n.delay-=r,n.delay>0)continue;r=-n.delay,n.delay=0}let a=n.next;if(a){const e=n.trackLast-a.delay;if(e>=0){for(a.delay=0,a.trackTime+=0==n.timeScale?0:(e/n.timeScale+t)*a.timeScale,n.trackTime+=r,this.setCurrent(s,a,!0);a.mixingFrom;)a.mixTime+=t,a=a.mixingFrom;continue}}else if(n.trackLast>=n.trackEnd&&!n.mixingFrom){e[s]=null,this.queue.end(n),this.clearNext(n);continue}if(n.mixingFrom&&this.updateMixingFrom(n,t)){let t=n.mixingFrom;for(n.mixingFrom=null,t&&(t.mixingTo=null);t;)this.queue.end(t),t=t.mixingFrom}n.trackTime+=r}this.queue.drain()}updateMixingFrom(t,e){const s=t.mixingFrom;if(!s)return!0;const n=this.updateMixingFrom(s,e);return s.animationLast=s.nextAnimationLast,s.trackLast=s.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=s.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=s.mixingFrom,s.mixingFrom&&(s.mixingFrom.mixingTo=t),t.interruptAlpha=s.interruptAlpha,this.queue.end(s)),n):(s.trackTime+=e*s.timeScale,t.mixTime+=e,!1)}apply(t){if(!t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();const e=this.events,s=this.tracks;let n=!1;for(let r=0,o=s.length;r<o;r++){const o=s[r];if(!o||o.delay>0)continue;n=!0;const h=0==r?a.first:o.mixBlend;
1let l=o.alpha;o.mixingFrom?l*=this.applyMixingFrom(o,t,h):o.trackTime>=o.trackEnd&&!o.next&&(l=0);const c=o.animationLast,d=o.getAnimationTime();let u=d,m=e;o.reverse&&(u=o.animation.duration-u,m=null);const f=o.animation.timelines,g=f.length;if(0==r&&1==l||h==a.add)for(let e=0;e<g;e++){v.webkit602BugfixHelper(l,h);const s=f[e];s instanceof jt?this.applyAttachmentTimeline(s,t,u,h,!0):s.apply(t,c,u,m,l,h,i.mixIn)}else{const e=o.timelineMode,s=o.shortestRotation,n=!s&&o.timelinesRotation.length!=g<<1;n&&(o.timelinesRotation.length=g<<1);for(let r=0;r<g;r++){const d=f[r],g=e[r]==me?h:a.setup;!s&&d instanceof Xt?this.applyRotateTimeline(d,t,u,l,g,o.timelinesRotation,r<<1,n):d instanceof jt?this.applyAttachmentTimeline(d,t,u,h,!0):(v.webkit602BugfixHelper(l,h),d.apply(t,c,u,m,l,g,i.mixIn))}}this.queueEvents(o,d),e.length=0,o.nextAnimationLast=d,o.nextTrackLast=o.trackTime}const r=this.unkeyedState+we,o=t.slots;for(let e=0,s=t.slots.length;e<s;e++){const s=o[e];if(s.attachmentState==r){const e=s.data.attachmentName;s.setAttachment(e?t.getAttachment(s.data.index,e):null)}}return this.unkeyedState+=2,this.queue.drain(),n}applyMixingFrom(t,e,s){const n=t.mixingFrom;n.mixingFrom&&this.applyMixingFrom(n,e,s);let r=0;0==t.mixDuration?(r=1,s==a.first&&(s=a.setup)):(r=t.mixTime/t.mixDuration,r>1&&(r=1),s!=a.first&&(s=n.mixBlend));const o=r<n.attachmentThreshold,h=r<n.drawOrderThreshold,l=n.animation.timelines,c=l.length,d=n.alpha*t.interruptAlpha,u=d*(1-r),m=n.animationLast,f=n.getAnimationTime();let g=f,p=null;if(n.reverse?g=n.animation.duration-g:r<n.eventThreshold&&(p=this.events),s==a.add)for(let t=0;t<c;t++)l[t].apply(e,m,g,p,u,s,i.mixOut);else{const t=n.timelineMode,r=n.timelineHoldMix,f=n.shortestRotation,x=!f&&n.timelinesRotation.length!=c<<1;x&&(n.timelinesRotation.length=c<<1),n.totalAlpha=0;for(let w=0;w<c;w++){const c=l[w];let b,y=i.mixOut,k=0;switch(t[w]){case me:if(!h&&c instanceof Qt)continue;b=s,k=u;break;case fe:b=a.setup,k=u;break;case ge:b=s,k=d;break;case pe:b=a.setup,k=d;break;default:b=a.setup;const t=r[w];k=d*Math.max(0,1-t.mixTime/t.mixDuration)}n.totalAlpha+=k,!f&&c instanceof Xt?this.applyRotateTimeline(c,e,g,k,b,n.timelinesRotation,w<<1,x):c instanceof jt?this.applyAttachmentTimeline(c,e,g,b,o):(v.webkit602BugfixHelper(k,s),h&&c instanceof Qt&&b==a.setup&&(y=i.mixIn),c.apply(e,m,g,p,k,b,y))}}return t.mixDuration>0&&this.queueEvents(n,f),this.events.length=0,n.nextAnimationLast=f,n.nextTrackLast=n.trackTime,r}applyAttachmentTimeline(t,e,s,n,r){const i=e.slots[t.slotIndex];i.bone.active&&(s<t.frames[0]?n!=a.setup&&n!=a.first||this.setAttachment(e,i,i.data.attachmentName,r):this.setAttachment(e,i,t.attachmentNames[Yt.search1(t.frames,s)],r),i.attachmentState<=this.unkeyedState&&(i.attachmentState=this.unkeyedState+we))}setAttachment(t,e,s,n){e.setAttachment(s?t.getAttachment(e.data.index,s):null),n&&(e.attachmentState=this.unkeyedState+be)}applyRotateTimeline(t,e,s,n,r,o,h,l){if(l&&(o[h]=0),1==n)return void t.apply(e,0,s,null,1,r,i.mixIn);const c=e.bones[t.boneIndex];if(!c.active)return;let d=0,u=0;if(s<t.frames[0])switch(r){case a.setup:c.rotation=c.data.rotation;default:return;case a.first:d=c.rotation,u=c.data.rotation}else d=r==a.setup?c.data.rotation:c.rotation,u=c.data.rotation+t.getCurveValue(s);let m=0,f=u-d;if(f-=360*(16384-(16384.499999999996-f/360|0)),0==f)m=o[h];else{let t=0,e=0;l?(t=0,e=f):(t=o[h],e=o[h+1]);const s=f>0;let n=t>=0;I.signum(e)!=I.signum(f)&&Math.abs(e)<=90&&(Math.abs(t)>180&&(t+=360*I.signum(t)),n=s),m=f+t-t%360,n!=s&&(m+=360*I.signum(t)),o[h]=m}o[h+1]=f,c.rotation=d+m*n}queueEvents(t,e){const s=t.animationStart,n=t.animationEnd,r=n-s,a=t.trackLast%r,i=this.events;let o=0;const h=i.length;for(;o<h;o++){const e=i[o];if(e.time<a)break;e.time>n||this.queue.event(t,e)}let l=!1;for(l=t.loop?0==r||a>t.trackTime%r:e>=n&&t.animationLast<n,l&&this.queue.complete(t);o<h;o++){const e=i[o];e.time<s||this.queue.event(t,e)}}clearTracks(){const t=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let t=0,e=this.tracks.length;t<e;t++)this.clearTrack(t);this.tracks.length=0,this.queue.drainDisabled=t,this.queue.drain()}clearTrack(t){if(t>=this.tracks.length)return;const e=this.tracks[t];if(!e)return;this.queue.end(e),this.clearNext(e);let s=e;for(;;){const t=s.mixingFrom;if(!t)break;this.queue.end(t),s.mixingFrom=null,s.mixingTo=null,s=t}this.tracks[e.trackIndex]=null,this.queue.drain()}setCurrent(t,e,s){const n=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,n&&(s&&this.queue.interrupt(n),e.mixingFrom=n,n.mixingTo=e,e.mixTime=0,n.mixingFrom&&n.mixDuration>0&&(e.interruptAlpha*=Math.min(1,n.mixTime/n.mixDuration)),n.timelinesRotation.length=0),this.queue.start(e)}setAnimation(t,e,s=!1){const n=this.data.skeletonData.findAnimation(e);if(!n)throw new Error(`Animation not found: ${e}`);return this.setAnimationWith(t,n,s)}setAnimationWith(t,e,s=!1){if(!e)throw new Error("animation cannot be null.");let n=!0,r=this.expandToIndex(t);r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.clearNext(r),r=r.mixingFrom,n=!1):this.clearNext(r));const a=this.trackEntry(t,e,s,r);return this.setCurrent(t,a,n),this.queue.drain(),a}addAnimation(t,e,s=!1,n=0){const r=this.data.skeletonData.findAnimation(e);if(!r)throw new Error(`Animation not found: ${e}`);return this.addAnimationWith(t,r,s,n)}addAnimationWith(t,e,s=!1,n=0){if(!e)throw new Error("animation cannot be null.");let r=this.expandToIndex(t);if(r)for(;r.next;)r=r.next;const a=this.trackEntry(t,e,s,r);return r?(r.next=a,a.previous=r,n<=0&&(n+=r.getTrackComplete()-a.mixDuration)):(this.setCurrent(t,a,!0),this.queue.drain()),a.delay=n,a}setEmptyAnimation(t,e=0){const s=this.setAnimationWith(t,oe.emptyAnimation(),!1);
1return s.mixDuration=e,s.trackEnd=e,s}addEmptyAnimation(t,e=0,s=0){const n=this.addAnimationWith(t,oe.emptyAnimation(),!1,s);return s<=0&&(n.delay+=n.mixDuration-e),n.mixDuration=e,n.trackEnd=e,n}setEmptyAnimations(t=0){const e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let e=0,s=this.tracks.length;e<s;e++){const s=this.tracks[e];s&&this.setEmptyAnimation(s.trackIndex,t)}this.queue.drainDisabled=e,this.queue.drain()}expandToIndex(t){return t<this.tracks.length?this.tracks[t]:(v.ensureArrayCapacity(this.tracks,t+1,null),this.tracks.length=t+1,null)}trackEntry(t,e,s,n){const r=this.trackEntryPool.obtain();return r.reset(),r.trackIndex=t,r.animation=e,r.loop=s,r.holdPrevious=!1,r.reverse=!1,r.shortestRotation=!1,r.eventThreshold=0,r.attachmentThreshold=0,r.drawOrderThreshold=0,r.animationStart=0,r.animationEnd=e.duration,r.animationLast=-1,r.nextAnimationLast=-1,r.delay=0,r.trackTime=0,r.trackLast=-1,r.nextTrackLast=-1,r.trackEnd=Number.MAX_VALUE,r.timeScale=1,r.alpha=1,r.mixTime=0,r.mixDuration=n?this.data.getMix(n.animation,e):0,r.interruptAlpha=1,r.totalAlpha=0,r.mixBlend=a.replace,r}clearNext(t){let e=t.next;for(;e;)this.queue.dispose(e),e=e.next;t.next=null}_animationsChanged(){this.animationsChanged=!1,this.propertyIDs.clear();const t=this.tracks;for(let e=0,s=t.length;e<s;e++){let s=t[e];if(s){for(;s.mixingFrom;)s=s.mixingFrom;do{s.mixingTo&&s.mixBlend==a.add||this.computeHold(s),s=s.mixingTo}while(s)}}}computeHold(t){const e=t.mixingTo,s=t.animation.timelines,n=t.animation.timelines.length,r=t.timelineMode;r.length=n;const a=t.timelineHoldMix;a.length=0;const i=this.propertyIDs;if(e&&e.holdPrevious)for(let t=0;t<n;t++)r[t]=i.addAll(s[t].getPropertyIds())?pe:ge;else t:for(let o=0;o<n;o++){const n=s[o],h=n.getPropertyIds();if(i.addAll(h))if(!e||n instanceof jt||n instanceof Qt||n instanceof Zt||!e.animation.hasTimeline(h))r[o]=fe;else{for(let s=e.mixingTo;s;s=s.mixingTo)if(!s.animation.hasTimeline(h)){if(t.mixDuration>0){r[o]=xe,a[o]=s;continue t}break}r[o]=pe}else r[o]=me}}getCurrent(t){return t>=this.tracks.length?null:this.tracks[t]}addListener(t){if(!t)throw new Error("listener cannot be null.");this.listeners.push(t)}removeListener(t){const e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}setAnimationByName(t,e,s){oe.deprecatedWarning1||(oe.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(t,e,s)}addAnimationByName(t,e,s,n){oe.deprecatedWarning2||(oe.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(t,e,s,n)}hasAnimation(t){return null!==this.data.skeletonData.findAnimation(t)}hasAnimationByName(t){return oe.deprecatedWarning3||(oe.deprecatedWarning3=!0,console.warn("Spine Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on.")),this.hasAnimation(t)}};let he=oe;he._emptyAnimation=new ht("<empty>",[],0),he.deprecatedWarning1=!1,he.deprecatedWarning2=!1,he.deprecatedWarning3=!1;const le=class{constructor(){this.animation=null,this.previous=null,this.next=null,this.mixingFrom=null,this.mixingTo=null,this.listener=null,this.trackIndex=0,this.loop=!1,this.holdPrevious=!1,this.reverse=!1,this.shortestRotation=!1,this.eventThreshold=0,this.attachmentThreshold=0,this.drawOrderThreshold=0,this.animationStart=0,this.animationEnd=0,this.animationLast=0,this.nextAnimationLast=0,this.delay=0,this.trackTime=0,this.trackLast=0,this.nextTrackLast=0,this.trackEnd=0,this.timeScale=0,this.alpha=0,this.mixTime=0,this.mixDuration=0,this.interruptAlpha=0,this.totalAlpha=0,this.mixBlend=a.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}reset(){this.next=null,this.previous=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0}getAnimationTime(){if(this.loop){const t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)}setAnimationLast(t){this.animationLast=t,this.nextAnimationLast=t}isComplete(){return this.trackTime>=this.animationEnd-this.animationStart}resetRotationDirections(){this.timelinesRotation.length=0}getTrackComplete(){const t=this.animationEnd-this.animationStart;if(0!=t){if(this.loop)return t*(1+(this.trackTime/t|0));if(this.trackTime<t)return t}return this.trackTime}get time(){return le.deprecatedWarning1||(le.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime}set time(t){le.deprecatedWarning1||(le.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime=t}get endTime(){return le.deprecatedWarning2||(le.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime}set endTime(t){le.deprecatedWarning2||(le.deprecatedWarning2=!0,console.warn("Spine Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime=t}loopsCount(){return Math.floor(this.trackTime/this.trackEnd)}};let ce=le;ce.deprecatedWarning1=!1,ce.deprecatedWarning2=!1;class de{constructor(t){this.objects=[],this.drainDisabled=!1,this.animState=t}start(t){this.objects.push(ue.start),this.objects.push(t),this.animState.animationsChanged=!0}interrupt(t){this.objects.push(ue.interrupt),this.objects.push(t)}end(t){this.objects.push(ue.end),this.objects.push(t),this.animState.animationsChanged=!0}dispose(t){this.objects.push(ue.dispose),this.objects.push(t)}complete(t){this.objects.push(ue.complete),this.objects.push(t)}event(t,e){this.objects.push(ue.event),this.objects.push(t),this.objects.push(e)}drain(){if(this.drainDisabled)return;this.drainDisabled=!0;const t=this.objects,e=this.animState.listeners;for(let s=0;s<t.length;s+=2){const n=t[s],r=t[s+1];switch(n){case ue.start:r.listener&&r.listener.start&&r.listener.start(r);for(let t=0;t<e.length;t++){const s=e[t];s.start&&s.start(r)}break;case ue.interrupt:r.listener&&r.listener.interrupt&&r.listener.interrupt(r);for(let t=0;t<e.length;t++){const s=e[t];s.interrupt&&s.interrupt(r)}break;case ue.end:r.listener&&r.listener.end&&r.listener.end(r);for(let t=0;t<e.length;t++){const s=e[t];s.end&&s.end(r)}case ue.dispose:r.listener&&r.listener.dispose&&r.listener.dispose(r);for(let t=0;t<e.length;t++){const s=e[t];s.dispose&&s.dispose(r)}this.animState.trackEntryPool.free(r);break;case ue.complete:r.listener&&r.listener.complete&&r.listener.complete(r);for(let t=0;t<e.length;t++){const s=e[t];s.complete&&s.complete(r)}break;case ue.event:const n=t[2+s++];
1r.listener&&r.listener.event&&r.listener.event(r,n);for(let t=0;t<e.length;t++){const s=e[t];s.event&&s.event(r,n)}}}this.clear(),this.drainDisabled=!1}clear(){this.objects.length=0}}var ue=(t=>(t[t.start=0]="start",t[t.interrupt=1]="interrupt",t[t.end=2]="end",t[t.dispose=3]="dispose",t[t.complete=4]="complete",t[t.event=5]="event",t))(ue||{});const me=0,fe=1,ge=2,pe=3,xe=4,we=1,be=2;class ye{constructor(t){this.atlas=t}loadSequence(t,e,s){const n=s.regions;for(let r=0,a=n.length;r<a;r++){const a=s.getPath(e,r),i=this.atlas.findRegion(a);if(null==i)throw new Error(`Region not found in atlas: ${a} (sequence: ${t})`);n[r]=i,n[r].renderObject=n[r]}}newRegionAttachment(t,e,s,n){const r=new nt(e,s);if(null!=n)this.loadSequence(e,s,n);else{const t=this.atlas.findRegion(s);if(!t)throw new Error(`Region not found in atlas: ${s} (region attachment: ${e})`);t.renderObject=t,r.region=t}return r}newMeshAttachment(t,e,s,n){const r=new Q(e,s);if(null!=n)this.loadSequence(e,s,n);else{const t=this.atlas.findRegion(s);if(!t)throw new Error(`Region not found in atlas: ${s} (mesh attachment: ${e})`);t.renderObject=t,r.region=t}return r}newBoundingBoxAttachment(t,e){return new Z(e)}newPathAttachment(t,e){return new tt(e)}newPointAttachment(t,e){return new et(e)}newClippingAttachment(t,e){return new J(e)}}class ke{constructor(t,e,s){if(this.matrix=new c.y3,this.parent=null,this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.sorted=!1,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=s,this.setToSetupPose()}get worldX(){return this.matrix.tx}get worldY(){return this.matrix.ty}isActive(){return this.active}update(){this.updateWorldTransformWith(this.ax,this.ay,this.arotation,this.ascaleX,this.ascaleY,this.ashearX,this.ashearY)}updateWorldTransform(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)}updateWorldTransformWith(t,e,s,n,r,a,i){this.ax=t,this.ay=e,this.arotation=s,this.ascaleX=n,this.ascaleY=r,this.ashearX=a,this.ashearY=i;const o=this.parent,h=this.matrix,c=this.skeleton.scaleX,d=Y?-this.skeleton.scaleY:this.skeleton.scaleY;if(!o){const o=this.skeleton,l=s+90+i;return h.a=I.cosDeg(s+a)*n*c,h.c=I.cosDeg(l)*r*c,h.b=I.sinDeg(s+a)*n*d,h.d=I.sinDeg(l)*r*d,h.tx=t*c+o.x,void(h.ty=e*d+o.y)}let u=o.matrix.a,m=o.matrix.c,f=o.matrix.b,g=o.matrix.d;switch(h.tx=u*t+m*e+o.matrix.tx,h.ty=f*t+g*e+o.matrix.ty,this.data.transformMode){case l.Normal:{const t=s+90+i,e=I.cosDeg(s+a)*n,o=I.cosDeg(t)*r,l=I.sinDeg(s+a)*n,c=I.sinDeg(t)*r;return h.a=u*e+m*l,h.c=u*o+m*c,h.b=f*e+g*l,void(h.d=f*o+g*c)}case l.OnlyTranslation:{const t=s+90+i;h.a=I.cosDeg(s+a)*n,h.c=I.cosDeg(t)*r,h.b=I.sinDeg(s+a)*n,h.d=I.sinDeg(t)*r;break}case l.NoRotationOrReflection:{let t=u*u+f*f,e=0;t>1e-4?(t=Math.abs(u*g-m*f)/t,u/=c,f/=d,m=f*t,g=u*t,e=Math.atan2(f,u)*I.radDeg):(u=0,f=0,e=90-Math.atan2(g,m)*I.radDeg);const o=s+a-e,l=s+i-e+90,p=I.cosDeg(o)*n,x=I.cosDeg(l)*r,w=I.sinDeg(o)*n,b=I.sinDeg(l)*r;h.a=u*p-m*w,h.c=u*x-m*b,h.b=f*p+g*w,h.d=f*x+g*b;break}case l.NoScale:case l.NoScaleOrReflection:{const t=I.cosDeg(s),e=I.sinDeg(s);let o=(u*t+m*e)/c,p=(f*t+g*e)/d,x=Math.sqrt(o*o+p*p);x>1e-5&&(x=1/x),o*=x,p*=x,x=Math.sqrt(o*o+p*p),this.data.transformMode==l.NoScale&&u*g-m*f<0!=(c<0!=d<0)&&(x=-x);const w=Math.PI/2+Math.atan2(p,o),b=Math.cos(w)*x,y=Math.sin(w)*x,k=I.cosDeg(a)*n,S=I.cosDeg(90+i)*r,A=I.sinDeg(a)*n,M=I.sinDeg(90+i)*r;h.a=o*k+b*A,h.c=o*S+b*M,h.b=p*k+y*A,h.d=p*S+y*M;break}}h.a*=c,h.c*=c,h.b*=d,h.d*=d}setToSetupPose(){const t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY}getWorldRotationX(){return Math.atan2(this.matrix.b,this.matrix.a)*I.radDeg}getWorldRotationY(){return Math.atan2(this.matrix.d,this.matrix.c)*I.radDeg}getWorldScaleX(){const t=this.matrix;return Math.sqrt(t.a*t.a+t.b*t.b)}getWorldScaleY(){const t=this.matrix;return Math.sqrt(t.c*t.c+t.d*t.d)}updateAppliedTransform(){const t=this.parent,e=this.matrix;if(!t)return this.ax=e.tx-this.skeleton.x,this.ay=e.ty-this.skeleton.y,this.arotation=Math.atan2(e.b,e.a)*I.radDeg,this.ascaleX=Math.sqrt(e.a*e.a+e.b*e.b),this.ascaleY=Math.sqrt(e.c*e.c+e.d*e.d),this.ashearX=0,void(this.ashearY=Math.atan2(e.a*e.c+e.b*e.d,e.a*e.d-e.b*e.c)*I.radDeg);const s=t.matrix,n=1/(s.a*s.d-s.b*s.c),r=e.tx-s.tx,a=e.ty-s.ty;this.ax=r*s.d*n-a*s.c*n,this.ay=a*s.a*n-r*s.b*n;const i=n*s.d,o=n*s.a,h=n*s.c,l=n*s.b,c=i*e.a-h*e.b,d=i*e.c-h*e.d,u=o*e.b-l*e.a,m=o*e.d-l*e.c;if(this.ashearX=0,this.ascaleX=Math.sqrt(c*c+u*u),this.ascaleX>1e-4){const t=c*m-d*u;this.ascaleY=t/this.ascaleX,this.ashearY=Math.atan2(c*d+u*m,t)*I.radDeg,this.arotation=Math.atan2(u,c)*I.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(d*d+m*m),this.ashearY=0,this.arotation=90-Math.atan2(m,d)*I.radDeg}worldToLocal(t){const e=this.matrix,s=e.a,n=e.c,r=e.b,a=e.d,i=1/(s*a-n*r),o=t.x-e.tx,h=t.y-e.ty;
vendor: 5,150 bytes, line 1
1return t.x=o*a*i-h*n*i,t.y=h*s*i-o*r*i,t}localToWorld(t){const e=this.matrix,s=t.x,n=t.y;return t.x=s*e.a+n*e.c+e.tx,t.y=s*e.b+n*e.d+e.ty,t}worldToLocalRotation(t){const e=I.sinDeg(t),s=I.cosDeg(t),n=this.matrix;return Math.atan2(n.a*e-n.b*s,n.d*s-n.c*e)*I.radDeg}localToWorldRotation(t){t-=this.rotation-this.shearX;const e=I.sinDeg(t),s=I.cosDeg(t),n=this.matrix;return Math.atan2(s*n.b+e*n.d,s*n.a+e*n.c)*I.radDeg}rotateWorld(t){const e=this.matrix,s=e.a,n=e.c,r=e.b,a=e.d,i=I.cosDeg(t),o=I.sinDeg(t);e.a=i*s-o*r,e.c=i*n-o*a,e.b=o*s+i*r,e.d=o*n+i*a}}class Se{constructor(t,e,s){if(this.index=0,this.parent=null,this.length=0,this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=l.Normal,this.skinRequired=!1,this.color=new S,t<0)throw new Error("index must be >= 0.");if(!e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=s}}class Ae{constructor(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(let s=0;s<t.bones.length;s++){const n=e.findBone(t.bones[s].name);if(!n)throw new Error(`Couldn't find bone ${t.bones[s].name}`);this.bones.push(n)}const s=e.findBone(t.target.name);if(!s)throw new Error(`Couldn't find bone ${t.target.name}`);this.target=s}isActive(){return this.active}update(){if(0==this.mix)return;const t=this.target,e=this.bones;switch(e.length){case 1:this.apply1(e[0],t.worldX,t.worldY,this.compress,this.stretch,this.data.uniform,this.mix);break;case 2:this.apply2(e[0],e[1],t.worldX,t.worldY,this.bendDirection,this.stretch,this.data.uniform,this.softness,this.mix)}}apply1(t,e,s,n,r,a,i){const o=t.parent.matrix;if(!o)throw new Error("IK bone must have parent.");const h=o.a;let c=o.c;const d=o.b;let u=o.d,m=-t.ashearX-t.arotation,f=0,g=0;const p=t.skeleton.scaleX,x=Y?-t.skeleton.scaleY:t.skeleton.scaleY;switch(t.data.transformMode){case l.OnlyTranslation:f=(e-t.worldX)*I.signum(p),g=(s-t.worldY)*I.signum(x);break;case l.NoRotationOrReflection:const n=Math.abs(h*u-c*d)/(h*h+d*d),r=h/p,a=d/x;c=-a*n*p,u=r*n*x,m+=Math.atan2(a,r)*I.radDeg;default:const i=e-o.tx,w=s-o.ty,b=h*u-c*d;f=(i*u-w*c)/b-t.ax,g=(w*h-i*d)/b-t.ay}m+=Math.atan2(g,f)*I.radDeg,t.ascaleX<0&&(m+=180),m>180?m-=360:m<-180&&(m+=360);let w=t.ascaleX,b=t.ascaleY;if(n||r){switch(t.data.transformMode){case l.NoScale:case l.NoScaleOrReflection:f=e-t.worldX,g=s-t.worldY}const o=t.data.length*w,h=Math.sqrt(f*f+g*g);if(n&&h<o||r&&h>o&&o>1e-4){const t=(h/o-1)*i+1;w*=t,a&&(b*=t)}}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+m*i,w,b,t.ashearX,t.ashearY)}apply2(t,e,s,n,r,a,i,o,h){const l=t.ax,c=t.ay;let d=t.ascaleX,u=t.ascaleY,m=d,f=u,g=e.ascaleX;const p=t.matrix;let x=0,w=0,b=0;d<0?(d=-d,x=180,b=-1):(x=0,b=1),u<0&&(u=-u,b=-b),g<0?(g=-g,w=180):w=0;const y=e.ax;let k=0,S=0,A=0,M=p.a,v=p.c,C=p.b,F=p.d;const Y=Math.abs(d-u)<=1e-4;!Y||a?(k=0,S=M*y+p.tx,A=C*y+p.ty):(k=e.ay,S=M*y+v*k+p.tx,A=C*y+F*k+p.ty);const E=t.parent.matrix;if(!E)throw new Error("IK parent must itself have a parent.");M=E.a,v=E.c,C=E.b,F=E.d;const T=1/(M*F-v*C);let R=S-E.tx,X=A-E.ty;const B=(R*F-X*v)*T-l,P=(X*M-R*C)*T-c,D=Math.sqrt(B*B+P*P);let N,L,V=e.data.length*g;if(D<1e-4)return this.apply1(t,s,n,!1,a,!1,h),void e.updateWorldTransformWith(y,k,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);R=s-E.tx,X=n-E.ty;let $=(R*F-X*v)*T-l,W=(X*M-R*C)*T-c,q=$*$+W*W;if(0!=o){o*=d*(g+1)*.5;const t=Math.sqrt(q),e=t-D-V*d+o;if(e>0){let s=Math.min(1,e/(2*o))-1;s=(e-o*(1-s*s))/t,$-=s*$,W-=s*W,q=$*$+W*W}}t:if(Y){V*=d;let t=(q-D*D-V*V)/(2*D*V);t<-1?(t=-1,L=Math.PI*r):t>1?(t=1,L=0,a&&(M=(Math.sqrt(q)/(D+V)-1)*h+1,m*=M,i&&(f*=M))):L=Math.acos(t)*r,M=D+V*t,v=V*Math.sin(L),N=Math.atan2(W*M-$*v,$*M+W*v)}else{M=d*V,v=u*V;const t=M*M,e=v*v,s=Math.atan2(W,$);C=e*D*D+t*q-t*e;const n=-2*e*D,a=e-t;if(F=n*n-4*a*C,F>=0){let t=Math.sqrt(F);n<0&&(t=-t),t=.5*-(n+t);const e=t/a,i=C/t,o=Math.abs(e)<Math.abs(i)?e:i;if(o*o<=q){X=Math.sqrt(q-o*o)*r,N=s-Math.atan2(X,o),L=Math.atan2(X/u,(o-D)/d);break t}}let i=I.PI,o=D-M,h=o*o,l=0,c=0,m=D+M,f=m*m,g=0;C=-M*D/(t-e),C>=-1&&C<=1&&(C=Math.acos(C),R=M*Math.cos(C)+D,X=v*Math.sin(C),F=R*R+X*X,F<h&&(i=C,h=F,o=R,l=X),F>f&&(c=C,f=F,m=R,g=X)),q<=.5*(h+f)?(N=s-Math.atan2(l*r,o),L=i*r):(N=s-Math.atan2(g*r,m),L=c*r)}const O=Math.atan2(k,y)*b;let U=t.arotation;N=(N-O)*I.radDeg+x-U,N>180?N-=360:N<-180&&(N+=360),t.updateWorldTransformWith(l,c,U+N*h,m,f,0,0),U=e.arotation,L=((L+O)*I.radDeg-e.ashearX)*b+w-U,L>180?L-=360:L<-180&&(L+=360),e.updateWorldTransformWith(y,k,U+L*h,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}}class Ie{constructor(t,e,s){this.name=t,this.order=e,this.skinRequired=s}}class Me extends Ie{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.positionMode=o.Fixed,this.spacingMode=ve.Fixed,this.rotateMode=h.Chain,this.offsetRotation=0,this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0}set target(t){this._target=t}
1get target(){if(this._target)return this._target;throw new Error("SlotData not set.")}}var ve=(t=>(t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional",t))(ve||{});const Ce=class{constructor(t,e){if(this.position=0,this.spacing=0,this.mixRotate=0,this.mixX=0,this.mixY=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(let s=0,n=t.bones.length;s<n;s++){const n=e.findBone(t.bones[s].name);if(!n)throw new Error(`Couldn't find bone ${t.bones[s].name}.`);this.bones.push(n)}const s=e.findSlot(t.target.name);if(!s)throw new Error(`Couldn't find target bone ${t.target.name}`);this.target=s,this.position=t.position,this.spacing=t.spacing,this.mixRotate=t.mixRotate,this.mixX=t.mixX,this.mixY=t.mixY}isActive(){return this.active}update(){const t=this.target.getAttachment();if(!(t instanceof tt))return;const e=this.mixRotate,s=this.mixX,n=this.mixY;if(0==e&&0==s&&0==n)return;const r=this.data,a=r.rotateMode==h.Tangent,i=r.rotateMode==h.ChainScale,o=this.bones,l=o.length,c=a?l:l+1,d=v.setArraySize(this.spaces,c),u=i?this.lengths=v.setArraySize(this.lengths,l):[],m=this.spacing;switch(r.spacingMode){case ve.Percent:if(i)for(let t=0,e=c-1;t<e;t++){const e=o[t],s=e.data.length;if(s<Ce.epsilon)u[t]=0;else{const n=s*e.matrix.a,r=s*e.matrix.b;u[t]=Math.sqrt(n*n+r*r)}}v.arrayFill(d,1,c,m);break;case ve.Proportional:let t=0;for(let e=0,s=c-1;e<s;){const s=o[e],n=s.data.length;if(n<Ce.epsilon)i&&(u[e]=0),d[++e]=m;else{const r=n*s.matrix.a,a=n*s.matrix.b,o=Math.sqrt(r*r+a*a);i&&(u[e]=o),d[++e]=o,t+=o}}if(t>0){t=c/t*m;for(let e=1;e<c;e++)d[e]*=t}break;default:const e=r.spacingMode==ve.Length;for(let t=0,s=c-1;t<s;){const s=o[t],n=s.data.length;if(n<Ce.epsilon)i&&(u[t]=0),d[++t]=m;else{const r=n*s.matrix.a,a=n*s.matrix.b,o=Math.sqrt(r*r+a*a);i&&(u[t]=o),d[++t]=(e?n+m:m)*o/n}}}const f=this.computeWorldPositions(t,c,a);let g=f[0],p=f[1],x=r.offsetRotation,w=!1;if(0==x)w=r.rotateMode==h.Chain;else{w=!1;const t=this.target.bone.matrix;x*=t.a*t.d-t.b*t.c>0?I.degRad:-I.degRad}for(let t=0,r=3;t<l;t++,r+=3){const h=o[t],l=h.matrix;l.tx+=(g-l.tx)*s,l.ty+=(p-l.ty)*n;const c=f[r],m=f[r+1],b=c-g,y=m-p;if(i){const s=u[t];if(0!=s){const t=(Math.sqrt(b*b+y*y)/s-1)*e+1;l.a*=t,l.b*=t}}if(g=c,p=m,e>0){const s=l.a,n=l.c,i=l.b,o=l.d;let c=0,u=0,m=0;if(c=a?f[r-1]:0==d[t+1]?f[r+2]:Math.atan2(y,b),c-=Math.atan2(i,s),w){u=Math.cos(c),m=Math.sin(c);const t=h.data.length;g+=(t*(u*s-m*i)-b)*e,p+=(t*(m*s+u*i)-y)*e}else c+=x;c>I.PI?c-=I.PI2:c<-I.PI&&(c+=I.PI2),c*=e,u=Math.cos(c),m=Math.sin(c),l.a=u*s-m*i,l.c=u*n-m*o,l.b=m*s+u*i,l.d=m*n+u*o}h.updateAppliedTransform()}}computeWorldPositions(t,e,s){const n=this.target;let r=this.position;const a=this.spaces,i=v.setArraySize(this.positions,3*e+2);let h=this.world;const l=t.closed;let c=t.worldVerticesLength,d=c/6,u=Ce.NONE;if(!t.constantSpeed){const m=t.lengths;d-=l?1:2;const f=m[d];let g;switch(this.data.positionMode==o.Percent&&(r*=f),this.data.spacingMode){case ve.Percent:g=f;break;case ve.Proportional:g=f/e;break;default:g=1}h=v.setArraySize(this.world,8);for(let o=0,p=0,x=0;o<e;o++,p+=3){const e=a[o]*g;r+=e;let w=r;if(l)w%=f,w<0&&(w+=f),x=0;else{if(w<0){u!=Ce.BEFORE&&(u=Ce.BEFORE,t.computeWorldVertices(n,2,4,h,0,2)),this.addBeforePosition(w,h,0,i,p);continue}if(w>f){u!=Ce.AFTER&&(u=Ce.AFTER,t.computeWorldVertices(n,c-6,4,h,0,2)),this.addAfterPosition(w-f,h,0,i,p);continue}}for(;;x++){const t=m[x];if(!(w>t)){if(0==x)w/=t;else{const e=m[x-1];w=(w-e)/(t-e)}break}}x!=u&&(u=x,l&&x==d?(t.computeWorldVertices(n,c-4,4,h,0,2),t.computeWorldVertices(n,0,4,h,4,2)):t.computeWorldVertices(n,6*x+2,8,h,0,2)),this.addCurvePosition(w,h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],i,p,s||o>0&&0==e)}return i}l?(c+=2,h=v.setArraySize(this.world,c),t.computeWorldVertices(n,2,c-4,h,0,2),t.computeWorldVertices(n,0,2,h,c-4,2),h[c-2]=h[0],h[c-1]=h[1]):(d--,c-=4,h=v.setArraySize(this.world,c),t.computeWorldVertices(n,2,c,h,0,2));const m=v.setArraySize(this.curves,d);let f,g=0,p=h[0],x=h[1],w=0,b=0,y=0,k=0,S=0,A=0,I=0,M=0,C=0,F=0,Y=0,E=0,T=0,R=0;for(let t=0,e=2;t<d;t++,e+=6)w=h[e],b=h[e+1],y=h[e+2],k=h[e+3],S=h[e+4],A=h[e+5],I=.1875*(p-2*w+y),M=.1875*(x-2*b+k),C=.09375*(3*(w-y)-p+S),F=.09375*(3*(b-k)-x+A),Y=2*I+C,E=2*M+F,T=.75*(w-p)+I+.16666667*C,R=.75*(b-x)+M+.16666667*F,g+=Math.sqrt(T*T+R*R),T+=Y,R+=E,Y+=C,E+=F,g+=Math.sqrt(T*T+R*R),T+=Y,R+=E,g+=Math.sqrt(T*T+R*R),T+=Y+C,R+=E+F,g+=Math.sqrt(T*T+R*R),m[t]=g,p=S,x=A;switch(this.data.positionMode==o.Percent&&(r*=g),this.data.spacingMode){case ve.Percent:f=g;break;case ve.Proportional:f=g/e;break;default:f=1}const X=this.segments;let B=0;for(let t=0,n=0,o=0,d=0;t<e;t++,n+=3){const e=a[t]*f;r+=e;let v=r;if(l)v%=g,v<0&&(v+=g),o=0;else{if(v<0){this.addBeforePosition(v,h,0,i,n);continue}if(v>g){this.addAfterPosition(v-g,h,c-4,i,n);continue}}for(;;o++){const t=m[o];if(!(v>t)){if(0==o)v/=t;else{const e=m[o-1];v=(v-e)/(t-e)}break}}if(o!=u){u=o;let t=6*o;for(p=h[t],x=h[t+1],w=h[t+2],b=h[t+3],y=h[t+4],k=h[t+5],S=h[t+6],A=h[t+7],I=.03*(p-2*w+y),M=.03*(x-2*b+k),C=.006*(3*(w-y)-p+S),F=.006*(3*(b-k)-x+A),Y=2*I+C,E=2*M+F,T=.3*(w-p)+I+.16666667*C,R=.3*(b-x)+M+.16666667*F,B=Math.sqrt(T*T+R*R),X[0]=B,t=1;t<8;t++)T+=Y,R+=E,Y+=C,E+=F,B+=Math.sqrt(T*T+R*R),X[t]=B;T+=Y,R+=E,B+=Math.sqrt(T*T+R*R),X[8]=B,T+=Y+C,R+=E+F,B+=Math.sqrt(T*T+R*R),X[9]=B,d=0}for(v*=B;;d++){const t=X[d];if(!(v>t)){if(0==d)v/=t;else{const e=X[d-1];v=d+(v-e)/(t-e)}break}}this.addCurvePosition(.1*v,p,x,w,b,y,k,S,A,i,n,s||t>0&&0==e)}return i}addBeforePosition(t,e,s,n,r){const a=e[s],i=e[s+1],o=e[s+2]-a,h=e[s+3]-i,l=Math.atan2(h,o);n[r]=a+t*Math.cos(l),n[r+1]=i+t*Math.sin(l),n[r+2]=l}addAfterPosition(t,e,s,n,r){const a=e[s+2],i=e[s+3],o=a-e[s],h=i-e[s+1],l=Math.atan2(h,o);n[r]=a+t*Math.cos(l),n[r+1]=i+t*Math.sin(l),n[r+2]=l}addCurvePosition(t,e,s,n,r,a,i,o,h,l,c,d){if(0==t||isNaN(t))return l[c]=e,l[c+1]=s,void(l[c+2]=Math.atan2(r-s,n-e));const u=t*t,m=u*t,f=1-t,g=f*f,p=g*f,x=f*t,w=3*x,b=f*w,y=w*t,k=e*p+n*b+a*y+o*m,S=s*p+r*b+i*y+h*m;l[c]=k,l[c+1]=S,d&&(l[c+2]=t<.001?Math.atan2(r-s,n-e):Math.atan2(S-(s*g+r*x*2+i*u),k-(e*g+n*x*2+a*u)))}};let Fe=Ce;Fe.NONE=-1,Fe.BEFORE=-2,Fe.AFTER=-3,Fe.epsilon=1e-5;class Ye{constructor(t,e){if(this.darkColor=null,this.attachment=null,this.attachmentState=0,this.sequenceIndex=-1,this.deform=new Array,!t)throw new Error("data cannot be null.");if(!e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new S,this.darkColor=t.darkColor?new S:null,this.setToSetupPose(),this.blendMode=this.data.blendMode}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(t){this.attachment!=t&&(t instanceof K&&this.attachment instanceof K&&t.timelineAttachment==this.attachment.timelineAttachment||(this.deform.length=0),this.attachment=t,this.sequenceIndex=-1)}setToSetupPose(){this.color.setFromColor(this.data.color),this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),this.data.attachmentName?(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName))):this.attachment=null}}class Ee{constructor(t,e){if(this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.temp=new F,this.active=!1,!t)throw new Error("data cannot be null.");if(!e)throw new Error("skeleton cannot be null.");this.data=t,this.mixRotate=t.mixRotate,this.mixX=t.mixX,this.mixY=t.mixY,this.mixScaleX=t.mixScaleX,this.mixScaleY=t.mixScaleY,this.mixShearY=t.mixShearY,this.bones=new Array;for(let s=0;s<t.bones.length;s++){const n=e.findBone(t.bones[s].name);
1if(!n)throw new Error(`Couldn't find bone ${t.bones[s].name}.`);this.bones.push(n)}const s=e.findBone(t.target.name);if(!s)throw new Error(`Couldn't find target bone ${t.target.name}.`);this.target=s}isActive(){return this.active}update(){0==this.mixRotate&&0==this.mixX&&0==this.mixY&&0==this.mixScaleX&&0==this.mixScaleX&&0==this.mixShearY||(this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld())}applyAbsoluteWorld(){const t=this.mixRotate,e=this.mixX,s=this.mixY,n=this.mixScaleX,r=this.mixScaleY,a=this.mixShearY,i=0!=e||0!=s,o=this.target,h=o.matrix,l=h.a,c=h.c,d=h.b,u=h.d,m=l*u-c*d>0?I.degRad:-I.degRad,f=this.data.offsetRotation*m,g=this.data.offsetShearY*m,p=this.bones;for(let h=0,m=p.length;h<m;h++){const m=p[h],x=m.matrix;if(0!=t){const e=x.a,s=x.c,n=x.b,r=x.d;let a=Math.atan2(d,l)-Math.atan2(n,e)+f;a>I.PI?a-=I.PI2:a<-I.PI&&(a+=I.PI2),a*=t;const i=Math.cos(a),o=Math.sin(a);x.a=i*e-o*n,x.c=i*s-o*r,x.b=o*e+i*n,x.d=o*s+i*r}if(i){const t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.tx+=(t.x-x.tx)*e,x.ty+=(t.y-x.ty)*s}if(0!=n){let t=Math.sqrt(x.a*x.a+x.b*x.b);0!=t&&(t=(t+(Math.sqrt(l*l+d*d)-t+this.data.offsetScaleX)*n)/t),x.a*=t,x.b*=t}if(0!=r){let t=Math.sqrt(x.c*x.c+x.d*x.d);0!=t&&(t=(t+(Math.sqrt(c*c+u*u)-t+this.data.offsetScaleY)*r)/t),x.c*=t,x.d*=t}if(a>0){const t=x.c,e=x.d,s=Math.atan2(e,t);let n=Math.atan2(u,c)-Math.atan2(d,l)-(s-Math.atan2(x.b,x.a));n>I.PI?n-=I.PI2:n<-I.PI&&(n+=I.PI2),n=s+(n+g)*a;const r=Math.sqrt(t*t+e*e);x.c=Math.cos(n)*r,x.d=Math.sin(n)*r}m.updateAppliedTransform()}}applyRelativeWorld(){const t=this.mixRotate,e=this.mixX,s=this.mixY,n=this.mixScaleX,r=this.mixScaleY,a=this.mixShearY,i=0!=e||0!=s,o=this.target,h=o.matrix,l=h.a,c=h.c,d=h.b,u=h.d,m=l*u-c*d>0?I.degRad:-I.degRad,f=this.data.offsetRotation*m,g=this.data.offsetShearY*m,p=this.bones;for(let h=0,m=p.length;h<m;h++){const m=p[h],x=m.matrix;if(0!=t){const e=x.a,s=x.c,n=x.b,r=x.d;let a=Math.atan2(d,l)+f;a>I.PI?a-=I.PI2:a<-I.PI&&(a+=I.PI2),a*=t;const i=Math.cos(a),o=Math.sin(a);x.a=i*e-o*n,x.c=i*s-o*r,x.b=o*e+i*n,x.d=o*s+i*r}if(i){const t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.tx+=t.x*e,x.ty+=t.y*s}if(0!=n){const t=(Math.sqrt(l*l+d*d)-1+this.data.offsetScaleX)*n+1;x.a*=t,x.b*=t}if(0!=r){const t=(Math.sqrt(c*c+u*u)-1+this.data.offsetScaleY)*r+1;x.c*=t,x.d*=t}if(a>0){let t=Math.atan2(u,c)-Math.atan2(d,l);t>I.PI?t-=I.PI2:t<-I.PI&&(t+=I.PI2);const e=x.c,s=x.d;t=Math.atan2(s,e)+(t-I.PI/2+g)*a;const n=Math.sqrt(e*e+s*s);x.c=Math.cos(t)*n,x.d=Math.sin(t)*n}m.updateAppliedTransform()}}applyAbsoluteLocal(){const t=this.mixRotate,e=this.mixX,s=this.mixY,n=this.mixScaleX,r=this.mixScaleY,a=this.mixShearY,i=this.target,o=this.bones;for(let h=0,l=o.length;h<l;h++){const l=o[h];let c=l.arotation;if(0!=t){let e=i.arotation-c+this.data.offsetRotation;e-=360*(16384-(16384.499999999996-e/360|0)),c+=e*t}let d=l.ax,u=l.ay;d+=(i.ax-d+this.data.offsetX)*e,u+=(i.ay-u+this.data.offsetY)*s;let m=l.ascaleX,f=l.ascaleY;0!=n&&0!=m&&(m=(m+(i.ascaleX-m+this.data.offsetScaleX)*n)/m),0!=r&&0!=f&&(f=(f+(i.ascaleY-f+this.data.offsetScaleY)*r)/f);let g=l.ashearY;if(0!=a){let t=i.ashearY-g+this.data.offsetShearY;t-=360*(16384-(16384.499999999996-t/360|0)),g+=t*a}l.updateWorldTransformWith(d,u,c,m,f,l.ashearX,g)}}applyRelativeLocal(){const t=this.mixRotate,e=this.mixX,s=this.mixY,n=this.mixScaleX,r=this.mixScaleY,a=this.mixShearY,i=this.target,o=this.bones;for(let h=0,l=o.length;h<l;h++){const l=o[h],c=l.arotation+(i.arotation+this.data.offsetRotation)*t,d=l.ax+(i.ax+this.data.offsetX)*e,u=l.ay+(i.ay+this.data.offsetY)*s,m=l.ascaleX*((i.ascaleX-1+this.data.offsetScaleX)*n+1),f=l.ascaleY*((i.ascaleY-1+this.data.offsetScaleY)*r+1),g=l.ashearY+(i.ashearY+this.data.offsetShearY)*a;l.updateWorldTransformWith(d,u,c,m,f,l.ashearX,g)}}}const Te=class{constructor(t){if(this._updateCache=new Array,this.skin=null,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,!t)throw new Error("data cannot be null.");this.data=t,this.bones=new Array;for(let e=0;e<t.bones.length;e++){const s=t.bones[e];let n;if(s.parent){const t=this.bones[s.parent.index];n=new ke(s,this,t),t.children.push(n)}else n=new ke(s,this,null);this.bones.push(n)}this.slots=new Array,this.drawOrder=new Array;for(let e=0;e<t.slots.length;e++){const s=t.slots[e],n=this.bones[s.boneData.index],r=new Ye(s,n);this.slots.push(r),this.drawOrder.push(r)}this.ikConstraints=new Array;for(let e=0;e<t.ikConstraints.length;e++){const s=t.ikConstraints[e];this.ikConstraints.push(new Ae(s,this))}this.transformConstraints=new Array;for(let e=0;e<t.transformConstraints.length;e++){const s=t.transformConstraints[e];this.transformConstraints.push(new Ee(s,this))}this.pathConstraints=new Array;for(let e=0;e<t.pathConstraints.length;e++){const s=t.pathConstraints[e];this.pathConstraints.push(new Fe(s,this))}this.color=new S(1,1,1,1),this.updateCache()}updateCache(){this._updateCache.length=0;const t=this.bones;for(let e=0,s=t.length;e<s;e++){const s=t[e];s.sorted=s.data.skinRequired,s.active=!s.sorted}if(this.skin){const t=this.skin.bones;for(let e=0,s=this.skin.bones.length;e<s;e++){let s=this.bones[t[e].index];do{s.sorted=!1,s.active=!0,s=s.parent}while(s)}}const e=this.ikConstraints,s=this.transformConstraints,n=this.pathConstraints,r=e.length,a=s.length,i=n.length,o=r+a+i;t:for(let t=0;t<o;t++){for(let s=0;s<r;s++){const n=e[s];if(n.data.order==t){this.sortIkConstraint(n);continue t}}for(let e=0;e<a;e++){const n=s[e];if(n.data.order==t){this.sortTransformConstraint(n);continue t}}for(let e=0;e<i;e++){const s=n[e];if(s.data.order==t){this.sortPathConstraint(s);continue t}}}for(let e=0,s=t.length;e<s;e++)this.sortBone(t[e])}sortIkConstraint(t){if(t.active=t.target.isActive()&&(!t.data.skinRequired||this.skin&&v.contains(this.skin.constraints,t.data,!0)),!t.active)return;const e=t.target;this.sortBone(e);const s=t.bones,n=s[0];if(this.sortBone(n),1==s.length)this._updateCache.push(t),this.sortReset(n.children);else{const e=s[s.length-1];this.sortBone(e),this._updateCache.push(t),this.sortReset(n.children),e.sorted=!0}
vendor: 30,688 bytes, line 1
1}sortPathConstraint(t){if(t.active=t.target.bone.isActive()&&(!t.data.skinRequired||this.skin&&v.contains(this.skin.constraints,t.data,!0)),!t.active)return;const e=t.target,s=e.data.index,n=e.bone;this.skin&&this.sortPathConstraintAttachment(this.skin,s,n),this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,s,n);for(let t=0,e=this.data.skins.length;t<e;t++)this.sortPathConstraintAttachment(this.data.skins[t],s,n);const r=e.getAttachment();r instanceof tt&&this.sortPathConstraintAttachmentWith(r,n);const a=t.bones,i=a.length;for(let t=0;t<i;t++)this.sortBone(a[t]);this._updateCache.push(t);for(let t=0;t<i;t++)this.sortReset(a[t].children);for(let t=0;t<i;t++)a[t].sorted=!0}sortTransformConstraint(t){if(t.active=t.target.isActive()&&(!t.data.skinRequired||this.skin&&v.contains(this.skin.constraints,t.data,!0)),!t.active)return;this.sortBone(t.target);const e=t.bones,s=e.length;if(t.data.local)for(let t=0;t<s;t++){const s=e[t];this.sortBone(s.parent),this.sortBone(s)}else for(let t=0;t<s;t++)this.sortBone(e[t]);this._updateCache.push(t);for(let t=0;t<s;t++)this.sortReset(e[t].children);for(let t=0;t<s;t++)e[t].sorted=!0}sortPathConstraintAttachment(t,e,s){const n=t.attachments[e];if(n)for(const t in n)this.sortPathConstraintAttachmentWith(n[t],s)}sortPathConstraintAttachmentWith(t,e){if(!(t instanceof tt))return;const s=t.bones;if(s){const t=this.bones;for(let e=0,n=s.length;e<n;){let n=s[e++];for(n+=e;e<n;)this.sortBone(t[s[e++]])}}else this.sortBone(e)}sortBone(t){if(!t)return;if(t.sorted)return;const e=t.parent;e&&this.sortBone(e),t.sorted=!0,this._updateCache.push(t)}sortReset(t){for(let e=0,s=t.length;e<s;e++){const s=t[e];s.active&&(s.sorted&&this.sortReset(s.children),s.sorted=!1)}}updateWorldTransform(){const t=this.bones;for(let e=0,s=t.length;e<s;e++){const s=t[e];s.ax=s.x,s.ay=s.y,s.arotation=s.rotation,s.ascaleX=s.scaleX,s.ascaleY=s.scaleY,s.ashearX=s.shearX,s.ashearY=s.shearY}const e=this._updateCache;for(let t=0,s=e.length;t<s;t++)e[t].update()}updateWorldTransformWith(t){const e=this.getRootBone(),s=t.matrix.a,n=t.matrix.c,r=t.matrix.b,a=t.matrix.d;e.matrix.tx=s*this.x+n*this.y+t.worldX,e.matrix.ty=r*this.x+a*this.y+t.worldY;const i=e.rotation+90+e.shearY,o=I.cosDeg(e.rotation+e.shearX)*e.scaleX,h=I.cosDeg(i)*e.scaleY,l=I.sinDeg(e.rotation+e.shearX)*e.scaleX,c=I.sinDeg(i)*e.scaleY,d=this.scaleX,u=Y?-this.scaleY:this.scaleY;e.matrix.a=(s*o+n*l)*d,e.matrix.c=(s*h+n*c)*d,e.matrix.b=(r*o+a*l)*u,e.matrix.d=(r*h+a*c)*u;const m=this._updateCache;for(let t=0,s=m.length;t<s;t++){const s=m[t];s!=e&&s.update()}}setToSetupPose(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()}setBonesToSetupPose(){const t=this.bones;for(let e=0,s=t.length;e<s;e++)t[e].setToSetupPose();const e=this.ikConstraints;for(let t=0,s=e.length;t<s;t++){const s=e[t];s.mix=s.data.mix,s.softness=s.data.softness,s.bendDirection=s.data.bendDirection,s.compress=s.data.compress,s.stretch=s.data.stretch}const s=this.transformConstraints;for(let t=0,e=s.length;t<e;t++){const e=s[t],n=e.data;e.mixRotate=n.mixRotate,e.mixX=n.mixX,e.mixY=n.mixY,e.mixScaleX=n.mixScaleX,e.mixScaleY=n.mixScaleY,e.mixShearY=n.mixShearY}const n=this.pathConstraints;for(let t=0,e=n.length;t<e;t++){const e=n[t],s=e.data;e.position=s.position,e.spacing=s.spacing,e.mixRotate=s.mixRotate,e.mixX=s.mixX,e.mixY=s.mixY}}setSlotsToSetupPose(){const t=this.slots;v.arrayCopy(t,0,this.drawOrder,0,t.length);for(let e=0,s=t.length;e<s;e++)t[e].setToSetupPose()}getRootBone(){return 0==this.bones.length?null:this.bones[0]}findBone(t){if(!t)throw new Error("boneName cannot be null.");const e=this.bones;for(let s=0,n=e.length;s<n;s++){const n=e[s];if(n.data.name==t)return n}return null}findBoneIndex(t){if(!t)throw new Error("boneName cannot be null.");const e=this.bones;for(let s=0,n=e.length;s<n;s++)if(e[s].data.name==t)return s;return-1}findSlot(t){if(!t)throw new Error("slotName cannot be null.");const e=this.slots;for(let s=0,n=e.length;s<n;s++){const n=e[s];if(n.data.name==t)return n}return null}findSlotIndex(t){if(!t)throw new Error("slotName cannot be null.");const e=this.slots;for(let s=0,n=e.length;s<n;s++)if(e[s].data.name==t)return s;return-1}setSkinByName(t){const e=this.data.findSkin(t);if(!e)throw new Error(`Skin not found: ${t}`);this.setSkin(e)}setSkin(t){if(t!=this.skin){if(t)if(this.skin)t.attachAll(this,this.skin);else{const e=this.slots;for(let s=0,n=e.length;s<n;s++){const n=e[s],r=n.data.attachmentName;if(r){const e=t.getAttachment(s,r);e&&n.setAttachment(e)}}}this.skin=t,this.updateCache()}}getAttachmentByName(t,e){const s=this.data.findSlot(t);if(!s)throw new Error(`Can't find slot with name ${t}`);return this.getAttachment(s.index,e)}getAttachment(t,e){if(!e)throw new Error("attachmentName cannot be null.");if(this.skin){const s=this.skin.getAttachment(t,e);if(s)return s}return this.data.defaultSkin?this.data.defaultSkin.getAttachment(t,e):null}setAttachment(t,e){if(!t)throw new Error("slotName cannot be null.");const s=this.slots;for(let n=0,r=s.length;n<r;n++){const r=s[n];if(r.data.name==t){let s=null;if(e&&(s=this.getAttachment(n,e),!s))throw new Error(`Attachment not found: ${e}, for slot: ${t}`);return void r.setAttachment(s)}}throw new Error(`Slot not found: ${t}`)}findIkConstraint(t){if(!t)throw new Error("constraintName cannot be null.");const e=this.ikConstraints;for(let s=0,n=e.length;s<n;s++){const n=e[s];if(n.data.name==t)return n}return null}findTransformConstraint(t){if(!t)throw new Error("constraintName cannot be null.");const e=this.transformConstraints;for(let s=0,n=e.length;s<n;s++){const n=e[s];if(n.data.name==t)return n}return null}findPathConstraint(t){if(!t)throw new Error("constraintName cannot be null.");const e=this.pathConstraints;for(let s=0,n=e.length;s<n;s++){const n=e[s];if(n.data.name==t)return n}return null}getBoundsRect(){const t=new F,e=new F;return this.getBounds(t,e),{x:t.x,y:t.y,width:e.x,height:e.y}}getBounds(t,e,s=new Array(2)){if(!t)throw new Error("offset cannot be null.");if(!e)throw new Error("size cannot be null.");const n=this.drawOrder;let r=Number.POSITIVE_INFINITY,a=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY;for(let t=0,e=n.length;t<e;t++){const e=n[t];if(!e.bone.active)continue;let h=0,l=null;const c=e.getAttachment();if(c instanceof nt)h=8,l=v.setArraySize(s,h,0),c.computeWorldVertices(e,l,0,2);else if(c instanceof Q){const t=c;h=t.worldVerticesLength,l=v.setArraySize(s,h,0),t.computeWorldVertices(e,0,h,l,0,2)}if(l)for(let t=0,e=l.length;t<e;t+=2){const e=l[t],s=l[t+1];r=Math.min(r,e),a=Math.min(a,s),i=Math.max(i,e),o=Math.max(o,s)}}t.set(r,a),e.set(i-r,o-a)}get flipX(){return-1==this.scaleX}set flipX(t){Te.deprecatedWarning1||(Te.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY")),this.scaleX=t?1:-1}get flipY(){return-1==this.scaleY}set flipY(t){Te.deprecatedWarning1||(Te.deprecatedWarning1=!0,console.warn("Spine Deprecation Warning: `Skeleton.flipX/flipY` was deprecated, please use scaleX/scaleY")),this.scaleY=t?1:-1}};let Re=Te;Re.deprecatedWarning1=!1;class Xe{constructor(t,e){if(this.intValue=0,this.floatValue=0,this.stringValue=null,this.time=0,this.volume=0,this.balance=0,!e)throw new Error("data cannot be null.");this.time=t,this.data=e}}class Be{constructor(){this.name=null,this.bones=new Array,this.slots=new Array,this.skins=new Array,this.defaultSkin=null,this.events=new Array,this.animations=new Array,this.ikConstraints=new Array,this.transformConstraints=new Array,this.pathConstraints=new Array,this.x=0,this.y=0,this.width=0,this.height=0,this.version=null,this.hash=null,this.fps=0,this.imagesPath=null,this.audioPath=null}findBone(t){if(!t)throw new Error("boneName cannot be null.");const e=this.bones;for(let s=0,n=e.length;s<n;s++){const n=e[s];if(n.name==t)return n}return null}findBoneIndex(t){if(!t)throw new Error("boneName cannot be null.");const e=this.bones;for(let s=0,n=e.length;s<n;s++)if(e[s].name==t)return s;return-1}findSlot(t){if(!t)throw new Error("slotName cannot be null.");const e=this.slots;for(let s=0,n=e.length;s<n;s++){const n=e[s];if(n.name==t)return n}return null}findSlotIndex(t){if(!t)throw new Error("slotName cannot be null.");const e=this.slots;for(let s=0,n=e.length;s<n;s++)if(e[s].name==t)return s;return-1}findSkin(t){if(!t)throw new Error("skinName cannot be null.");const e=this.skins;for(let s=0,n=e.length;s<n;s++){const n=e[s];if(n.name==t)return n}return null}findEvent(t){if(!t)throw new Error("eventDataName cannot be null.");const e=this.events;for(let s=0,n=e.length;s<n;s++){const n=e[s];if(n.name==t)return n}return null}findAnimation(t){if(!t)throw new Error("animationName cannot be null.");const e=this.animations;for(let s=0,n=e.length;s<n;s++){const n=e[s];if(n.name==t)return n}return null}findIkConstraint(t){if(!t)throw new Error("constraintName cannot be null.");const e=this.ikConstraints;for(let s=0,n=e.length;s<n;s++){const n=e[s];if(n.name==t)return n}return null}findTransformConstraint(t){if(!t)throw new Error("constraintName cannot be null.");const e=this.transformConstraints;for(let s=0,n=e.length;s<n;s++){const n=e[s];if(n.name==t)return n}return null}findPathConstraint(t){if(!t)throw new Error("constraintName cannot be null.");const e=this.pathConstraints;for(let s=0,n=e.length;s<n;s++){const n=e[s];if(n.name==t)return n}return null}findPathConstraintIndex(t){if(null==t)throw new Error("pathConstraintName cannot be null.");const e=this.pathConstraints;for(let s=0,n=e.length;s<n;s++)if(e[s].name==t)return s;return-1}}class Pe{constructor(t,e,s){if(this.index=0,this.color=new S(1,1,1,1),this.darkColor=null,this.attachmentName=null,this.blendMode=c.T$.NORMAL,t<0)throw new Error("index must be >= 0.");if(!e)throw new Error("name cannot be null.");if(!s)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=s}}class De extends Ie{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.bendDirection=1,this.compress=!1,this.stretch=!1,this.uniform=!1,this.mix=1,this.softness=0}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}}class Ne extends Ie{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.mixRotate=0,this.mixX=0,this.mixY=0,this.mixScaleX=0,this.mixScaleY=0,this.mixShearY=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,this.relative=!1,this.local=!1}set target(t){this._target=t}get target(){if(this._target)return this._target;throw new Error("BoneData not set.")}}class Le{constructor(t,e,s){this.slotIndex=t,this.name=e,this.attachment=s}}class Ve{constructor(t){if(this.attachments=new Array,this.bones=Array(),this.constraints=new Array,!t)throw new Error("name cannot be null.");this.name=t}setAttachment(t,e,s){if(!s)throw new Error("attachment cannot be null.");const n=this.attachments;t>=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=s}addSkin(t){for(let e=0;e<t.bones.length;e++){const s=t.bones[e];let n=!1;for(let t=0;t<this.bones.length;t++)if(this.bones[t]==s){n=!0;break}n||this.bones.push(s)}for(let e=0;e<t.constraints.length;e++){const s=t.constraints[e];let n=!1;for(let t=0;t<this.constraints.length;t++)if(this.constraints[t]==s){n=!0;break}n||this.constraints.push(s)}const e=t.getAttachments();for(let t=0;t<e.length;t++){const s=e[t];this.setAttachment(s.slotIndex,s.name,s.attachment)}}copySkin(t){for(let e=0;e<t.bones.length;e++){const s=t.bones[e];let n=!1;for(let t=0;t<this.bones.length;t++)if(this.bones[t]==s){n=!0;break}n||this.bones.push(s)}for(let e=0;e<t.constraints.length;e++){const s=t.constraints[e];let n=!1;for(let t=0;t<this.constraints.length;t++)if(this.constraints[t]==s){n=!0;break}n||this.constraints.push(s)}const e=t.getAttachments();for(let t=0;t<e.length;t++){const s=e[t];s.attachment&&(s.attachment instanceof Q?(s.attachment=s.attachment.newLinkedMesh(),this.setAttachment(s.slotIndex,s.name,s.attachment)):(s.attachment=s.attachment.copy(),this.setAttachment(s.slotIndex,s.name,s.attachment)))}}getAttachment(t,e){const s=this.attachments[t];return s?s[e]:null}removeAttachment(t,e){const s=this.attachments[t];s&&delete s[e]}getAttachments(){const t=new Array;for(let e=0;e<this.attachments.length;e++){const s=this.attachments[e];if(s)for(const n in s){const r=s[n];r&&t.push(new Le(e,n,r))}}return t}getAttachmentsForSlot(t,e){const s=this.attachments[t];if(s)for(const n in s){const r=s[n];r&&e.push(new Le(t,n,r))}}clear(){this.attachments.length=0,this.bones.length=0,this.constraints.length=0}attachAll(t,e){let s=0;for(let n=0;n<t.slots.length;n++){const r=t.slots[n],a=r.getAttachment();if(a&&s<e.attachments.length){const t=e.attachments[s];for(const e in t){if(a==t[e]){const t=this.getAttachment(s,e);t&&r.setAttachment(t);break}}}s++}}}class $e{constructor(t){this.intValue=0,this.floatValue=0,this.stringValue=null,this.audioPath=null,this.volume=0,this.balance=0,this.name=t}}class We{constructor(t){this.ver40=!1,this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}readSkeletonData(t){const e=this.scale,s=new Be;s.name="";const n=new r(t),a=n.readInt32(),i=n.readInt32();s.hash=0==i&&0==a?null:i.toString(16)+a.toString(16),s.version=n.readString();const h=s.version.substr(0,3);if("4.0"!==h&&"4.1"!==h){const t=`Spine 4.1 loader cant load version ${s.version}. Please configure your pixi-spine bundle`;console.error(t)}this.ver40="4.0"===h,s.x=n.readFloat(),s.y=n.readFloat(),s.width=n.readFloat(),s.height=n.readFloat();const l=n.readBoolean();l&&(s.fps=n.readFloat(),s.imagesPath=n.readString(),s.audioPath=n.readString());let c=0;c=n.readInt(!0);for(let t=0;t<c;t++){const t=n.readString();if(!t)throw new Error("String in string table must not be null.");n.strings.push(t)}c=n.readInt(!0);for(let t=0;t<c;t++){const r=n.readString();if(!r)throw new Error("Bone name must not be null.");const a=0==t?null:s.bones[n.readInt(!0)],i=new Se(t,r,a);i.rotation=n.readFloat(),i.x=n.readFloat()*e,i.y=n.readFloat()*e,i.scaleX=n.readFloat(),i.scaleY=n.readFloat(),i.shearX=n.readFloat(),i.shearY=n.readFloat(),i.length=n.readFloat()*e,i.transformMode=n.readInt(!0),i.skinRequired=n.readBoolean(),l&&S.rgba8888ToColor(i.color,n.readInt32()),s.bones.push(i)}c=n.readInt(!0);for(let t=0;t<c;t++){const e=n.readString();if(!e)throw new Error("Slot name must not be null.");const r=s.bones[n.readInt(!0)],a=new Pe(t,e,r);S.rgba8888ToColor(a.color,n.readInt32());const i=n.readInt32();-1!=i&&S.rgb888ToColor(a.darkColor=new S,i),a.attachmentName=n.readStringRef(),a.blendMode=n.readInt(!0),s.slots.push(a)}c=n.readInt(!0);for(let t,r=0;r<c;r++){const r=n.readString();if(!r)throw new Error("IK constraint data name must not be null.");const a=new De(r);a.order=n.readInt(!0),a.skinRequired=n.readBoolean(),t=n.readInt(!0);for(let e=0;e<t;e++)a.bones.push(s.bones[n.readInt(!0)]);a.target=s.bones[n.readInt(!0)],a.mix=n.readFloat(),a.softness=n.readFloat()*e,a.bendDirection=n.readByte(),a.compress=n.readBoolean(),a.stretch=n.readBoolean(),a.uniform=n.readBoolean(),s.ikConstraints.push(a)}c=n.readInt(!0);for(let t,r=0;r<c;r++){const r=n.readString();if(!r)throw new Error("Transform constraint data name must not be null.");const a=new Ne(r);a.order=n.readInt(!0),a.skinRequired=n.readBoolean(),t=n.readInt(!0);for(let e=0;e<t;e++)a.bones.push(s.bones[n.readInt(!0)]);a.target=s.bones[n.readInt(!0)],a.local=n.readBoolean(),a.relative=n.readBoolean(),a.offsetRotation=n.readFloat(),a.offsetX=n.readFloat()*e,a.offsetY=n.readFloat()*e,a.offsetScaleX=n.readFloat(),a.offsetScaleY=n.readFloat(),a.offsetShearY=n.readFloat(),a.mixRotate=n.readFloat(),a.mixX=n.readFloat(),a.mixY=n.readFloat(),a.mixScaleX=n.readFloat(),a.mixScaleY=n.readFloat(),a.mixShearY=n.readFloat(),s.transformConstraints.push(a)}c=n.readInt(!0);for(let t,r=0;r<c;r++){const r=n.readString();if(!r)throw new Error("Path constraint data name must not be null.");const a=new Me(r);a.order=n.readInt(!0),a.skinRequired=n.readBoolean(),t=n.readInt(!0);for(let e=0;e<t;e++)a.bones.push(s.bones[n.readInt(!0)]);a.target=s.slots[n.readInt(!0)],a.positionMode=n.readInt(!0),a.spacingMode=n.readInt(!0),a.rotateMode=n.readInt(!0),a.offsetRotation=n.readFloat(),a.position=n.readFloat(),a.positionMode==o.Fixed&&(a.position*=e),a.spacing=n.readFloat(),a.spacingMode!=ve.Length&&a.spacingMode!=ve.Fixed||(a.spacing*=e),a.mixRotate=n.readFloat(),a.mixX=n.readFloat(),a.mixY=n.readFloat(),s.pathConstraints.push(a)}const d=this.readSkin(n,s,!0,l);d&&(s.defaultSkin=d,s.skins.push(d));{let t=s.skins.length;for(v.setArraySize(s.skins,c=t+n.readInt(!0));t<c;t++){const e=this.readSkin(n,s,!1,l);if(!e)throw new Error("readSkin() should not have returned null.");s.skins[t]=e}}c=this.linkedMeshes.length;for(let t=0;t<c;t++){const e=this.linkedMeshes[t],n=e.skin?s.findSkin(e.skin):s.defaultSkin;if(!n)throw new Error("Not skin found for linked mesh.");if(!e.parent)throw new Error("Linked mesh parent must not be null");const r=n.getAttachment(e.slotIndex,e.parent);if(!r)throw new Error(`Parent mesh not found: ${e.parent}`);e.mesh.timelineAttachment=e.inheritTimeline?r:e.mesh,e.mesh.setParentMesh(r)}this.linkedMeshes.length=0,c=n.readInt(!0);for(let t=0;t<c;t++){const t=n.readStringRef();if(!t)throw new Error;const e=new $e(t);e.intValue=n.readInt(!1),e.floatValue=n.readFloat(),e.stringValue=n.readString(),e.audioPath=n.readString(),e.audioPath&&(e.volume=n.readFloat(),e.balance=n.readFloat()),s.events.push(e)}c=n.readInt(!0);for(let t=0;t<c;t++){const t=n.readString();if(!t)throw new Error("Animatio name must not be null.");s.animations.push(this.readAnimation(n,t,s))}return s}readSkin(t,e,s,n){let r=null,a=0;if(s){if(a=t.readInt(!0),0==a)return null;r=new Ve("default")}else{const s=t.readStringRef();if(!s)throw new Error("Skin name must not be null.");r=new Ve(s),r.bones.length=t.readInt(!0);for(let s=0,n=r.bones.length;s<n;s++)r.bones[s]=e.bones[t.readInt(!0)];for(let s=0,n=t.readInt(!0);s<n;s++)r.constraints.push(e.ikConstraints[t.readInt(!0)]);for(let s=0,n=t.readInt(!0);s<n;s++)r.constraints.push(e.transformConstraints[t.readInt(!0)]);for(let s=0,n=t.readInt(!0);s<n;s++)r.constraints.push(e.pathConstraints[t.readInt(!0)]);a=t.readInt(!0)}for(let s=0;s<a;s++){const s=t.readInt(!0);for(let a=0,i=t.readInt(!0);a<i;a++){const a=t.readStringRef();if(!a)throw new Error("Attachment name must not be null");const i=this.readAttachment(t,e,r,s,a,n);i&&r.setAttachment(s,a,i)}}return r}readAttachment(t,e,s,r,a,i){const o=this.scale;let h=t.readStringRef();switch(h||(h=a),t.readByte()){case n.Region:{let e=t.readStringRef();const n=t.readFloat(),r=t.readFloat(),a=t.readFloat(),i=t.readFloat(),l=t.readFloat(),c=t.readFloat(),d=t.readFloat(),u=t.readInt32(),m=this.readSequence(t);e||(e=h);const f=this.attachmentLoader.newRegionAttachment(s,h,e,m);return f?(f.path=e,f.x=r*o,f.y=a*o,f.scaleX=i,f.scaleY=l,f.rotation=n,f.width=c*o,f.height=d*o,S.rgba8888ToColor(f.color,u),f.sequence=m,null==m&&f.updateRegion(),f):null}case n.BoundingBox:{const e=t.readInt(!0),n=this.readVertices(t,e),r=i?t.readInt32():0,a=this.attachmentLoader.newBoundingBoxAttachment(s,h);return a?(a.worldVerticesLength=e<<1,a.vertices=n.vertices,a.bones=n.bones,i&&S.rgba8888ToColor(a.color,r),a):null}case n.Mesh:{let e=t.readStringRef();const n=t.readInt32(),r=t.readInt(!0),a=this.readFloatArray(t,r<<1,1),l=this.readShortArray(t),c=this.readVertices(t,r),d=t.readInt(!0),u=this.readSequence(t);let m=[],f=0,g=0;i&&(m=this.readShortArray(t),f=t.readFloat(),g=t.readFloat()),e||(e=h);const p=this.attachmentLoader.newMeshAttachment(s,h,e,u);return p?(p.path=e,S.rgba8888ToColor(p.color,n),p.bones=c.bones,p.vertices=c.vertices,p.worldVerticesLength=r<<1,p.triangles=l,p.regionUVs=new Float32Array(a),p.hullLength=d<<1,p.sequence=u,i&&(p.edges=m,p.width=f*o,p.height=g*o),p):null}case n.LinkedMesh:{let e=t.readStringRef();const n=t.readInt32(),a=t.readStringRef(),l=t.readStringRef(),c=t.readBoolean(),d=this.readSequence(t);let u=0,m=0;i&&(u=t.readFloat(),m=t.readFloat()),e||(e=h);const f=this.attachmentLoader.newMeshAttachment(s,h,e,d);return f?(f.path=e,S.rgba8888ToColor(f.color,n),f.sequence=d,i&&(f.width=u*o,f.height=m*o),this.linkedMeshes.push(new qe(f,a,r,l,c)),f):null}case n.Path:{const e=t.readBoolean(),n=t.readBoolean(),r=t.readInt(!0),a=this.readVertices(t,r),l=v.newArray(r/3,0);for(let e=0,s=l.length;e<s;e++)l[e]=t.readFloat()*o;const c=i?t.readInt32():0,d=this.attachmentLoader.newPathAttachment(s,h);return d?(d.closed=e,d.constantSpeed=n,d.worldVerticesLength=r<<1,d.vertices=a.vertices,d.bones=a.bones,d.lengths=l,i&&S.rgba8888ToColor(d.color,c),d):null}case n.Point:{const e=t.readFloat(),n=t.readFloat(),r=t.readFloat(),a=i?t.readInt32():0,l=this.attachmentLoader.newPointAttachment(s,h);return l?(l.x=n*o,l.y=r*o,l.rotation=e,i&&S.rgba8888ToColor(l.color,a),l):null}case n.Clipping:{const n=t.readInt(!0),r=t.readInt(!0),a=this.readVertices(t,r),o=i?t.readInt32():0,l=this.attachmentLoader.newClippingAttachment(s,h);return l?(l.endSlot=e.slots[n],l.worldVerticesLength=r<<1,l.vertices=a.vertices,l.bones=a.bones,i&&S.rgba8888ToColor(l.color,o),l):null}}return null}readSequence(t){if(this.ver40||!t.readBoolean())return null;const e=new at(t.readInt(!0));return e.start=t.readInt(!0),e.digits=t.readInt(!0),e.setupIndex=t.readInt(!0),e}readDeformTimelineType(t){return this.ver40?ls:t.readByte()}readVertices(t,e){const s=this.scale,n=e<<1,r=new Oe;if(!t.readBoolean())return r.vertices=this.readFloatArray(t,n,s),r;const a=new Array,i=new Array;for(let n=0;n<e;n++){const e=t.readInt(!0);i.push(e);for(let n=0;n<e;n++)i.push(t.readInt(!0)),a.push(t.readFloat()*s),a.push(t.readFloat()*s),a.push(t.readFloat())}return r.vertices=v.toFloatArray(a),r.bones=i,r}readFloatArray(t,e,s){const n=new Array(e);if(1==s)for(let s=0;s<e;s++)n[s]=t.readFloat();else for(let r=0;r<e;r++)n[r]=t.readFloat()*s;return n}readShortArray(t){const e=t.readInt(!0),s=new Array(e);for(let n=0;n<e;n++)s[n]=t.readShort();return s}readAnimation(t,e,s){t.readInt(!0);const n=new Array,r=this.scale;for(let e=0,s=t.readInt(!0);e<s;e++){const e=t.readInt(!0);for(let s=0,r=t.readInt(!0);s<r;s++){const s=t.readByte(),r=t.readInt(!0),a=r-1;switch(s){case ns:{const s=new jt(r,e);for(let e=0;e<r;e++)s.setFrame(e,t.readFloat(),t.readStringRef());n.push(s);break}case rs:{const s=t.readInt(!0),i=new Ot(r,s,e);let o=t.readFloat(),h=t.readUnsignedByte()/255,l=t.readUnsignedByte()/255,c=t.readUnsignedByte()/255,d=t.readUnsignedByte()/255;for(let e=0,s=0;i.setFrame(e,o,h,l,c,d),e!=a;e++){const n=t.readFloat(),r=t.readUnsignedByte()/255,a=t.readUnsignedByte()/255,u=t.readUnsignedByte()/255,m=t.readUnsignedByte()/255;switch(t.readByte()){case fs:i.setStepped(e);break;case gs:ze(t,i,s++,e,0,o,n,h,r,1),ze(t,i,s++,e,1,o,n,l,a,1),ze(t,i,s++,e,2,o,n,c,u,1),ze(t,i,s++,e,3,o,n,d,m,1)}o=n,h=r,l=a,c=u,d=m}n.push(i);break}case as:{const s=t.readInt(!0),i=new Ut(r,s,e);let o=t.readFloat(),h=t.readUnsignedByte()/255,l=t.readUnsignedByte()/255,c=t.readUnsignedByte()/255;for(let e=0,s=0;i.setFrame(e,o,h,l,c),e!=a;e++){const n=t.readFloat(),r=t.readUnsignedByte()/255,a=t.readUnsignedByte()/255,d=t.readUnsignedByte()/255;switch(t.readByte()){case fs:i.setStepped(e);break;case gs:ze(t,i,s++,e,0,o,n,h,r,1),ze(t,i,s++,e,1,o,n,l,a,1),ze(t,i,s++,e,2,o,n,c,d,1)}o=n,h=r,l=a,c=d}n.push(i);break}case is:{const s=t.readInt(!0),i=new zt(r,s,e);let o=t.readFloat(),h=t.readUnsignedByte()/255,l=t.readUnsignedByte()/255,c=t.readUnsignedByte()/255,d=t.readUnsignedByte()/255,u=t.readUnsignedByte()/255,m=t.readUnsignedByte()/255,f=t.readUnsignedByte()/255;for(let e=0,s=0;i.setFrame(e,o,h,l,c,d,u,m,f),e!=a;e++){const n=t.readFloat(),r=t.readUnsignedByte()/255,a=t.readUnsignedByte()/255,g=t.readUnsignedByte()/255,p=t.readUnsignedByte()/255,x=t.readUnsignedByte()/255,w=t.readUnsignedByte()/255,b=t.readUnsignedByte()/255;switch(t.readByte()){case fs:i.setStepped(e);break;case gs:ze(t,i,s++,e,0,o,n,h,r,1),ze(t,i,s++,e,1,o,n,l,a,1),ze(t,i,s++,e,2,o,n,c,g,1),ze(t,i,s++,e,3,o,n,d,p,1),ze(t,i,s++,e,4,o,n,u,x,1),ze(t,i,s++,e,5,o,n,m,w,1),ze(t,i,s++,e,6,o,n,f,b,1)}o=n,h=r,l=a,c=g,d=p,u=x,m=w,f=b}n.push(i);break}case os:{const s=t.readInt(!0),i=new Ht(r,s,e);let o=t.readFloat(),h=t.readUnsignedByte()/255,l=t.readUnsignedByte()/255,c=t.readUnsignedByte()/255,d=t.readUnsignedByte()/255,u=t.readUnsignedByte()/255,m=t.readUnsignedByte()/255;for(let e=0,s=0;i.setFrame(e,o,h,l,c,d,u,m),e!=a;e++){const n=t.readFloat(),r=t.readUnsignedByte()/255,a=t.readUnsignedByte()/255,f=t.readUnsignedByte()/255,g=t.readUnsignedByte()/255,p=t.readUnsignedByte()/255,x=t.readUnsignedByte()/255;switch(t.readByte()){case fs:i.setStepped(e);break;case gs:ze(t,i,s++,e,0,o,n,h,r,1),ze(t,i,s++,e,1,o,n,l,a,1),ze(t,i,s++,e,2,o,n,c,f,1),ze(t,i,s++,e,3,o,n,d,g,1),ze(t,i,s++,e,4,o,n,u,p,1),ze(t,i,s++,e,5,o,n,m,x,1)}o=n,h=r,l=a,c=f,d=g,u=p,m=x}n.push(i);break}case hs:{const s=new _t(r,t.readInt(!0),e);let i=t.readFloat(),o=t.readUnsignedByte()/255;for(let e=0,n=0;s.setFrame(e,i,o),e!=a;e++){const r=t.readFloat(),a=t.readUnsignedByte()/255;switch(t.readByte()){case fs:s.setStepped(e);break;case gs:ze(t,s,n++,e,0,i,r,o,a,1)}i=r,o=a}n.push(s)}}}}for(let e=0,s=t.readInt(!0);e<s;e++){const e=t.readInt(!0);for(let s=0,a=t.readInt(!0);s<a;s++){const s=t.readByte(),a=t.readInt(!0),i=t.readInt(!0);switch(s){case He:n.push(Ue(t,new Xt(a,i,e),1));break;case je:n.push(_e(t,new Bt(a,i,e),r));break;case Ge:n.push(Ue(t,new Pt(a,i,e),r));break;case Ke:n.push(Ue(t,new Dt(a,i,e),r));break;case Ze:n.push(_e(t,new Nt(a,i,e),1));break;case Je:n.push(Ue(t,new Lt(a,i,e),1));break;case Qe:n.push(Ue(t,new Vt(a,i,e),1));break;case ts:n.push(_e(t,new $t(a,i,e),1));break;case es:n.push(Ue(t,new Wt(a,i,e),1));break;case ss:n.push(Ue(t,new qt(a,i,e),1))}}}for(let e=0,s=t.readInt(!0);e<s;e++){const e=t.readInt(!0),s=t.readInt(!0),a=s-1,i=new te(s,t.readInt(!0),e);let o=t.readFloat(),h=t.readFloat(),l=t.readFloat()*r;for(let e=0,s=0;i.setFrame(e,o,h,l,t.readByte(),t.readBoolean(),t.readBoolean()),e!=a;e++){const n=t.readFloat(),a=t.readFloat(),c=t.readFloat()*r;switch(t.readByte()){case fs:i.setStepped(e);break;case gs:ze(t,i,s++,e,0,o,n,h,a,1),ze(t,i,s++,e,1,o,n,l,c,r)}o=n,h=a,l=c}n.push(i)}for(let e=0,s=t.readInt(!0);e<s;e++){const e=t.readInt(!0),s=t.readInt(!0),r=s-1,a=new ee(s,t.readInt(!0),e);let i=t.readFloat(),o=t.readFloat(),h=t.readFloat(),l=t.readFloat(),c=t.readFloat(),d=t.readFloat(),u=t.readFloat();for(let e=0,s=0;a.setFrame(e,i,o,h,l,c,d,u),e!=r;e++){const n=t.readFloat(),r=t.readFloat(),m=t.readFloat(),f=t.readFloat(),g=t.readFloat(),p=t.readFloat(),x=t.readFloat();switch(t.readByte()){case fs:a.setStepped(e);break;case gs:ze(t,a,s++,e,0,i,n,o,r,1),ze(t,a,s++,e,1,i,n,h,m,1),ze(t,a,s++,e,2,i,n,l,f,1),ze(t,a,s++,e,3,i,n,c,g,1),ze(t,a,s++,e,4,i,n,d,p,1),ze(t,a,s++,e,5,i,n,u,x,1)}i=n,o=r,h=m,l=f,c=g,d=p,u=x}n.push(a)}for(let e=0,a=t.readInt(!0);e<a;e++){const e=t.readInt(!0),a=s.pathConstraints[e];for(let s=0,i=t.readInt(!0);s<i;s++)switch(t.readByte()){case ds:n.push(Ue(t,new se(t.readInt(!0),t.readInt(!0),e),a.positionMode==o.Fixed?r:1));break;case us:n.push(Ue(t,new ne(t.readInt(!0),t.readInt(!0),e),a.spacingMode==ve.Length||a.spacingMode==ve.Fixed?r:1));break;case ms:const s=new re(t.readInt(!0),t.readInt(!0),e);let i=t.readFloat(),h=t.readFloat(),l=t.readFloat(),c=t.readFloat();for(let e=0,n=0,r=s.getFrameCount()-1;s.setFrame(e,i,h,l,c),e!=r;e++){const r=t.readFloat(),a=t.readFloat(),o=t.readFloat(),d=t.readFloat();switch(t.readByte()){case fs:s.setStepped(e);break;case gs:ze(t,s,n++,e,0,i,r,h,a,1),ze(t,s,n++,e,1,i,r,l,o,1),ze(t,s,n++,e,2,i,r,c,d,1)}i=r,h=a,l=o,c=d}n.push(s)}}for(let e=0,a=t.readInt(!0);e<a;e++){const e=s.skins[t.readInt(!0)];for(let s=0,a=t.readInt(!0);s<a;s++){const s=t.readInt(!0);for(let a=0,i=t.readInt(!0);a<i;a++){const a=t.readStringRef();if(!a)throw new Error("attachmentName must not be null.");const i=e.getAttachment(s,a),o=this.readDeformTimelineType(t),h=t.readInt(!0),l=h-1;switch(o){case ls:{const e=i,a=e.bones,o=e.vertices,c=a?o.length/3*2:o.length,d=t.readInt(!0),u=new Gt(h,d,s,e);let m=t.readFloat();for(let e=0,s=0;;e++){let n,i=t.readInt(!0);if(0==i)n=a?v.newFloatArray(c):o;else{n=v.newFloatArray(c);const e=t.readInt(!0);if(i+=e,1==r)for(let s=e;s<i;s++)n[s]=t.readFloat();else for(let s=e;s<i;s++)n[s]=t.readFloat()*r;if(!a)for(let t=0,e=n.length;t<e;t++)n[t]+=o[t]}if(u.setFrame(e,m,n),e==l)break;const h=t.readFloat();switch(t.readByte()){case fs:u.setStepped(e);break;case gs:ze(t,u,s++,e,0,m,h,0,1,1)}m=h}n.push(u);break}case cs:{const e=new ie(h,s,i);for(let s=0;s<h;s++){const n=t.readFloat(),r=t.readInt32();e.setFrame(s,n,ot[15&r],r>>4,t.readFloat())}n.push(e);break}}}}}const a=t.readInt(!0);if(a>0){const e=new Qt(a),r=s.slots.length;for(let s=0;s<a;s++){const n=t.readFloat(),a=t.readInt(!0),i=v.newArray(r,0);for(let t=r-1;t>=0;t--)i[t]=-1;const o=v.newArray(r-a,0);let h=0,l=0;for(let e=0;e<a;e++){const e=t.readInt(!0);for(;h!=e;)o[l++]=h++;i[h+t.readInt(!0)]=h++}for(;h<r;)o[l++]=h++;for(let t=r-1;t>=0;t--)-1==i[t]&&(i[t]=o[--l]);e.setFrame(s,n,i)}n.push(e)}const i=t.readInt(!0);if(i>0){const e=new Zt(i);for(let n=0;n<i;n++){const r=t.readFloat(),a=s.events[t.readInt(!0)],i=new Xe(r,a);i.intValue=t.readInt(!1),i.floatValue=t.readFloat(),i.stringValue=t.readBoolean()?t.readString():a.stringValue,i.data.audioPath&&(i.volume=t.readFloat(),i.balance=t.readFloat()),e.setFrame(n,i)}n.push(e)}let h=0;for(let t=0,e=n.length;t<e;t++)h=Math.max(h,n[t].getDuration());return new ht(e,n,h)}}We.BlendModeValues=[c.T$.NORMAL,c.T$.ADD,c.T$.MULTIPLY,c.T$.SCREEN];class qe{constructor(t,e,s,n,r){this.mesh=t,this.skin=e,this.slotIndex=s,this.parent=n,this.inheritTimeline=r}}class Oe{constructor(t=null,e=null){this.bones=t,this.vertices=e}}function Ue(t,e,s){let n=t.readFloat(),r=t.readFloat()*s;for(let a=0,i=0,o=e.getFrameCount()-1;e.setFrame(a,n,r),a!=o;a++){const o=t.readFloat(),h=t.readFloat()*s;switch(t.readByte()){case fs:e.setStepped(a);break;case gs:ze(t,e,i++,a,0,n,o,r,h,s)}n=o,r=h}return e}function _e(t,e,s){let n=t.readFloat(),r=t.readFloat()*s,a=t.readFloat()*s;for(let i=0,o=0,h=e.getFrameCount()-1;e.setFrame(i,n,r,a),i!=h;i++){const h=t.readFloat(),l=t.readFloat()*s,c=t.readFloat()*s;switch(t.readByte()){case fs:e.setStepped(i);break;case gs:ze(t,e,o++,i,0,n,h,r,l,s),ze(t,e,o++,i,1,n,h,a,c,s)}n=h,r=l,a=c}return e}function ze(t,e,s,n,r,a,i,o,h,l){e.setBezier(s,n,r,a,o,t.readFloat(),t.readFloat()*l,t.readFloat(),t.readFloat()*l,i,h)}const He=0,je=1,Ge=2,Ke=3,Ze=4,Je=5,Qe=6,ts=7,es=8,ss=9,ns=0,rs=1,as=2,is=3,os=4,hs=5,ls=0,cs=1,ds=0,us=1,ms=2,f
1s=1,gs=2;class ps{constructor(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}readSkeletonData(t){const e=this.scale,s=new Be,n="string"==typeof t?JSON.parse(t):t,r=n.skeleton;if(r){s.hash=r.hash,s.version=r.spine;const t=s.version.substr(0,3);if("4.0"!==t&&"4.1"!==t){const t=`Spine 4.1 loader cant load version ${r.spine}. Please configure your pixi-spine bundle`;console.error(t)}s.x=r.x,s.y=r.y,s.width=r.width,s.height=r.height,s.fps=r.fps,s.imagesPath=r.images}if(n.bones)for(let t=0;t<n.bones.length;t++){const r=n.bones[t];let a=null;const i=ks(r,"parent",null);if(null!=i&&(a=s.findBone(i),null==a))throw new Error(`Parent bone not found: ${i}`);const o=new Se(s.bones.length,r.name,a);o.length=ks(r,"length",0)*e,o.x=ks(r,"x",0)*e,o.y=ks(r,"y",0)*e,o.rotation=ks(r,"rotation",0),o.scaleX=ks(r,"scaleX",1),o.scaleY=ks(r,"scaleY",1),o.shearX=ks(r,"shearX",0),o.shearY=ks(r,"shearY",0),o.transformMode=v.enumValue(l,ks(r,"transform","Normal")),o.skinRequired=ks(r,"skin",!1);const h=ks(r,"color",null);h&&o.color.setFromString(h),s.bones.push(o)}if(n.slots)for(let t=0;t<n.slots.length;t++){const e=n.slots[t],r=s.findBone(e.bone);if(!r)throw new Error(`Couldn't find bone ${e.bone} for slot ${e.name}`);const a=new Pe(s.slots.length,e.name,r),i=ks(e,"color",null);i&&a.color.setFromString(i);const o=ks(e,"dark",null);o&&(a.darkColor=S.fromString(o)),a.attachmentName=ks(e,"attachment",null),a.blendMode=ps.blendModeFromString(ks(e,"blend","normal")),s.slots.push(a)}if(n.ik)for(let t=0;t<n.ik.length;t++){const r=n.ik[t],a=new De(r.name);a.order=ks(r,"order",0),a.skinRequired=ks(r,"skin",!1);for(let t=0;t<r.bones.length;t++){const e=r.bones[t],n=s.findBone(e);if(null==n)throw new Error(`IK bone not found: ${e}`);a.bones.push(n)}a.target=s.findBone(r.target),a.mix=ks(r,"mix",1),a.softness=ks(r,"softness",0)*e,a.bendDirection=ks(r,"bendPositive",!0)?1:-1,a.compress=ks(r,"compress",!1),a.stretch=ks(r,"stretch",!1),a.uniform=ks(r,"uniform",!1),s.ikConstraints.push(a)}if(n.transform)for(let t=0;t<n.transform.length;t++){const r=n.transform[t],a=new Ne(r.name);a.order=ks(r,"order",0),a.skinRequired=ks(r,"skin",!1);for(let t=0;t<r.bones.length;t++){const e=r.bones[t],n=s.findBone(e);if(!n)throw new Error(`Couldn't find bone ${e} for transform constraint ${r.name}.`);a.bones.push(n)}const i=r.target,o=s.findBone(i);if(!o)throw new Error(`Couldn't find target bone ${i} for transform constraint ${r.name}.`);a.target=o,a.local=ks(r,"local",!1),a.relative=ks(r,"relative",!1),a.offsetRotation=ks(r,"rotation",0),a.offsetX=ks(r,"x",0)*e,a.offsetY=ks(r,"y",0)*e,a.offsetScaleX=ks(r,"scaleX",0),a.offsetScaleY=ks(r,"scaleY",0),a.offsetShearY=ks(r,"shearY",0),a.mixRotate=ks(r,"mixRotate",1),a.mixX=ks(r,"mixX",1),a.mixY=ks(r,"mixY",a.mixX),a.mixScaleX=ks(r,"mixScaleX",1),a.mixScaleY=ks(r,"mixScaleY",a.mixScaleX),a.mixShearY=ks(r,"mixShearY",1),s.transformConstraints.push(a)}if(n.path)for(let t=0;t<n.path.length;t++){const r=n.path[t],a=new Me(r.name);a.order=ks(r,"order",0),a.skinRequired=ks(r,"skin",!1);for(let t=0;t<r.bones.length;t++){const e=r.bones[t],n=s.findBone(e);if(!n)throw new Error(`Couldn't find bone ${e} for path constraint ${r.name}.`);a.bones.push(n)}const i=r.target,l=s.findSlot(i);if(!l)throw new Error(`Couldn't find target slot ${i} for path constraint ${r.name}.`);a.target=l,a.positionMode=v.enumValue(o,ks(r,"positionMode","Percent")),a.spacingMode=v.enumValue(ve,ks(r,"spacingMode","Length")),a.rotateMode=v.enumValue(h,ks(r,"rotateMode","Tangent")),a.offsetRotation=ks(r,"rotation",0),a.position=ks(r,"position",0),a.positionMode==o.Fixed&&(a.position*=e),a.spacing=ks(r,"spacing",0),a.spacingMode!=ve.Length&&a.spacingMode!=ve.Fixed||(a.spacing*=e),a.mixRotate=ks(r,"mixRotate",1),a.mixX=ks(r,"mixX",1),a.mixY=ks(r,"mixY",a.mixX),s.pathConstraints.push(a)}if(n.skins)for(let t=0;t<n.skins.length;t++){const e=n.skins[t],r=new Ve(e.name);if(e.bones)for(let t=0;t<e.bones.length;t++){const n=e.bones[t],a=s.findBone(n);if(!a)throw new Error(`Couldn't find bone ${n} for skin ${e.name}.`);r.bones.push(a)}if(e.ik)for(let t=0;t<e.ik.length;t++){const n=e.ik[t],a=s.findIkConstraint(n);if(!a)throw new Error(`Couldn't find IK constraint ${n} for skin ${e.name}.`);r.constraints.push(a)}if(e.transform)for(let t=0;t<e.transform.length;t++){const n=e.transform[t],a=s.findTransformConstraint(n);if(!a)throw new Error(`Couldn't find transform constraint ${n} for skin ${e.name}.`);r.constraints.push(a)}if(e.path)for(let t=0;t<e.path.length;t++){const n=e.path[t],a=s.findPathConstraint(n);if(!a)throw new Error(`Couldn't find path constraint ${n} for skin ${e.name}.`);r.constraints.push(a)}for(const t in e.attachments){const n=s.findSlot(t);if(!n)throw new Error(`Couldn't find slot ${t} for skin ${e.name}.`);const a=e.attachments[t];for(const t in a){const e=this.readAttachment(a[t],r,n.index,t,s);e&&r.setAttachment(n.index,t,e)}}s.skins.push(r),"default"==r.name&&(s.defaultSkin=r)}for(let t=0,e=this.linkedMeshes.length;t<e;t++){const e=this.linkedMeshes[t],n=e.skin?s.findSkin(e.skin):s.defaultSkin;if(!n)throw new Error(`Skin not found: ${e.skin}`);const r=n.getAttachment(e.slotIndex,e.parent);if(!r)throw new Error(`Parent mesh not found: ${e.parent}`);e.mesh.timelineAttachment=e.inheritTimeline?r:e.mesh,e.mesh.setParentMesh(r)}if(this.linkedMeshes.length=0,n.events)for(const t in n.events){const e=n.events[t],r=new $e(t);r.intValue=ks(e,"int",0),r.floatValue=ks(e,"float",0),r.stringValue=ks(e,"string",""),r.audioPath=ks(e,"audio",null),r.audioPath&&(r.volume=ks(e,"volume",1),r.balance=ks(e,"balance",0)),s.events.push(r)}if(n.animations)for(const t in n.animations){const e=n.animations[t];this.readAnimation(e,t,s)}return s}readAttachment(t,e,s,n,r){const a=this.scale;switch(n=ks(t,"name",n),ks(t,"type","region")){case"region":{const s=ks(t,"path",n),r=this.readSequence(ks(t,"sequence",null)),i=this.attachmentLoader.newRegionAttachment(e,n,s,r);if(!i)return null;
1i.path=s,i.x=ks(t,"x",0)*a,i.y=ks(t,"y",0)*a,i.scaleX=ks(t,"scaleX",1),i.scaleY=ks(t,"scaleY",1),i.rotation=ks(t,"rotation",0),i.width=t.width*a,i.height=t.height*a,i.sequence=r;const o=ks(t,"color",null);return o&&i.color.setFromString(o),i}case"boundingbox":{const s=this.attachmentLoader.newBoundingBoxAttachment(e,n);if(!s)return null;this.readVertices(t,s,t.vertexCount<<1);const r=ks(t,"color",null);return r&&s.color.setFromString(r),s}case"mesh":case"linkedmesh":{const r=ks(t,"path",n),i=this.readSequence(ks(t,"sequence",null)),o=this.attachmentLoader.newMeshAttachment(e,n,r,i);if(!o)return null;o.path=r;const h=ks(t,"color",null);h&&o.color.setFromString(h),o.width=ks(t,"width",0)*a,o.height=ks(t,"height",0)*a,o.sequence=i;const l=ks(t,"parent",null);if(l)return this.linkedMeshes.push(new xs(o,ks(t,"skin",null),s,l,ks(t,"timelines",!0))),o;const c=t.uvs;return this.readVertices(t,o,c.length),o.triangles=t.triangles,o.regionUVs=new Float32Array(c),o.edges=ks(t,"edges",null),o.hullLength=2*ks(t,"hull",0),o}case"path":{const s=this.attachmentLoader.newPathAttachment(e,n);if(!s)return null;s.closed=ks(t,"closed",!1),s.constantSpeed=ks(t,"constantSpeed",!0);const r=t.vertexCount;this.readVertices(t,s,r<<1);const i=v.newArray(r/3,0);for(let e=0;e<t.lengths.length;e++)i[e]=t.lengths[e]*a;s.lengths=i;const o=ks(t,"color",null);return o&&s.color.setFromString(o),s}case"point":{const s=this.attachmentLoader.newPointAttachment(e,n);if(!s)return null;s.x=ks(t,"x",0)*a,s.y=ks(t,"y",0)*a,s.rotation=ks(t,"rotation",0);const r=ks(t,"color",null);return r&&s.color.setFromString(r),s}case"clipping":{const s=this.attachmentLoader.newClippingAttachment(e,n);if(!s)return null;const a=ks(t,"end",null);if(null!=a){const t=r.findSlot(a);if(null==t)throw new Error(`Clipping end slot not found: ${a}`);s.endSlot=t}const i=t.vertexCount;this.readVertices(t,s,i<<1);const o=ks(t,"color",null);return o&&s.color.setFromString(o),s}}return null}readSequence(t){if(null==t)return null;const e=new at(ks(t,"count",0));return e.start=ks(t,"start",1),e.digits=ks(t,"digits",0),e.setupIndex=ks(t,"setup",0),e}readVertices(t,e,s){const n=this.scale;e.worldVerticesLength=s;const r=t.vertices;if(s==r.length){const t=v.toFloatArray(r);if(1!=n)for(let e=0,s=r.length;e<s;e++)t[e]*=n;return void(e.vertices=t)}const a=new Array,i=new Array;for(let t=0,e=r.length;t<e;){const e=r[t++];i.push(e);for(let s=t+4*e;t<s;t+=4)i.push(r[t]),a.push(r[t+1]*n),a.push(r[t+2]*n),a.push(r[t+3])}e.bones=i,e.vertices=v.toFloatArray(a)}readAnimation(t,e,s){const n=this.scale,r=new Array;if(t.slots)for(const e in t.slots){const n=t.slots[e],a=s.findSlot(e);if(!a)throw new Error(`Slot not found: ${e}`);const i=a.index;for(const t in n){const e=n[t];if(!e)continue;const s=e.length;if("attachment"==t){const t=new jt(s,i);for(let n=0;n<s;n++){const s=e[n];t.setFrame(n,ks(s,"time",0),ks(s,"name",null))}r.push(t)}else if("rgba"==t){const t=new Ot(s,s<<2,i);let n=e[0],a=ks(n,"time",0),o=S.fromString(n.color);for(let s=0,r=0;;s++){t.setFrame(s,a,o.r,o.g,o.b,o.a);const i=e[s+1];if(!i){t.shrink(r);break}const h=ks(i,"time",0),l=S.fromString(i.color),c=n.curve;c&&(r=ys(c,t,r,s,0,a,h,o.r,l.r,1),r=ys(c,t,r,s,1,a,h,o.g,l.g,1),r=ys(c,t,r,s,2,a,h,o.b,l.b,1),r=ys(c,t,r,s,3,a,h,o.a,l.a,1)),a=h,o=l,n=i}r.push(t)}else if("rgb"==t){const t=new Ut(s,3*s,i);let n=e[0],a=ks(n,"time",0),o=S.fromString(n.color);for(let s=0,r=0;;s++){t.setFrame(s,a,o.r,o.g,o.b);const i=e[s+1];if(!i){t.shrink(r);break}const h=ks(i,"time",0),l=S.fromString(i.color),c=n.curve;c&&(r=ys(c,t,r,s,0,a,h,o.r,l.r,1),r=ys(c,t,r,s,1,a,h,o.g,l.g,1),r=ys(c,t,r,s,2,a,h,o.b,l.b,1)),a=h,o=l,n=i}r.push(t)}else if("alpha"==t)r.push(ws(e,new _t(s,s,i),0,1));else if("rgba2"==t){const t=new zt(s,7*s,i);let n=e[0],a=ks(n,"time",0),o=S.fromString(n.light),h=S.fromString(n.dark);for(let s=0,r=0;;s++){t.setFrame(s,a,o.r,o.g,o.b,o.a,h.r,h.g,h.b);const i=e[s+1];if(!i){t.shrink(r);break}const l=ks(i,"time",0),c=S.fromString(i.light),d=S.fromString(i.dark),u=n.curve;u&&(r=ys(u,t,r,s,0,a,l,o.r,c.r,1),r=ys(u,t,r,s,1,a,l,o.g,c.g,1),r=ys(u,t,r,s,2,a,l,o.b,c.b,1),r=ys(u,t,r,s,3,a,l,o.a,c.a,1),r=ys(u,t,r,s,4,a,l,h.r,d.r,1),r=ys(u,t,r,s,5,a,l,h.g,d.g,1),r=ys(u,t,r,s,6,a,l,h.b,d.b,1)),a=l,o=c,h=d,n=i}r.push(t)}else if("rgb2"==t){const t=new Ht(s,6*s,i);let n=e[0],a=ks(n,"time",0),o=S.fromString(n.light),h=S.fromString(n.dark);for(let s=0,r=0;;
1s++){t.setFrame(s,a,o.r,o.g,o.b,h.r,h.g,h.b);const i=e[s+1];if(!i){t.shrink(r);break}const l=ks(i,"time",0),c=S.fromString(i.light),d=S.fromString(i.dark),u=n.curve;u&&(r=ys(u,t,r,s,0,a,l,o.r,c.r,1),r=ys(u,t,r,s,1,a,l,o.g,c.g,1),r=ys(u,t,r,s,2,a,l,o.b,c.b,1),r=ys(u,t,r,s,3,a,l,h.r,d.r,1),r=ys(u,t,r,s,4,a,l,h.g,d.g,1),r=ys(u,t,r,s,5,a,l,h.b,d.b,1)),a=l,o=c,h=d,n=i}r.push(t)}}}if(t.bones)for(const e in t.bones){const a=t.bones[e],i=s.findBone(e);if(!i)throw new Error(`Bone not found: ${e}`);const o=i.index;for(const t in a){const e=a[t],s=e.length;if(0!=s)if("rotate"===t)r.push(ws(e,new Xt(s,s,o),0,1));else if("translate"===t){const t=new Bt(s,s<<1,o);r.push(bs(e,t,"x","y",0,n))}else if("translatex"===t){const t=new Pt(s,s,o);r.push(ws(e,t,0,n))}else if("translatey"===t){const t=new Dt(s,s,o);r.push(ws(e,t,0,n))}else if("scale"===t){const t=new Nt(s,s<<1,o);r.push(bs(e,t,"x","y",1,1))}else if("scalex"===t){const t=new Lt(s,s,o);r.push(ws(e,t,1,1))}else if("scaley"===t){const t=new Vt(s,s,o);r.push(ws(e,t,1,1))}else if("shear"===t){const t=new $t(s,s<<1,o);r.push(bs(e,t,"x","y",0,1))}else if("shearx"===t){const t=new Wt(s,s,o);r.push(ws(e,t,0,1))}else if("sheary"===t){const t=new qt(s,s,o);r.push(ws(e,t,0,1))}}}if(t.ik)for(const e in t.ik){const a=t.ik[e];let i=a[0];if(!i)continue;const o=s.findIkConstraint(e);if(!o)throw new Error(`IK Constraint not found: ${e}`);const h=s.ikConstraints.indexOf(o),l=new te(a.length,a.length<<1,h);let c=ks(i,"time",0),d=ks(i,"mix",1),u=ks(i,"softness",0)*n;for(let t=0,e=0;;t++){l.setFrame(t,c,d,u,ks(i,"bendPositive",!0)?1:-1,ks(i,"compress",!1),ks(i,"stretch",!1));const s=a[t+1];if(!s){l.shrink(e);break}const r=ks(s,"time",0),o=ks(s,"mix",1),h=ks(s,"softness",0)*n,m=i.curve;m&&(e=ys(m,l,e,t,0,c,r,d,o,1),e=ys(m,l,e,t,1,c,r,u,h,n)),c=r,d=o,u=h,i=s}r.push(l)}if(t.transform)for(const e in t.transform){const n=t.transform[e];let a=n[0];if(!a)continue;const i=s.findTransformConstraint(e);if(!i)throw new Error(`Transform constraint not found: ${e}`);const o=s.transformConstraints.indexOf(i),h=new ee(n.length,6*n.length,o);let l=ks(a,"time",0),c=ks(a,"mixRotate",1),d=ks(a,"mixX",1),u=ks(a,"mixY",d),m=ks(a,"mixScaleX",1),f=ks(a,"mixScaleY",m);const g=ks(a,"mixShearY",1);for(let t=0,e=0;;t++){h.setFrame(t,l,c,d,u,m,f,g);const s=n[t+1];if(!s){h.shrink(e);break}const r=ks(s,"time",0),i=ks(s,"mixRotate",1),o=ks(s,"mixX",1),p=ks(s,"mixY",o),x=ks(s,"mixScaleX",1),w=ks(s,"mixScaleY",x),b=ks(s,"mixShearY",1),y=a.curve;y&&(e=ys(y,h,e,t,0,l,r,c,i,1),e=ys(y,h,e,t,1,l,r,d,o,1),e=ys(y,h,e,t,2,l,r,u,p,1),e=ys(y,h,e,t,3,l,r,m,x,1),e=ys(y,h,e,t,4,l,r,f,w,1),e=ys(y,h,e,t,5,l,r,g,b,1)),l=r,c=i,d=o,u=p,m=x,f=w,m=x,a=s}r.push(h)}if(t.path)for(const e in t.path){const a=t.path[e],i=s.findPathConstraint(e);if(!i)throw new Error(`Path constraint not found: ${e}`);const h=s.pathConstraints.indexOf(i);for(const t in a){const e=a[t];let s=e[0];if(!s)continue;const l=e.length;if("position"===t){const t=new se(l,l,h);r.push(ws(e,t,0,i.positionMode==o.Fixed?n:1))}else if("spacing"===t){const t=new ne(l,l,h);r.push(ws(e,t,0,i.spacingMode==ve.Length||i.spacingMode==ve.Fixed?n:1))}else if("mix"===t){const t=new re(l,3*l,h);let n=ks(s,"time",0),a=ks(s,"mixRotate",1),i=ks(s,"mixX",1),o=ks(s,"mixY",i);for(let r=0,h=0;;r++){t.setFrame(r,n,a,i,o);const l=e[r+1];if(!l){t.shrink(h);break}const c=ks(l,"time",0),d=ks(l,"mixRotate",1),u=ks(l,"mixX",1),m=ks(l,"mixY",u),f=s.curve;f&&(h=ys(f,t,h,r,0,n,c,a,d,1),h=ys(f,t,h,r,1,n,c,i,u,1),h=ys(f,t,h,r,2,n,c,o,m,1)),n=c,a=d,i=u,o=m,s=l}r.push(t)}}}if(t.deform){t.attachments={};for(const e in t.deform){const s=t.deform[e],n=t.attachments[e]={};for(const t in s){const e=s[t],r=n[t]={};for(const t in e)r[t]={deform:e[t]}}}}if(t.attachments)for(const e in t.attachments){const a=t.attachments[e],i=s.findSkin(e);if(null!=i)for(const t in a){const e=a[t],o=s.findSlot(t);if(!o)throw new Error(`Slot not found: ${t}`);const h=o.index;for(const t in e){const s=e[t],a=i.getAttachment(h,t);for(const t in s){const e=s[t];let i=e[0];if(i)if("deform"==t){const t=a.bones,s=a.vertices,o=t?s.length/3*2:s.length,l=new Gt(e.length,e.length,h,a);let c=ks(i,"time",0);for(let r=0,a=0;;r++){let h;const d=ks(i,"vertices",null);if(d){h=v.newFloatArray(o);const e=ks(i,"offset",0);if(v.arrayCopy(d,0,h,e,d.length),1!=n)for(let t=e,s=t+d.length;t<s;t++)h[t]*=n;
1if(!t)for(let t=0;t<o;t++)h[t]+=s[t]}else h=t?v.newFloatArray(o):s;l.setFrame(r,c,h);const u=e[r+1];if(!u){l.shrink(a);break}const m=ks(u,"time",0),f=i.curve;f&&(a=ys(f,l,a,r,0,c,m,0,1,1)),c=m,i=u}r.push(l)}else if("sequence"==t){const t=new ie(e.length,h,a);let s=0;for(let n=0;n<e.length;n++){const r=ks(i,"delay",s),a=ks(i,"time",0),o=it[ks(i,"mode","hold")],h=ks(i,"index",0);t.setFrame(n,a,o,h,r),s=r,i=e[n+1]}r.push(t)}}}}else if(E)throw new Error(`Skin not found: ${e}`)}if(t.drawOrder){const e=new Qt(t.drawOrder.length),n=s.slots.length;let a=0;for(let r=0;r<t.drawOrder.length;r++,a++){const i=t.drawOrder[r];let o=null;const h=ks(i,"offsets",null);if(h){o=v.newArray(n,-1);const t=v.newArray(n-h.length,0);let e=0,r=0;for(let n=0;n<h.length;n++){const a=h[n],i=s.findSlot(a.slot);if(!i)throw new Error(`Slot not found: ${i}`);const l=i.index;for(;e!=l;)t[r++]=e++;o[e+a.offset]=e++}for(;e<n;)t[r++]=e++;for(let e=n-1;e>=0;e--)-1==o[e]&&(o[e]=t[--r])}e.setFrame(a,ks(i,"time",0),o)}r.push(e)}if(t.events){const e=new Zt(t.events.length);let n=0;for(let r=0;r<t.events.length;r++,n++){const a=t.events[r],i=s.findEvent(a.name);if(!i)throw new Error(`Event not found: ${a.name}`);const o=new Xe(v.toSinglePrecision(ks(a,"time",0)),i);o.intValue=ks(a,"int",i.intValue),o.floatValue=ks(a,"float",i.floatValue),o.stringValue=ks(a,"string",i.stringValue),o.data.audioPath&&(o.volume=ks(a,"volume",1),o.balance=ks(a,"balance",0)),e.setFrame(n,o)}r.push(e)}let a=0;for(let t=0,e=r.length;t<e;t++)a=Math.max(a,r[t].getDuration());if(isNaN(a))throw new Error("Error while parsing animation, duration is NaN");s.animations.push(new ht(e,r,a))}static blendModeFromString(t){if("normal"==(t=t.toLowerCase()))return c.T$.NORMAL;if("additive"==t)return c.T$.ADD;if("multiply"==t)return c.T$.MULTIPLY;if("screen"==t)return c.T$.SCREEN;throw new Error(`Unknown blend mode: ${t}`)}}class xs{constructor(t,e,s,n,r){this.mesh=t,this.skin=e,this.slotIndex=s,this.parent=n,this.inheritTimeline=r}}function ws(t,e,s,n){let r=t[0],a=ks(r,"time",0),i=ks(r,"value",s)*n,o=0;for(let h=0;;h++){e.setFrame(h,a,i);const l=t[h+1];if(!l)return e.shrink(o),e;const c=ks(l,"time",0),d=ks(l,"value",s)*n;r.curve&&(o=ys(r.curve,e,o,h,0,a,c,i,d,n)),a=c,i=d,r=l}}function bs(t,e,s,n,r,a){let i=t[0],o=ks(i,"time",0),h=ks(i,s,r)*a,l=ks(i,n,r)*a,c=0;for(let d=0;;d++){e.setFrame(d,o,h,l);const u=t[d+1];if(!u)return e.shrink(c),e;const m=ks(u,"time",0),f=ks(u,s,r)*a,g=ks(u,n,r)*a,p=i.curve;p&&(c=ys(p,e,c,d,0,o,m,h,f,a),c=ys(p,e,c,d,1,o,m,l,g,a)),o=m,h=f,l=g,i=u}}function ys(t,e,s,n,r,a,i,o,h,l){if("stepped"==t)return e.setStepped(n),s;const c=r<<2,d=t[c],u=t[c+1]*l,m=t[c+2],f=t[c+3]*l;return e.setBezier(s,n,r,a,o,d,u,m,f,i,h),s+1}function ks(t,e,s){return void 0!==t[e]?t[e]:s}class Ss{constructor(t){if(this.animationToMixTime={},this.defaultMix=0,!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,s){const n=this.skeletonData.findAnimation(t);if(!n)throw new Error(`Animation not found: ${t}`);const r=this.skeletonData.findAnimation(e);if(!r)throw new Error(`Animation not found: ${e}`);this.setMixWith(n,r,s)}setMixWith(t,e,s){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");const n=`${t.name}.${e.name}`;this.animationToMixTime[n]=s}getMix(t,e){const s=`${t.name}.${e.name}`,n=this.animationToMixTime[s];return void 0===n?this.defaultMix:n}}class As extends q{createSkeleton(t){this.skeleton=new Re(t),this.skeleton.updateWorldTransform(),this.stateData=new Ss(t),this.state=new he(this.stateData)}}(new class extends H{createBinaryParser(){return new We(null)}createJsonParser(){return new ps(null)}parseData(t,e,s){const n=t;return n.attachmentLoader=new ye(e),{spineData:n.readSkeletonData(s),spineAtlas:e}}}).installLoader()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.