window.SpinePlugin=function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=69)}([function(t,e){function i(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&n.value&&"object"==typeof n.value&&(n=n.value),!(!n||! /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(n))&&(void 0===n.enumerable&&(n.enumerable=!0),void 0===n.configurable&&(n.configurable=!0),n)}function n(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function s(t,e,s,r){for(var o in e)if(e.hasOwnProperty(o)){var h=i(e,o,s);if(!1!==h){if(n((r||t).prototype,o)){if(a.ignoreFinals)continue;throw new Error("cannot override final property '"+o+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,o,h)}else t.prototype[o]=e[o]}}function r(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(34),r=new n({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new r(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return s(this.x,t.x,e)&&s(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return i>0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)},project:function(t){var e=this.dot(t)/t.dot(t);return this.copy(t).scale(e)}});r.ZERO=new r,r.RIGHT=new r(1,0),r.LEFT=new r(-1,0),r.UP=new r(0,-1),r.DOWN=new r(0,1),r.ONE=new r(1,1),t.exports=r},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e){t.exports=function(t,e,i,n){var s=t.length;if(e<0||e>s||e>=i||i>s){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e){t.exports=function(t){if(!t||"object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e){t.exports=function(t,e,i,n){if(!t&&!n||"number"==typeof t)return i;if(t&&t.hasOwnProperty(e))return t[e];if(n&&n.hasOwnProperty(e))return n[e];if(-1!==e.indexOf(".")){for(var s=e.split("."),r=t,a=n,o=i,h=i,l=!0,u=!0,c=0;c=t.length)){for(var i=t.length-1,n=t[e],s=e;s * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(29),r=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=s.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=r},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%n}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t,e,i){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new n(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var i=t.x,n=t.y,s=t.z,r=e.x,a=e.y,o=e.z;return this.x=n*o-s*a,this.y=s*r-i*o,this.z=i*a-n*r,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=i||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,a=t.z;return this.x=i*a-n*r,this.y=n*s-e*a,this.z=e*r-i*s,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this},applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[3]*i+s[6]*n,this.y=s[1]*e+s[4]*i+s[7]*n,this.z=s[2]*e+s[5]*i+s[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=1/(s[3]*e+s[7]*i+s[11]*n+s[15]);return this.x=(s[0]*e+s[4]*i+s[8]*n+s[12])*r,this.y=(s[1]*e+s[5]*i+s[9]*n+s[13])*r,this.z=(s[2]*e+s[6]*i+s[10]*n+s[14])*r,this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=e*s[0]+i*s[3]+n*s[6],this.y=e*s[1]+i*s[4]+n*s[7],this.z=e*s[2]+i*s[5]+n*s[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12],this.y=s[1]*e+s[5]*i+s[9]*n+s[13],this.z=s[2]*e+s[6]*i+s[10]*n+s[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=e*s[0]+i*s[4]+n*s[8]+s[12],a=e*s[1]+i*s[5]+n*s[9]+s[13],o=e*s[2]+i*s[6]+n*s[10]+s[14],h=e*s[3]+i*s[7]+n*s[11]+s[15];return this.x=r/h,this.y=a/h,this.z=o/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,a=t.z,o=t.w,h=o*e+r*n-a*i,l=o*i+a*e-s*n,u=o*n+s*i-r*e,c=-s*e-r*i-a*n;return this.x=h*o+c*-s+l*-a-u*-r,this.y=l*o+c*-r+u*-s-h*-a,this.z=u*o+c*-a+h*-r-l*-s,this},project:function(t){var e=this.x,i=this.y,n=this.z,s=t.val,r=s[0],a=s[1],o=s[2],h=s[3],l=s[4],u=s[5],c=s[6],d=s[7],f=s[8],p=s[9],m=s[10],g=s[11],x=s[12],v=s[13],y=s[14],w=1/(e*h+i*d+n*g+s[15]);return this.x=(e*r+i*l+n*f+x)*w,this.y=(e*a+i*u+n*p+v)*w,this.z=(e*o+i*c+n*m+y)*w,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,a=this.x-i,o=r-this.y-1-n,h=this.z;return this.x=2*a/s-1,this.y=2*o/r-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(26),s=i(61);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=s(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=s(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n,s=i(27),r={chrome:!1,chromeVersion:0,edge:!1,firefox:!1,firefoxVersion:0,ie:!1,ieVersion:0,mobileSafari:!1,opera:!1,safari:!1,safariVersion:0,silk:!1,trident:!1,tridentVersion:0,es2019:!1};t.exports=(n=navigator.userAgent,/Edg\/\d+/.test(n)?(r.edge=!0,r.es2019=!0):/OPR/.test(n)?(r.opera=!0,r.es2019=!0):/Chrome\/(\d+)/.test(n)&&!s.windowsPhone?(r.chrome=!0,r.chromeVersion=parseInt(RegExp.$1,10),r.es2019=r.chromeVersion>69):/Firefox\D+(\d+)/.test(n)?(r.firefox=!0,r.firefoxVersion=parseInt(RegExp.$1,10),r.es2019=r.firefoxVersion>10):/AppleWebKit/.test(n)&&s.iOS?r.mobileSafari=!0:/MSIE (\d+\.\d+);/.test(n)?(r.ie=!0,r.ieVersion=parseInt(RegExp.$1,10)):/Version\/(\d+\.\d+) Safari/.test(n)&&!s.windowsPhone?(r.safari=!0,r.safariVersion=parseInt(RegExp.$1,10),r.es2019=r.safariVersion>10):/Trident\/(\d+\.\d+)(.*)rv:(\d+\.\d+)/.test(n)&&(r.ie=!0,r.trident=!0,r.tridentVersion=parseInt(RegExp.$1,10),r.ieVersion=parseInt(RegExp.$3,10)),/Silk/.test(n)&&(r.silk=!0),r)},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(6),s=function(){var t,e,i,r,a,o,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(3);t.exports=function(t){return t>Math.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(3);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(14),r=new n({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new r(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,n,s,r,a,o,h,l,u,c,d,f,p,m){var g=this.val;return g[0]=t,g[1]=e,g[2]=i,g[3]=n,g[4]=s,g[5]=r,g[6]=a,g[7]=o,g[8]=h,g[9]=l,g[10]=u,g[11]=c,g[12]=d,g[13]=f,g[14]=p,g[15]=m,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var n=a.fromQuat(i).val,s=e.x,r=e.y,o=e.z;return this.setValues(n[0]*s,n[1]*s,n[2]*s,0,n[4]*r,n[5]*r,n[6]*r,0,n[8]*o,n[9]*o,n[10]*o,0,t.x,t.y,t.z,1)},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],s=t[6],r=t[7],a=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=i,t[9]=s,t[11]=t[14],t[12]=n,t[13]=r,t[14]=a,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],m=t[14],g=t[15],x=e*a-i*r,v=e*o-n*r,y=e*h-s*r,w=i*o-n*a,b=i*h-s*a,M=n*h-s*o,A=l*p-u*f,S=l*m-c*f,k=l*g-d*f,E=u*m-c*p,T=u*g-d*p,I=c*g-d*m,R=x*I-v*T+y*E+w*k-b*S+M*A;return R?(R=1/R,this.setValues((a*I-o*T+h*E)*R,(n*T-i*I-s*E)*R,(p*M-m*b+g*w)*R,(c*b-u*M-d*w)*R,(o*k-r*I-h*S)*R,(e*I-n*k+s*S)*R,(m*y-f*M-g*v)*R,(l*M-c*y+d*v)*R,(r*T-a*k+h*A)*R,(i*k-e*T-s*A)*R,(f*b-p*y+g*x)*R,(u*y-l*b-d*x)*R,(a*S-r*E-o*A)*R,(e*E-i*S+n*A)*R,(p*v-f*w-m*x)*R,(l*w-u*v+c*x)*R)):this},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],m=t[14],g=t[15];return this.setValues(a*(c*g-d*m)-u*(o*g-h*m)+p*(o*d-h*c),-(i*(c*g-d*m)-u*(n*g-s*m)+p*(n*d-s*c)),i*(o*g-h*m)-a*(n*g-s*m)+p*(n*h-s*o),-(i*(o*d-h*c)-a*(n*d-s*c)+u*(n*h-s*o)),-(r*(c*g-d*m)-l*(o*g-h*m)+f*(o*d-h*c)),e*(c*g-d*m)-l*(n*g-s*m)+f*(n*d-s*c),-(e*(o*g-h*m)-r*(n*g-s*m)+f*(n*h-s*o)),e*(o*d-h*c)-r*(n*d-s*c)+l*(n*h-s*o),r*(u*g-d*p)-l*(a*g-h*p)+f*(a*d-h*u),-(e*(u*g-d*p)-l*(i*g-s*p)+f*(i*d-s*u)),e*(a*g-h*p)-r*(i*g-s*p)+f*(i*h-s*a),-(e*(a*d-h*u)-r*(i*d-s*u)+l*(i*h-s*a)),-(r*(u*m-c*p)-l*(a*m-o*p)+f*(a*c-o*u)),e*(u*m-c*p)-l*(i*m-n*p)+f*(i*c-n*u),-(e*(a*m-o*p)-r*(i*m-n*p)+f*(i*o-n*a)),e*(a*c-o*u)-r*(i*c-n*u)+l*(i*o-n*a))},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],f=t[12],p=t[13],m=t[14],g=t[15];return(e*a-i*r)*(c*g-d*m)-(e*o-n*r)*(u*g-d*p)+(e*h-s*r)*(u*m-c*p)+(i*o-n*a)*(l*g-d*f)-(i*h-s*a)*(l*m-c*f)+(n*h-s*o)*(l*p-u*f)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],m=e[13],g=e[14],x=e[15],v=t.val,y=v[0],w=v[1],b=v[2],M=v[3];return e[0]=y*i+w*a+b*u+M*p,e[1]=y*n+w*o+b*c+M*m,e[2]=y*s+w*h+b*d+M*g,e[3]=y*r+w*l+b*f+M*x,y=v[4],w=v[5],b=v[6],M=v[7],e[4]=y*i+w*a+b*u+M*p,e[5]=y*n+w*o+b*c+M*m,e[6]=y*s+w*h+b*d+M*g,e[7]=y*r+w*l+b*f+M*x,y=v[8],w=v[9],b=v[10],M=v[11],e[8]=y*i+w*a+b*u+M*p,e[9]=y*n+w*o+b*c+M*m,e[10]=y*s+w*h+b*d+M*g,e[11]=y*r+w*l+b*f+M*x,y=v[12],w=v[13],b=v[14],M=v[15],e[12]=y*i+w*a+b*u+M*p,e[13]=y*n+w*o+b*c+M*m,e[14]=y*s+w*h+b*d+M*g,e[15]=y*r+w*l+b*f+M*x,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,n=e.val,s=i[0],r=i[4],a=i[8],o=i[12],h=i[1],l=i[5],u=i[9],c=i[13],d=i[2],f=i[6],p=i[10],m=i[14],g=i[3],x=i[7],v=i[11],y=i[15],w=n[0],b=n[4],M=n[8],A=n[12],S=n[1],k=n[5],E=n[9],T=n[13],I=n[2],R=n[6],C=n[10],F=n[14],P=n[3],Y=n[7],O=n[11],L=n[15];return this.setValues(s*w+r*S+a*I+o*P,h*w+l*S+u*I+c*P,d*w+f*S+p*I+m*P,g*w+x*S+v*I+y*P,s*b+r*k+a*R+o*Y,h*b+l*k+u*R+c*Y,d*b+f*k+p*R+m*Y,g*b+x*k+v*R+y*Y,s*M+r*E+a*C+o*O,h*M+l*E+u*C+c*O,d*M+f*E+p*C+m*O,g*M+x*E+v*C+y*O,s*A+r*T+a*F+o*L,h*A+l*T+u*F+c*L,d*A+f*T+p*F+m*L,g*A+x*T+v*F+y*L)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),s=1-i,r=t.x,a=t.y,o=t.z,h=s*r,l=s*a;return this.setValues(h*r+i,h*a-n*o,h*o+n*a,0,h*a+n*o,l*a+i,l*o-n*r,0,h*o-n*a,l*o+n*r,s*o*o+i,0,0,0,0,1)},rotate:function(t,e){var i=this.val,n=e.x,s=e.y,r=e.z,a=Math.sqrt(n*n+s*s+r*r);if(Math.abs(a)<1e-6)return this;n*=a=1/a,s*=a,r*=a;var o=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],d=i[2],f=i[3],p=i[4],m=i[5],g=i[6],x=i[7],v=i[8],y=i[9],w=i[10],b=i[11],M=i[12],A=i[13],S=i[14],k=i[15],E=n*n*l+h,T=s*n*l+r*o,I=r*n*l-s*o,R=n*s*l-r*o,C=s*s*l+h,F=r*s*l+n*o,P=n*r*l+s*o,Y=s*r*l-n*o,O=r*r*l+h;return this.setValues(u*E+p*T+v*I,c*E+m*T+y*I,d*E+g*T+w*I,f*E+x*T+b*I,u*R+p*C+v*F,c*R+m*C+y*F,d*R+g*C+w*F,f*R+x*C+b*F,u*P+p*Y+v*O,c*P+m*Y+y*O,d*P+g*Y+w*O,f*P+x*Y+b*O,M,A,S,k)},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[4],r=e[5],a=e[6],o=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=s*n+h*i,e[5]=r*n+l*i,e[6]=a*n+u*i,e[7]=o*n+c*i,e[8]=h*n-s*i,e[9]=l*n-r*i,e[10]=u*n-a*i,e[11]=c*n-o*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],a=e[2],o=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=s*n-h*i,e[1]=r*n-l*i,e[2]=a*n-u*i,e[3]=o*n-c*i,e[8]=s*i+h*n,e[9]=r*i+l*n,e[10]=a*i+u*n,e[11]=o*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),s=e[0],r=e[1],a=e[2],o=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=s*n+h*i,e[1]=r*n+l*i,e[2]=a*n+u*i,e[3]=o*n+c*i,e[4]=h*n-s*i,e[5]=l*n-r*i,e[6]=u*n-a*i,e[7]=c*n-o*i,this},fromRotationTranslation:function(t,e){var i=t.x,n=t.y,s=t.z,r=t.w,a=i+i,o=n+n,h=s+s,l=i*a,u=i*o,c=i*h,d=n*o,f=n*h,p=s*h,m=r*a,g=r*o,x=r*h;return this.setValues(1-(d+p),u+x,c-g,0,u-x,1-(l+p),f+m,0,c+g,f-m,1-(l+d),0,e.x,e.y,e.z,1)},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,a=i+i,o=n+n,h=e*r,l=e*a,u=e*o,c=i*a,d=i*o,f=n*o,p=s*r,m=s*a,g=s*o;return this.setValues(1-(c+f),l+g,u-m,0,l-g,1-(h+f),d+p,0,u+m,d-p,1-(h+c),0,0,0,0,1)},frustum:function(t,e,i,n,s,r){var a=1/(e-t),o=1/(n-i),h=1/(s-r);return this.setValues(2*s*a,0,0,0,0,2*s*o,0,0,(e+t)*a,(n+i)*o,(r+s)*h,-1,0,0,r*s*2*h,0)},perspective:function(t,e,i,n){var s=1/Math.tan(t/2),r=1/(i-n);return this.setValues(s/e,0,0,0,0,s,0,0,0,0,(n+i)*r,-1,0,0,2*n*i*r,0)},perspectiveLH:function(t,e,i,n){return this.setValues(2*i/t,0,0,0,0,2*i/e,0,0,0,0,-n/(i-n),1,0,0,i*n/(i-n),0)},ortho:function(t,e,i,n,s,r){var a=t-e,o=i-n,h=s-r;return a=0===a?a:1/a,o=0===o?o:1/o,h=0===h?h:1/h,this.setValues(-2*a,0,0,0,0,-2*o,0,0,0,0,2*h,0,(t+e)*a,(n+i)*o,(r+s)*h,1)},lookAtRH:function(t,e,i){var n=this.val;return u.subVectors(t,e),0===u.getLengthSquared()&&(u.z=1),u.normalize(),h.crossVectors(i,u),0===h.getLengthSquared()&&(1===Math.abs(i.z)?u.x+=1e-4:u.z+=1e-4,u.normalize(),h.crossVectors(i,u)),h.normalize(),l.crossVectors(u,h),n[0]=h.x,n[1]=h.y,n[2]=h.z,n[4]=l.x,n[5]=l.y,n[6]=l.z,n[8]=u.x,n[9]=u.y,n[10]=u.z,this},lookAt:function(t,e,i){var n=t.x,s=t.y,r=t.z,a=i.x,o=i.y,h=i.z,l=e.x,u=e.y,c=e.z;if(Math.abs(n-l)<1e-6&&Math.abs(s-u)<1e-6&&Math.abs(r-c)<1e-6)return this.identity();var d=n-l,f=s-u,p=r-c,m=1/Math.sqrt(d*d+f*f+p*p),g=o*(p*=m)-h*(f*=m),x=h*(d*=m)-a*p,v=a*f-o*d;(m=Math.sqrt(g*g+x*x+v*v))?(g*=m=1/m,x*=m,v*=m):(g=0,x=0,v=0);var y=f*v-p*x,w=p*g-d*v,b=d*x-f*g;return(m=Math.sqrt(y*y+w*w+b*b))?(y*=m=1/m,w*=m,b*=m):(y=0,w=0,b=0),this.setValues(g,y,d,0,x,w,f,0,v,b,p,0,-(g*n+x*s+v*r),-(y*n+w*s+b*r),-(d*n+f*s+p*r),1)},yawPitchRoll:function(t,e,i){this.zero(),a.zero(),o.zero();var n=this.val,s=a.val,r=o.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),s[0]=1,s[15]=1,s[5]=l,s[10]=l,s[9]=-h,s[6]=h,h=Math.sin(t),l=Math.cos(t),r[5]=1,r[15]=1,r[0]=l,r[2]=-h,r[8]=h,r[10]=l,this.multiplyLocal(a),this.multiplyLocal(o),this},setWorldMatrix:function(t,e,i,n,s){return this.yawPitchRoll(t.y,t.x,t.z),a.scaling(i.x,i.y,i.z),o.xyz(e.x,e.y,e.z),this.multiplyLocal(a),this.multiplyLocal(o),n&&this.multiplyLocal(n),s&&this.multiplyLocal(s),this},multiplyToMat4:function(t,e){var i=this.val,n=t.val,s=i[0],r=i[1],a=i[2],o=i[3],h=i[4],l=i[5],u=i[6],c=i[7],d=i[8],f=i[9],p=i[10],m=i[11],g=i[12],x=i[13],v=i[14],y=i[15],w=n[0],b=n[1],M=n[2],A=n[3],S=n[4],k=n[5],E=n[6],T=n[7],I=n[8],R=n[9],C=n[10],F=n[11],P=n[12],Y=n[13],O=n[14],L=n[15];return e.setValues(w*s+b*h+M*d+A*g,b*r+b*l+M*f+A*x,M*a+b*u+M*p+A*v,A*o+b*c+M*m+A*y,S*s+k*h+E*d+T*g,S*r+k*l+E*f+T*x,S*a+k*u+E*p+T*v,S*o+k*c+E*m+T*y,I*s+R*h+C*d+F*g,I*r+R*l+C*f+F*x,I*a+R*u+C*p+F*v,I*o+R*c+C*m+F*y,P*s+Y*h+O*d+L*g,P*r+Y*l+O*f+L*x,P*a+Y*u+O*p+L*v,P*o+Y*c+O*m+L*y)},fromRotationXYTranslation:function(t,e,i){var n=e.x,s=e.y,r=e.z,a=Math.sin(t.x),o=Math.cos(t.x),h=Math.sin(t.y),l=Math.cos(t.y),u=n,c=s,d=r,f=-a,p=0-f*h,m=0-o*h,g=f*l,x=o*l;return i||(u=l*n+h*r,c=p*n+o*s+g*r,d=m*n+a*s+x*r),this.setValues(l,p,m,0,0,o,a,0,h,g,x,0,u,c,d,1)},getMaxScaleOnAxis:function(){var t=this.val,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,n))}}),a=new r,o=new r,h=new s,l=new s,u=new s;t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(3);t.exports=function(t){return t*n.RAD_TO_DEG}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={ADDED_TO_SCENE:i(187),BOOT:i(188),CREATE:i(189),DESTROY:i(190),PAUSE:i(191),POST_UPDATE:i(192),PRE_RENDER:i(193),PRE_UPDATE:i(194),READY:i(195),REMOVED_FROM_SCENE:i(196),RENDER:i(197),RESUME:i(198),SHUTDOWN:i(199),SLEEP:i(200),START:i(201),TRANSITION_COMPLETE:i(202),TRANSITION_INIT:i(203),TRANSITION_OUT:i(204),TRANSITION_START:i(205),TRANSITION_WAKE:i(206),UPDATE:i(207),WAKE:i(208)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(9),r=i(47),a=i(8),o=i(48),h=i(49),l=i(221),u=i(50),c=new n({initialize:function(t,e){if(this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),!this.type)throw new Error("Invalid File type: "+this.type);this.key=a(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.key)throw new Error("Invalid File key: "+this.key);var n=a(e,"url");void 0===n?n=t.path+i+"."+a(e,"extension",""):"string"!=typeof n||n.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)||(n=t.path+n),this.url=n,this.src="",this.xhrSettings=u(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?s.FILE_POPULATED:s.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){this.linkFile=t,t.linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===s.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=s.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&this.loader.localSchemes.some((function(e){return 0===t.responseURL.indexOf(e)}))&&0===e.target.status,n=!(e.target&&200!==e.target.status)||i;4===t.readyState&&t.status>=400&&t.status<=599&&(n=!1),this.state=s.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,n)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(r.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=s.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=s.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){console.error('Failed to process file: %s "%s"',this.type,this.key),this.state=s.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.data&&this.cache.add(this.key,this.data)},pendingDestroy:function(t){if(this.state!==s.FILE_PENDING_DESTROY){void 0===t&&(t=this.data);var e=this.key,i=this.type;this.loader.emit(r.FILE_COMPLETE,e,i,t),this.loader.emit(r.FILE_KEY_COMPLETE+i+"-"+e,e,i,t),this.loader.flagForRemoval(this),this.state=s.FILE_PENDING_DESTROY}},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e){t.exports=function(t){if(!Array.isArray(t)||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={android:!1,chromeOS:!1,cordova:!1,crosswalk:!1,desktop:!1,ejecta:!1,electron:!1,iOS:!1,iOSVersion:0,iPad:!1,iPhone:!1,kindle:!1,linux:!1,macOS:!1,node:!1,nodeWebkit:!1,pixelRatio:1,webApp:!1,windows:!1,windowsPhone:!1};t.exports=function(){if("function"==typeof importScripts)return i;var t=navigator.userAgent;/Windows/.test(t)?i.windows=!0:/Mac OS/.test(t)&&!/like Mac OS/.test(t)?navigator.maxTouchPoints&&navigator.maxTouchPoints>2?(i.iOS=!0,i.iPad=!0,navigator.appVersion.match(/Version\/(\d+)/),i.iOSVersion=parseInt(RegExp.$1,10)):i.macOS=!0:/Android/.test(t)?i.android=!0:/Linux/.test(t)?i.linux=!0:/iP[ao]d|iPhone/i.test(t)?(i.iOS=!0,navigator.appVersion.match(/OS (\d+)/),i.iOSVersion=parseInt(RegExp.$1,10),i.iPhone=-1!==t.toLowerCase().indexOf("iphone"),i.iPad=-1!==t.toLowerCase().indexOf("ipad")):/Kindle/.test(t)||/\bKF[A-Z][A-Z]+/.test(t)||/Silk.*Mobile Safari/.test(t)?i.kindle=!0:/CrOS/.test(t)&&(i.chromeOS=!0),(/Windows Phone/i.test(t)||/IEMobile/i.test(t))&&(i.android=!1,i.iOS=!1,i.macOS=!1,i.windows=!0,i.windowsPhone=!0);var n=/Silk/.test(t);return(i.windows||i.macOS||i.linux&&!n||i.chromeOS)&&(i.desktop=!0),(i.windowsPhone||/Windows NT/i.test(t)&&/Touch/i.test(t))&&(i.desktop=!1),navigator.standalone&&(i.webApp=!0),"function"!=typeof importScripts&&(void 0!==window.cordova&&(i.cordova=!0),void 0!==window.ejecta&&(i.ejecta=!0)),void 0!==e&&e.versions&&e.versions.node&&(i.node=!0),i.node&&"object"==typeof e.versions&&(i.nodeWebkit=!!e.versions["node-webkit"],i.electron=!!e.versions.electron),/Crosswalk/.test(t)&&(i.crosswalk=!0),i.pixelRatio=window.devicePixelRatio||1,i}()}).call(this,i(298))},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(316),r=i(66),a=i(317),o=i(29),h=i(318),l=i(323),u=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=o.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return s(this,t,e)},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return a(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t){return(t%=2*Math.PI)>=0?t:t+2*Math.PI}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(13);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(13);t.exports=function(t){return n(t,-180,180)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e) * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(36);t.exports=function(t,e){return n(t)/n(e)/n(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e,i,n,s){var r=.5*(n-e),a=.5*(s-i),o=t*t;return(2*i-2*n+r+a)*(t*o)+(-3*i+3*n-2*r-a)*o+r*t+i}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,i,n){var s=Math.cos(n),r=Math.sin(n),a=t.x-e,o=t.y-i;return t.x=a*s-o*r+e,t.y=a*r+o*s+i,t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(2);t.exports=function(t,e,i,s,r,a,o,h){void 0===h&&(h=new n);var l=Math.sin(r),u=Math.cos(r),c=u*a,d=l*a,f=-l*o,p=u*o,m=1/(c*p+f*-d);return h.x=p*m*t+-f*m*e+(s*f-i*p)*m,h.y=c*m*e+-d*m*t+(-s*c+i*d)*m,h}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=l*r-a*h,c=-l*s+a*o,d=h*s-r*o,f=e*u+i*c+n*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*i+n*h)*f,t[2]=(a*i-n*r)*f,t[3]=c*f,t[4]=(l*e-n*o)*f,t[5]=(-a*e+n*s)*f,t[6]=d*f,t[7]=(-h*e+i*o)*f,t[8]=(r*e-i*s)*f,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return t[0]=r*l-a*h,t[1]=n*h-i*l,t[2]=i*a-n*r,t[3]=a*o-s*l,t[4]=e*l-n*o,t[5]=n*s-e*a,t[6]=s*h-r*o,t[7]=i*o-e*h,t[8]=e*r-i*s,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return e*(l*r-a*h)+i*(-l*s+a*o)+n*(h*s-r*o)},multiply:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=t.val,d=c[0],f=c[1],p=c[2],m=c[3],g=c[4],x=c[5],v=c[6],y=c[7],w=c[8];return e[0]=d*i+f*r+p*h,e[1]=d*n+f*a+p*l,e[2]=d*s+f*o+p*u,e[3]=m*i+g*r+x*h,e[4]=m*n+g*a+x*l,e[5]=m*s+g*o+x*u,e[6]=v*i+y*r+w*h,e[7]=v*n+y*a+w*l,e[8]=v*s+y*o+w*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],s=e[2],r=e[3],a=e[4],o=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*r,e[1]=l*n+h*a,e[2]=l*s+h*o,e[3]=l*r-h*i,e[4]=l*a-h*n,e[5]=l*o-h*s,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,s=t.w,r=e+e,a=i+i,o=n+n,h=e*r,l=e*a,u=e*o,c=i*a,d=i*o,f=n*o,p=s*r,m=s*a,g=s*o,x=this.val;return x[0]=1-(c+f),x[3]=l+g,x[6]=u-m,x[1]=l-g,x[4]=1-(h+f),x[7]=d+p,x[2]=u+m,x[5]=d-p,x[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],s=e[1],r=e[2],a=e[3],o=e[4],h=e[5],l=e[6],u=e[7],c=e[8],d=e[9],f=e[10],p=e[11],m=e[12],g=e[13],x=e[14],v=e[15],y=n*h-s*o,w=n*l-r*o,b=n*u-a*o,M=s*l-r*h,A=s*u-a*h,S=r*u-a*l,k=c*g-d*m,E=c*x-f*m,T=c*v-p*m,I=d*x-f*g,R=d*v-p*g,C=f*v-p*x,F=y*C-w*R+b*I+M*T-A*E+S*k;return F?(F=1/F,i[0]=(h*C-l*R+u*I)*F,i[1]=(l*T-o*C-u*E)*F,i[2]=(o*R-h*T+u*k)*F,i[3]=(r*R-s*C-a*I)*F,i[4]=(n*C-r*T+a*E)*F,i[5]=(s*T-n*R-a*k)*F,i[6]=(g*S-x*A+v*M)*F,i[7]=(x*b-m*S-v*w)*F,i[8]=(m*A-g*b+v*y)*F,this):null}});t.exports=n},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(44),r=i(1),a=i(14),o=new Int8Array([1,2,0]),h=new Float32Array([0,0,0]),l=new a(1,0,0),u=new a(0,1,0),c=new a,d=new s,f=new n({initialize:function(t,e,i,n){this.onChangeCallback=r,this.set(t,e,i,n)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,n,s){return void 0===s&&(s=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=n||0),s&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this._x=t*s,this._y=e*s,this._z=i*s,this._w=n*s),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.set(i+e*(t.x-i),n+e*(t.y-n),s+e*(t.z-s),r+e*(t.w-r))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(c.copy(l).cross(t).length()<1e-6&&c.copy(u).cross(t),c.normalize(),this.setAxisAngle(c,Math.PI)):i>.999999?this.set(0,0,0,1):(c.copy(t).cross(e),this._x=c.x,this._y=c.y,this._z=c.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var n=d.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(d).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},multiply:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.x,a=t.y,o=t.z,h=t.w;return this.set(e*h+s*r+i*o-n*a,i*h+s*a+n*r-e*o,n*h+s*o+e*a-i*r,s*h-e*r-i*a-n*o)},slerp:function(t,e){var i=this.x,n=this.y,s=this.z,r=this.w,a=t.x,o=t.y,h=t.z,l=t.w,u=i*a+n*o+s*h+r*l;u<0&&(u=-u,a=-a,o=-o,h=-h,l=-l);var c=1-e,d=e;if(1-u>1e-6){var f=Math.acos(u),p=Math.sin(f);c=Math.sin((1-e)*f)/p,d=Math.sin(e*f)/p}return this.set(c*i+d*a,c*n+d*o,c*s+d*h,c*r+d*l)},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n,r=s?1/s:0;return this.set(-t*r,-e*r,-i*r,n*r)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),a=Math.cos(t);return this.set(e*a+s*r,i*a+n*r,n*a-i*r,s*a-e*r)},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),a=Math.cos(t);return this.set(e*a-n*r,i*a+s*r,n*a+e*r,s*a-i*r)},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,s=this.w,r=Math.sin(t),a=Math.cos(t);return this.set(e*a+i*r,i*a-e*r,n*a+s*r,s*a-n*r)},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},setFromEuler:function(t,e){var i=t.x/2,n=t.y/2,s=t.z/2,r=Math.cos(i),a=Math.cos(n),o=Math.cos(s),h=Math.sin(i),l=Math.sin(n),u=Math.sin(s);switch(t.order){case"XYZ":this.set(h*a*o+r*l*u,r*l*o-h*a*u,r*a*u+h*l*o,r*a*o-h*l*u,e);break;case"YXZ":this.set(h*a*o+r*l*u,r*l*o-h*a*u,r*a*u-h*l*o,r*a*o+h*l*u,e);break;case"ZXY":this.set(h*a*o-r*l*u,r*l*o+h*a*u,r*a*u+h*l*o,r*a*o-h*l*u,e);break;case"ZYX":this.set(h*a*o-r*l*u,r*l*o+h*a*u,r*a*u-h*l*o,r*a*o+h*l*u,e);break;case"YZX":this.set(h*a*o+r*l*u,r*l*o+h*a*u,r*a*u-h*l*o,r*a*o-h*l*u,e);break;case"XZY":this.set(h*a*o-r*l*u,r*l*o-h*a*u,r*a*u+h*l*o,r*a*o+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,n=i[0],s=i[4],r=i[8],a=i[1],o=i[5],h=i[9],l=i[2],u=i[6],c=i[10],d=n+o+c;return d>0?(e=.5/Math.sqrt(d+1),this.set((u-h)*e,(r-l)*e,(a-s)*e,.25/e)):n>o&&n>c?(e=2*Math.sqrt(1+n-o-c),this.set(.25*e,(s+a)/e,(r+l)/e,(u-h)/e)):o>c?(e=2*Math.sqrt(1+o-n-c),this.set((s+a)/e,.25*e,(h+u)/e,(r-l)/e)):(e=2*Math.sqrt(1+c-n-o),this.set((r+l)/e,(h+u)/e,.25*e,(a-s)/e)),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this._x=(i[7]-i[5])*e,this._y=(i[2]-i[6])*e,this._z=(i[3]-i[1])*e;else{var s=0;i[4]>i[0]&&(s=1),i[8]>i[3*s+s]&&(s=2);var r=o[s],a=o[r];e=Math.sqrt(i[3*s+s]-i[3*r+r]-i[3*a+a]+1),h[s]=.5*e,e=.5/e,h[r]=(i[3*r+s]+i[3*s+r])*e,h[a]=(i[3*a+s]+i[3*s+a])*e,this._x=h[0],this._y=h[1],this._z=h[2],this._w=(i[3*a+r]-i[3*r+a])*e}return this.onChangeCallback(this),this}});t.exports=f},function(t,e){(function(){"use strict";var e=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,n=Object.prototype.hasOwnProperty,s={};((e,i)=>{for(var n in i)t(e,n,{get:i[n],enumerable:!0})})(s,{AlphaTimeline:()=>ft,Animation:()=>I,AnimationState:()=>Ct,AnimationStateAdapter:()=>Ot,AnimationStateData:()=>Nt,AssetManager:()=>bi,AssetManagerBase:()=>ue,AtlasAttachmentLoader:()=>re,Attachment:()=>b,AttachmentTimeline:()=>gt,BinaryInput:()=>Ye,BlendMode:()=>Ce,Bone:()=>he,BoneData:()=>ae,BoundingBoxAttachment:()=>Ut,CURRENT:()=>Vt,CanvasTexture:()=>wi,ClippingAttachment:()=>qt,Color:()=>h,ConstraintData:()=>le,CurveTimeline:()=>Q,CurveTimeline1:()=>J,CurveTimeline2:()=>tt,DebugUtils:()=>g,DeformTimeline:()=>xt,Downloader:()=>ce,DrawOrderTimeline:()=>bt,Event:()=>de,EventData:()=>fe,EventQueue:()=>Pt,EventTimeline:()=>yt,EventType:()=>Yt,FIRST:()=>Dt,FakeTexture:()=>$t,HOLD_FIRST:()=>_t,HOLD_MIX:()=>zt,HOLD_SUBSEQUENT:()=>Xt,IkConstraint:()=>pe,IkConstraintData:()=>me,IkConstraintTimeline:()=>Mt,IntSet:()=>r,Interpolation:()=>c,MathUtils:()=>u,MeshAttachment:()=>te,MixBlend:()=>R,MixDirection:()=>C,PathAttachment:()=>ee,PathConstraint:()=>be,PathConstraintData:()=>ge,PathConstraintMixTimeline:()=>Et,PathConstraintPositionTimeline:()=>St,PathConstraintSpacingTimeline:()=>kt,PointAttachment:()=>ie,Pool:()=>x,PositionMode:()=>xe,Pow:()=>d,PowOut:()=>f,RGB2Timeline:()=>mt,RGBA2Timeline:()=>pt,RGBATimeline:()=>ct,RGBTimeline:()=>dt,RegionAttachment:()=>se,RotateMode:()=>ye,RotateTimeline:()=>et,SETUP:()=>Bt,SUBSEQUENT:()=>Lt,ScaleTimeline:()=>rt,ScaleXTimeline:()=>at,ScaleYTimeline:()=>ot,SequenceTimeline:()=>It,ShearTimeline:()=>ht,ShearXTimeline:()=>lt,ShearYTimeline:()=>ut,Skeleton:()=>ke,SkeletonBinary:()=>Pe,SkeletonBounds:()=>ui,SkeletonClipping:()=>di,SkeletonData:()=>Ee,SkeletonJson:()=>fi,SkeletonRenderer:()=>Si,Skin:()=>Ie,SkinEntry:()=>Te,Slot:()=>Me,SlotData:()=>Re,SpacingMode:()=>ve,StringSet:()=>a,Texture:()=>Wt,TextureAtlas:()=>Kt,TextureAtlasPage:()=>Qt,TextureAtlasRegion:()=>Jt,TextureFilter:()=>Gt,TextureRegion:()=>jt,TextureWrap:()=>Ht,TimeKeeper:()=>y,Timeline:()=>Z,TrackEntry:()=>Ft,TransformConstraint:()=>Ae,TransformConstraintData:()=>Fe,TransformConstraintTimeline:()=>At,TransformMode:()=>oe,TranslateTimeline:()=>it,TranslateXTimeline:()=>nt,TranslateYTimeline:()=>st,Triangulator:()=>ci,Utils:()=>m,Vector2:()=>v,VertexAttachment:()=>A,WindowedMean:()=>w});var r=class{constructor(){this.array=new Array}add(t){let e=this.contains(t);return this.array[0|t]=0|t,!e}contains(t){return null!=this.array[0|t]}remove(t){this.array[0|t]=void 0}clear(){this.array.length=0}},a=class{constructor(){this.entries={},this.size=0}add(t){let e=this.entries[t];return this.entries[t]=!0,!e&&(this.size++,!0)}addAll(t){let e=this.size;for(var i=0,n=t.length;i1&&(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 o).setFromString(t)}},h=o;h.WHITE=new o(1,1,1,1),h.RED=new o(1,0,0,1),h.GREEN=new o(0,1,0,1),h.BLUE=new o(0,0,1,1),h.MAGENTA=new o(1,0,1,1);var l=class{static clamp(t,e,i){return ti?i:t}static cosDeg(t){return Math.cos(t*l.degRad)}static sinDeg(t){return Math.sin(t*l.degRad)}static signum(t){return t>0?1:t<0?-1:0}static toInt(t){return t>0?Math.floor(t):Math.ceil(t)}static cbrt(t){let e=Math.pow(Math.abs(t),1/3);return t<0?-e:e}static randomTriangular(t,e){return l.randomTriangularWith(t,e,.5*(t+e))}static randomTriangularWith(t,e,i){let n=Math.random(),s=e-t;return n<=(i-t)/s?t+Math.sqrt(n*s*(i-t)):e-Math.sqrt((1-n)*s*(e-i))}static isPowerOfTwo(t){return t&&0==(t&t-1)}},u=l;u.PI=3.1415927,u.PI2=2*l.PI,u.radiansToDegrees=180/l.PI,u.radDeg=l.radiansToDegrees,u.degreesToRadians=l.PI/180,u.degRad=l.degreesToRadians;var c=class{apply(t,e,i){return t+(e-t)*this.applyInternal(i)}},d=class extends c{constructor(t){super(),this.power=2,this.power=t}applyInternal(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1}},f=class extends d{constructor(t){super(t)}applyInternal(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1}},p=class{static arrayCopy(t,e,i,n,s){for(let r=e,a=n;r=e?t:p.setArraySize(t,e,i)}static newArray(t,e){let i=new Array(t);for(let n=0;n0?this.items.pop():this.instantiator()}free(t){t.reset&&t.reset(),this.items.push(t)}freeAll(t){for(let e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)}},w=class{constructor(t=32){this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}hasEnoughData(){return this.addedValues>=this.values.length}addValue(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0}getMean(){if(this.hasEnoughData()){if(this.dirty){let t=0;for(let e=0;e>1)*r;let a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(!l){o.length>0&&(h=o);let a=t.bone,l=a.worldX,u=a.worldY,c=a.a,d=a.b,f=a.c,p=a.d;for(let t=e,a=s;a=this.regions.length&&(i=this.regions.length-1);let n=this.regions[i];e.region!=n&&(e.region=n,e.updateRegion())}getPath(t,e){let i=t,n=(this.start+e).toString();for(let t=this.digits-n.length;t>0;t--)i+="0";return i+=n,i}static nextID(){return S._nextID++}},k=S;k._nextID=0;var E=(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))(E||{}),T=[0,1,2,3,4,5,6],I=class{constructor(t,e,i){if(this.timelines=[],this.timelineIds=new a,!t)throw new Error("name cannot be null.");this.name=t,this.setTimelines(e),this.duration=i}setTimelines(t){if(!t)throw new Error("timelines cannot be null.");this.timelines=t,this.timelineIds.clear();for(var e=0;e0&&(e%=this.duration));let h=this.timelines;for(let n=0,l=h.length;n(t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",t))(R||{}),C=(t=>(t[t.mixIn=0]="mixIn",t[t.mixOut=1]="mixOut",t))(C||{}),F=0,P=1,Y=2,O=3,L=4,D=5,X=6,_=7,z=8,B=9,V=10,N=11,U=12,q=13,W=14,G=15,H=16,j=17,$=18,K=19,Z=class{constructor(t,e){this.propertyIds=e,this.frames=m.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){let i=t.length;for(let n=1;ne)return n-1;return i-1}static search(t,e,i){let n=t.length;for(let s=i;se)return s-i;return n-i}},Q=class extends Z{constructor(t,e,i){super(t,i),this.curves=m.newFloatArray(t+18*e),this.curves[t-1]=1}setLinear(t){this.curves[t]=0}setStepped(t){this.curves[t]=1}shrink(t){let e=this.getFrameCount()+18*t;if(this.curves.length>e){let t=m.newFloatArray(e);m.arrayCopy(this.curves,0,t,0,e),this.curves=t}}setBezier(t,e,i,n,s,r,a,o,h,l,u){let c=this.curves,d=this.getFrameCount()+18*t;0==i&&(c[e]=2+d);let f=.03*(n-2*r+o),p=.03*(s-2*a+h),m=.006*(3*(r-o)-n+l),g=.006*(3*(a-h)-s+u),x=2*f+m,v=2*p+g,y=.3*(r-n)+f+.16666667*m,w=.3*(a-s)+p+.16666667*g,b=n+y,M=s+w;for(let t=d+18;dt){let r=this.frames[e],a=this.frames[e+i];return a+(t-r)/(s[n]-r)*(s[n+1]-a)}let r=n+18;for(n+=2;n=t){let e=s[n-2],i=s[n-1];return i+(t-e)/(s[n]-e)*(s[n+1]-i)}e+=this.getFrameEntries();let a=s[r-2],o=s[r-1];return o+(t-a)/(this.frames[e]-a)*(this.frames[e+i]-o)}},J=class extends Q{constructor(t,e,i){super(t,e,[i])}getFrameEntries(){return 2}setFrame(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+1]=i}getCurveValue(t){let e=this.frames,i=e.length-2;for(let n=2;n<=i;n+=2)if(e[n]>t){i=n-2;break}let n=this.curves[i>>1];switch(n){case 0:let n=e[i],s=e[i+1];return s+(t-n)/(e[i+2]-n)*(e[i+2+1]-s);case 1:return e[i+1]}return this.getBezierValue(t,i,1,n-2)}},tt=class extends Q{constructor(t,e,i,n){super(t,e,[i,n])}getFrameEntries(){return 3}setFrame(t,e,i,n){t*=3,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=n}},et=class extends J{constructor(t,e,i){super(t,e,F+"|"+i),this.boneIndex=0,this.boneIndex=i}apply(t,e,i,n,s,r,a){let o=t.bones[this.boneIndex];if(!o.active)return;if(i>2];switch(p){case 0:let t=h[f];u=h[f+1],c=h[f+2],d=h[f+3];let e=(i-t)/(h[f+4]-t);u+=(h[f+4+1]-u)*e,c+=(h[f+4+2]-c)*e,d+=(h[f+4+3]-d)*e;break;case 1:u=h[f+1],c=h[f+2],d=h[f+3];break;default:u=this.getBezierValue(i,f,1,p-2),c=this.getBezierValue(i,f,2,p+18-2),d=this.getBezierValue(i,f,3,p+36-2)}if(1==s)l.r=u,l.g=c,l.b=d;else{if(0==r){let t=o.data.color;l.r=t.r,l.g=t.g,l.b=t.b}l.r+=(u-l.r)*s,l.g+=(c-l.g)*s,l.b+=(d-l.b)*s}}},ft=class extends J{constructor(t,e,i){super(t,e,z+"|"+i),this.slotIndex=0,this.slotIndex=i}apply(t,e,i,n,s,r,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.color;if(i>3];switch(y){case 0:let t=h[v];c=h[v+1],d=h[v+2],f=h[v+3],p=h[v+4],m=h[v+5],g=h[v+6],x=h[v+7];let e=(i-t)/(h[v+8]-t);c+=(h[v+8+1]-c)*e,d+=(h[v+8+2]-d)*e,f+=(h[v+8+3]-f)*e,p+=(h[v+8+4]-p)*e,m+=(h[v+8+5]-m)*e,g+=(h[v+8+6]-g)*e,x+=(h[v+8+7]-x)*e;break;case 1:c=h[v+1],d=h[v+2],f=h[v+3],p=h[v+4],m=h[v+5],g=h[v+6],x=h[v+7];break;default:c=this.getBezierValue(i,v,1,y-2),d=this.getBezierValue(i,v,2,y+18-2),f=this.getBezierValue(i,v,3,y+36-2),p=this.getBezierValue(i,v,4,y+54-2),m=this.getBezierValue(i,v,5,y+72-2),g=this.getBezierValue(i,v,6,y+90-2),x=this.getBezierValue(i,v,7,y+108-2)}if(1==s)l.set(c,d,f,p),u.r=m,u.g=g,u.b=x;else{if(0==r){l.setFromColor(o.data.color);let t=o.data.darkColor;u.r=t.r,u.g=t.g,u.b=t.b}l.add((c-l.r)*s,(d-l.g)*s,(f-l.b)*s,(p-l.a)*s),u.r+=(m-u.r)*s,u.g+=(g-u.g)*s,u.b+=(x-u.b)*s}}},mt=class extends Q{constructor(t,e,i){super(t,e,[_+"|"+i,B+"|"+i]),this.slotIndex=0,this.slotIndex=i}getFrameEntries(){return 7}setFrame(t,e,i,n,s,r,a,o){t*=7,this.frames[t]=e,this.frames[t+1]=i,this.frames[t+2]=n,this.frames[t+3]=s,this.frames[t+4]=r,this.frames[t+5]=a,this.frames[t+6]=o}apply(t,e,i,n,s,r,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=this.frames,l=o.color,u=o.darkColor;if(it){let s=this.frames[e];return i[n+1]*(t-s)/(i[n]-s)}let s=n+18;for(n+=2;n=t){let e=i[n-2],s=i[n-1];return s+(t-e)/(i[n]-e)*(i[n+1]-s)}let r=i[s-2],a=i[s-1];return a+(1-a)*(t-r)/(this.frames[e+this.getFrameEntries()]-r)}apply(t,e,i,n,s,r,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.getAttachment();if(!h)return;if(!(h instanceof A)||h.timelineAttachment!=this.attachment)return;let l=o.deform;0==l.length&&(r=0);let u=this.vertices,c=u[0].length,d=this.frames;if(i=d[d.length-1]){let t=u[d.length-1];if(1==s)if(3==r){let e=h;if(e.bones)for(let e=0;ei)this.apply(t,e,Number.MAX_VALUE,n,s,r,a),e=-1;else if(e>=o[h-1])return;if(i0&&o[l-1]==t;)l--}for(;l=o[l];l++)n.push(this.events[l])}},yt=vt;yt.propertyIds=[""+U];var wt=class extends Z{constructor(t){super(t,wt.propertyIds),this.drawOrders=new Array(t)}getFrameCount(){return this.frames.length}setFrame(t,e,i){this.frames[t]=e,this.drawOrders[t]=i}apply(t,e,i,n,s,r,a){if(1==a)return void(0==r&&m.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length));if(i>2];switch(f){case 0:let t=c[d];h=c[d+1],l=c[d+2],u=c[d+3];let e=(i-t)/(c[d+4]-t);h+=(c[d+4+1]-h)*e,l+=(c[d+4+2]-l)*e,u+=(c[d+4+3]-u)*e;break;case 1:h=c[d+1],l=c[d+2],u=c[d+3];break;default:h=this.getBezierValue(i,d,1,f-2),l=this.getBezierValue(i,d,2,f+18-2),u=this.getBezierValue(i,d,3,f+36-2)}if(0==r){let t=o.data;o.mixRotate=t.mixRotate+(h-t.mixRotate)*s,o.mixX=t.mixX+(l-t.mixX)*s,o.mixY=t.mixY+(u-t.mixY)*s}else o.mixRotate+=(h-o.mixRotate)*s,o.mixX+=(l-o.mixX)*s,o.mixY+=(u-o.mixY)*s}},Tt=class extends Z{constructor(t,e,i){super(t,[K+"|"+e+"|"+i.sequence.id]),this.slotIndex=e,this.attachment=i}getFrameEntries(){return Tt.ENTRIES}getSlotIndex(){return this.slotIndex}getAttachment(){return this.attachment}setFrame(t,e,i,n,s){let r=this.frames;r[t*=Tt.ENTRIES]=e,r[t+Tt.MODE]=i|n<<4,r[t+Tt.DELAY]=s}apply(t,e,i,n,s,r,a){let o=t.slots[this.slotIndex];if(!o.bone.active)return;let h=o.attachment,l=this.attachment;if(!(h==l||h instanceof A&&h.timelineAttachment==l))return;let u=this.frames;if(i>4,g=this.attachment.sequence.regions.length,x=T[15&f];if(0!=x)switch(m+=(i-d)/p+1e-5|0,x){case 1:m=Math.min(g-1,m);break;case 2:m%=g;break;case 3:{let t=(g<<1)-2;m=0==t?0:m%t,m>=g&&(m=t-m);break}case 4:m=Math.max(g-1-m,0);break;case 5:m=g-1-m%g;break;case 6:{let t=(g<<1)-2;m=0==t?0:(m+g-1)%t,m>=g&&(m=t-m)}}o.sequenceIndex=m}},It=Tt;It.ENTRIES=3,It.MODE=1,It.DELAY=2;var Rt=class{constructor(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new Pt(this),this.propertyIDs=new a,this.animationsChanged=!1,this.trackEntryPool=new x(()=>new Ft),this.data=t}static emptyAnimation(){return Rt._emptyAnimation}update(t){t*=this.timeScale;let e=this.tracks;for(let i=0,n=e.length;i0){if(n.delay-=s,n.delay>0)continue;s=-n.delay,n.delay=0}let r=n.next;if(r){let e=n.trackLast-r.delay;if(e>=0){for(r.delay=0,r.trackTime+=0==n.timeScale?0:(e/n.timeScale+t)*r.timeScale,n.trackTime+=s,this.setCurrent(i,r,!0);r.mixingFrom;)r.mixTime+=t,r=r.mixingFrom;continue}}else if(n.trackLast>=n.trackEnd&&!n.mixingFrom){e[i]=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+=s}this.queue.drain()}updateMixingFrom(t,e){let i=t.mixingFrom;if(!i)return!0;let n=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=i.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=i.mixingFrom,i.mixingFrom&&(i.mixingFrom.mixingTo=t),t.interruptAlpha=i.interruptAlpha,this.queue.end(i)),n):(i.trackTime+=e*i.timeScale,t.mixTime+=e,!1)}apply(t){if(!t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();let e=this.events,i=this.tracks,n=!1;for(let r=0,a=i.length;r0)continue;n=!0;let o=0==r?1:a.mixBlend,h=a.alpha;a.mixingFrom?h*=this.applyMixingFrom(a,t,o):a.trackTime>=a.trackEnd&&!a.next&&(h=0);let l=a.animationLast,u=a.getAnimationTime(),c=u,d=e;a.reverse&&(c=a.animation.duration-c,d=null);let f=a.animation.timelines,p=f.length;if(0==r&&1==h||3==o)for(let e=0;e1&&(s=1),1!=i&&(i=n.mixBlend));let r=s0&&this.queueEvents(n,d),this.events.length=0,n.nextAnimationLast=d,n.nextTrackLast=n.trackTime,s}applyAttachmentTimeline(t,e,i,n,s){var r=e.slots[t.slotIndex];r.bone.active&&(i0,n=t>=0;u.signum(e)!=u.signum(f)&&Math.abs(e)<=90&&(Math.abs(t)>180&&(t+=360*u.signum(t)),n=i),d=f+t-t%360,n!=i&&(d+=360*u.signum(t)),r[a]=d}r[a+1]=f,h.rotation=l+d*n}queueEvents(t,e){let i=t.animationStart,n=t.animationEnd,s=n-i,r=t.trackLast%s,a=this.events,o=0,h=a.length;for(;on||this.queue.event(t,e)}let l=!1;for(l=t.loop?0==s||r>t.trackTime%s:e>=n&&t.animationLast=this.tracks.length)return;let e=this.tracks[t];if(!e)return;this.queue.end(e),this.clearNext(e);let i=e;for(;;){let t=i.mixingFrom;if(!t)break;this.queue.end(t),i.mixingFrom=null,i.mixingTo=null,i=t}this.tracks[e.trackIndex]=null,this.queue.drain()}setCurrent(t,e,i){let n=this.expandToIndex(t);this.tracks[t]=e,e.previous=null,n&&(i&&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,i=!1){let n=this.data.skeletonData.findAnimation(e);if(!n)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,n,i)}setAnimationWith(t,e,i=!1){if(!e)throw new Error("animation cannot be null.");let n=!0,s=this.expandToIndex(t);s&&(-1==s.nextTrackLast?(this.tracks[t]=s.mixingFrom,this.queue.interrupt(s),this.queue.end(s),this.clearNext(s),s=s.mixingFrom,n=!1):this.clearNext(s));let r=this.trackEntry(t,e,i,s);return this.setCurrent(t,r,n),this.queue.drain(),r}addAnimation(t,e,i=!1,n=0){let s=this.data.skeletonData.findAnimation(e);if(!s)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,s,i,n)}addAnimationWith(t,e,i=!1,n=0){if(!e)throw new Error("animation cannot be null.");let s=this.expandToIndex(t);if(s)for(;s.next;)s=s.next;let r=this.trackEntry(t,e,i,s);return s?(s.next=r,r.previous=s,n<=0&&(n+=s.getTrackComplete()-r.mixDuration)):(this.setCurrent(t,r,!0),this.queue.drain()),r.delay=n,r}setEmptyAnimation(t,e=0){let i=this.setAnimationWith(t,Rt.emptyAnimation(),!1);return i.mixDuration=e,i.trackEnd=e,i}addEmptyAnimation(t,e=0,i=0){let n=this.addAnimationWith(t,Rt.emptyAnimation(),!1,i);return i<=0&&(n.delay+=n.mixDuration-e),n.mixDuration=e,n.trackEnd=e,n}setEmptyAnimations(t=0){let e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(let e=0,i=this.tracks.length;e0){s[o]=zt,r[o]=i;continue t}break}s[o]=_t}else s[o]=Lt}}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){let e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)}clearListeners(){this.listeners.length=0}clearListenerNotifications(){this.queue.clear()}},Ct=Rt;Ct._emptyAnimation=new I("",[],0);var Ft=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=2,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){let 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(){let t=this.animationEnd-this.animationStart;if(0!=t){if(this.loop)return t*(1+(this.trackTime/t|0));if(this.trackTime(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))(Yt||{}),Ot=class{start(t){}interrupt(t){}end(t){}dispose(t){}complete(t){}event(t,e){}},Lt=0,Dt=1,Xt=2,_t=3,zt=4,Bt=1,Vt=2,Nt=class{constructor(t){if(this.animationToMixTime={},this.defaultMix=0,!t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}setMix(t,e,i){let n=this.skeletonData.findAnimation(t);if(!n)throw new Error("Animation not found: "+t);let s=this.skeletonData.findAnimation(e);if(!s)throw new Error("Animation not found: "+e);this.setMixWith(n,s,i)}setMixWith(t,e,i){if(!t)throw new Error("from cannot be null.");if(!e)throw new Error("to cannot be null.");let n=t.name+"."+e.name;this.animationToMixTime[n]=i}getMix(t,e){let i=t.name+"."+e.name,n=this.animationToMixTime[i];return void 0===n?this.defaultMix:n}},Ut=class extends A{constructor(t){super(t),this.color=new h(1,1,1,1)}copy(){let t=new Ut(this.name);return this.copyTo(t),t.color.setFromColor(this.color),t}},qt=class extends A{constructor(t){super(t),this.endSlot=null,this.color=new h(.2275,.2275,.8078,1)}copy(){let t=new qt(this.name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t}},Wt=class{constructor(t){this._image=t}getImage(){return this._image}},Gt=(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))(Gt||{}),Ht=(t=>(t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat",t))(Ht||{}),jt=class{constructor(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.degrees=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0}},$t=class extends Wt{setFilters(t,e){}setWraps(t,e){}dispose(){}},Kt=class{constructor(t){this.pages=new Array,this.regions=new Array;let e=new Zt(t),i=new Array(4),n={size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},format:()=>{},filter:t=>{t.minFilter=m.enumValue(Gt,i[1]),t.magFilter=m.enumValue(Gt,i[2])},repeat:t=>{-1!=i[1].indexOf("x")&&(t.uWrap=10497),-1!=i[1].indexOf("y")&&(t.vWrap=10497)},pma:t=>{t.pma="true"==i[1]}};var s={xy:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2])},size:t=>{t.width=parseInt(i[1]),t.height=parseInt(i[2])},bounds:t=>{t.x=parseInt(i[1]),t.y=parseInt(i[2]),t.width=parseInt(i[3]),t.height=parseInt(i[4])},offset:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2])},orig:t=>{t.originalWidth=parseInt(i[1]),t.originalHeight=parseInt(i[2])},offsets:t=>{t.offsetX=parseInt(i[1]),t.offsetY=parseInt(i[2]),t.originalWidth=parseInt(i[3]),t.originalHeight=parseInt(i[4])},rotate:t=>{let e=i[1];"true"==e?t.degrees=90:"false"!=e&&(t.degrees=parseInt(e))},index:t=>{t.index=parseInt(i[1])}};let r=e.readLine();for(;r&&0==r.trim().length;)r=e.readLine();for(;r&&0!=r.trim().length&&0!=e.readEntry(i,r);)r=e.readLine();let a=null,o=null,h=null;for(;null!==r;)if(0==r.trim().length)a=null,r=e.readLine();else if(a){let t=new Jt(a,r);for(;;){let n=e.readEntry(i,r=e.readLine());if(0==n)break;let a=s[i[0]];if(a)a(t);else{o||(o=[]),h||(h=[]),o.push(i[0]);let t=[];for(let e=0;e0&&h&&h.length>0&&(t.names=o,t.values=h,o=null,h=null),t.u=t.x/a.width,t.v=t.y/a.height,90==t.degrees?(t.u2=(t.x+t.height)/a.width,t.v2=(t.y+t.width)/a.height):(t.u2=(t.x+t.width)/a.width,t.v2=(t.y+t.height)/a.height),this.regions.push(t)}else{for(a=new Qt(r.trim());0!=e.readEntry(i,r=e.readLine());){let t=n[i[0]];t&&t(a)}this.pages.push(a)}}findRegion(t){for(let e=0;e=this.lines.length?null:this.lines[this.index++]}readEntry(t,e){if(!e)return 0;if(0==(e=e.trim()).length)return 0;let i=e.indexOf(":");if(-1==i)return 0;t[0]=e.substr(0,i).trim();for(let n=1,s=i+1;;n++){let i=e.indexOf(",",s);if(-1==i)return t[n]=e.substr(s).trim(),n;if(t[n]=e.substr(s,i-s).trim(),s=i+1,4==n)return 4}}},Qt=class{constructor(t){this.minFilter=9728,this.magFilter=9728,this.uWrap=33071,this.vWrap=33071,this.texture=null,this.width=0,this.height=0,this.pma=!1,this.name=t}setTexture(t){this.texture=t,t.setFilters(this.minFilter,this.magFilter),t.setWraps(this.uWrap,this.vWrap)}},Jt=class extends jt{constructor(t,e){super(),this.x=0,this.y=0,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0,this.index=0,this.degrees=0,this.names=null,this.values=null,this.page=t,this.name=e}},te=class extends A{constructor(t,e){super(t),this.region=null,this.regionUVs=[],this.uvs=[],this.triangles=[],this.color=new h(1,1,1,1),this.width=0,this.height=0,this.hullLength=0,this.edges=[],this.parentMesh=null,this.sequence=null,this.tempColor=new h(0,0,0,0),this.path=e}updateRegion(){if(!this.region)throw new Error("Region not set.");let t=this.regionUVs;this.uvs&&this.uvs.length==t.length||(this.uvs=m.newFloatArray(t.length));let e=this.uvs,i=this.uvs.length,n=this.region.u,s=this.region.v,r=0,a=0;if(this.region instanceof Jt){let o=this.region,h=o.page.texture.getImage(),l=h.width,u=h.height;switch(o.degrees){case 90:n-=(o.originalHeight-o.offsetY-o.height)/l,s-=(o.originalWidth-o.offsetX-o.width)/u,r=o.originalHeight/l,a=o.originalWidth/u;for(let o=0;o= 0.");if(!e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=i}},oe=(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))(oe||{}),he=class{constructor(t,e,i){if(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.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=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=i,this.setToSetupPose()}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,i,n,s,r,a){this.ax=t,this.ay=e,this.arotation=i,this.ascaleX=n,this.ascaleY=s,this.ashearX=r,this.ashearY=a;let o=this.parent;if(!o){let o=this.skeleton,h=i+90+a,l=o.scaleX,c=o.scaleY;return this.a=u.cosDeg(i+r)*n*l,this.b=u.cosDeg(h)*s*l,this.c=u.sinDeg(i+r)*n*c,this.d=u.sinDeg(h)*s*c,this.worldX=t*l+o.x,void(this.worldY=e*c+o.y)}let h=o.a,l=o.b,c=o.c,d=o.d;switch(this.worldX=h*t+l*e+o.worldX,this.worldY=c*t+d*e+o.worldY,this.data.transformMode){case 0:{let t=i+90+a,e=u.cosDeg(i+r)*n,o=u.cosDeg(t)*s,f=u.sinDeg(i+r)*n,p=u.sinDeg(t)*s;return this.a=h*e+l*f,this.b=h*o+l*p,this.c=c*e+d*f,void(this.d=c*o+d*p)}case 1:{let t=i+90+a;this.a=u.cosDeg(i+r)*n,this.b=u.cosDeg(t)*s,this.c=u.sinDeg(i+r)*n,this.d=u.sinDeg(t)*s;break}case 2:{let t=h*h+c*c,e=0;t>1e-4?(t=Math.abs(h*d-l*c)/t,h/=this.skeleton.scaleX,c/=this.skeleton.scaleY,l=c*t,d=h*t,e=Math.atan2(c,h)*u.radDeg):(h=0,c=0,e=90-Math.atan2(d,l)*u.radDeg);let o=i+r-e,f=i+a-e+90,p=u.cosDeg(o)*n,m=u.cosDeg(f)*s,g=u.sinDeg(o)*n,x=u.sinDeg(f)*s;this.a=h*p-l*g,this.b=h*m-l*x,this.c=c*p+d*g,this.d=c*m+d*x;break}case 3:case 4:{let t=u.cosDeg(i),e=u.sinDeg(i),o=(h*t+l*e)/this.skeleton.scaleX,f=(c*t+d*e)/this.skeleton.scaleY,p=Math.sqrt(o*o+f*f);p>1e-5&&(p=1/p),o*=p,f*=p,p=Math.sqrt(o*o+f*f),3==this.data.transformMode&&h*d-l*c<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(p=-p);let m=Math.PI/2+Math.atan2(f,o),g=Math.cos(m)*p,x=Math.sin(m)*p,v=u.cosDeg(r)*n,y=u.cosDeg(90+a)*s,w=u.sinDeg(r)*n,b=u.sinDeg(90+a)*s;this.a=o*v+g*w,this.b=o*y+g*b,this.c=f*v+x*w,this.d=f*y+x*b;break}}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY}setToSetupPose(){let 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.c,this.a)*u.radDeg}getWorldRotationY(){return Math.atan2(this.d,this.b)*u.radDeg}getWorldScaleX(){return Math.sqrt(this.a*this.a+this.c*this.c)}getWorldScaleY(){return Math.sqrt(this.b*this.b+this.d*this.d)}updateAppliedTransform(){let t=this.parent;if(!t)return this.ax=this.worldX-this.skeleton.x,this.ay=this.worldY-this.skeleton.y,this.arotation=Math.atan2(this.c,this.a)*u.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*u.radDeg);let e=t.a,i=t.b,n=t.c,s=t.d,r=1/(e*s-i*n),a=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=a*s*r-o*i*r,this.ay=o*e*r-a*n*r;let h=r*s,l=r*e,c=r*i,d=r*n,f=h*this.a-c*this.c,p=h*this.b-c*this.d,m=l*this.c-d*this.a,g=l*this.d-d*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+m*m),this.ascaleX>1e-4){let t=f*g-p*m;this.ascaleY=t/this.ascaleX,this.ashearY=Math.atan2(f*p+m*g,t)*u.radDeg,this.arotation=Math.atan2(m,f)*u.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+g*g),this.ashearY=0,this.arotation=90-Math.atan2(g,p)*u.radDeg}worldToLocal(t){let e=1/(this.a*this.d-this.b*this.c),i=t.x-this.worldX,n=t.y-this.worldY;return t.x=i*this.d*e-n*this.b*e,t.y=n*this.a*e-i*this.c*e,t}localToWorld(t){let e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t}worldToLocalRotation(t){let e=u.sinDeg(t),i=u.cosDeg(t);return Math.atan2(this.a*e-this.c*i,this.d*i-this.b*e)*u.radDeg+this.rotation-this.shearX}localToWorldRotation(t){t-=this.rotation-this.shearX;let e=u.sinDeg(t),i=u.cosDeg(t);return Math.atan2(i*this.c+e*this.d,i*this.a+e*this.b)*u.radDeg}rotateWorld(t){let e=this.a,i=this.b,n=this.c,s=this.d,r=u.cosDeg(t),a=u.sinDeg(t);this.a=r*e-a*n,this.b=r*i-a*s,this.c=a*e+r*n,this.d=a*i+r*s}},le=class{constructor(t,e,i){this.name=t,this.order=e,this.skinRequired=i}},ue=class{constructor(t,e="",i=new ce){this.pathPrefix="",this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.textureLoader=t,this.pathPrefix=e,this.downloader=i}start(t){return this.toLoad++,this.pathPrefix+t}success(t,e,i){this.toLoad--,this.loaded++,this.assets[e]=i,t&&t(e,i)}error(t,e,i){this.toLoad--,this.loaded++,this.errors[e]=i,t&&t(e,i)}loadAll(){return new Promise((t,e)=>{let i=()=>{this.isLoadingComplete()?this.hasErrors()?e(this.errors):t(this):requestAnimationFrame(i)};requestAnimationFrame(i)})}setRawDataURI(t,e){this.downloader.rawDataUris[this.pathPrefix+t]=e}loadBinary(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadBinary(t,i=>{this.success(e,t,i)},(e,n)=>{this.error(i,t,`Couldn't load binary ${t}: status ${e}, ${n}`)})}loadText(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadText(t,i=>{this.success(e,t,i)},(e,n)=>{this.error(i,t,`Couldn't load text ${t}: status ${e}, ${n}`)})}loadJson(t,e=(()=>{}),i=(()=>{})){t=this.start(t),this.downloader.downloadJson(t,i=>{this.success(e,t,i)},(e,n)=>{this.error(i,t,`Couldn't load JSON ${t}: status ${e}, ${n}`)})}loadTexture(t,e=(()=>{}),i=(()=>{})){if(t=this.start(t),!!("undefined"==typeof window||"undefined"==typeof navigator||!window.document))fetch(t,{mode:"cors"}).then(e=>e.ok?e.blob():(this.error(i,t,"Couldn't load image: "+t),null)).then(t=>t?createImageBitmap(t,{premultiplyAlpha:"none",colorSpaceConversion:"none"}):null).then(i=>{i&&this.success(e,t,this.textureLoader(i))});else{let n=new Image;n.crossOrigin="anonymous",n.onload=()=>{this.success(e,t,this.textureLoader(n))},n.onerror=()=>{this.error(i,t,"Couldn't load image: "+t)},this.downloader.rawDataUris[t]&&(t=this.downloader.rawDataUris[t]),n.src=t}}loadTextureAtlas(t,e=(()=>{}),i=(()=>{}),n){let s=t.lastIndexOf("/"),r=s>=0?t.substring(0,s+1):"";t=this.start(t),this.downloader.downloadText(t,s=>{try{let a=new Kt(s),o=a.pages.length,h=!1;for(let s of a.pages)this.loadTexture(n?n[s.name]:r+s.name,(i,n)=>{h||(s.setTexture(n),0==--o&&this.success(e,t,a))},(e,n)=>{h||this.error(i,t,`Couldn't load texture atlas ${t} page image: ${e}`),h=!0})}catch(e){this.error(i,t,`Couldn't parse texture atlas ${t}: ${e.message}`)}},(e,n)=>{this.error(i,t,`Couldn't load texture atlas ${t}: status ${e}, ${n}`)})}get(t){return this.assets[this.pathPrefix+t]}require(t){t=this.pathPrefix+t;let e=this.assets[t];if(e)return e;let i=this.errors[t];throw Error("Asset not found: "+t+(i?"\n"+i:""))}remove(t){t=this.pathPrefix+t;let e=this.assets[t];return e.dispose&&e.dispose(),delete this.assets[t],e}removeAll(){for(let t in this.assets){let e=this.assets[t];e.dispose&&e.dispose()}this.assets={}}isLoadingComplete(){return 0==this.toLoad}getToLoad(){return this.toLoad}getLoaded(){return this.loaded}dispose(){this.removeAll()}hasErrors(){return Object.keys(this.errors).length>0}getErrors(){return this.errors}},ce=class{constructor(){this.callbacks={},this.rawDataUris={}}dataUriToString(t){if(!t.startsWith("data:"))throw new Error("Not a data URI.");let e=t.indexOf("base64,");return-1!=e?(e+="base64,".length,atob(t.substr(e))):t.substr(t.indexOf(",")+1)}base64ToUint8Array(t){for(var e=window.atob(t),i=e.length,n=new Uint8Array(i),s=0;s{this.finish(t,n.status,n.responseText)};n.onload=s,n.onerror=s,n.send()}downloadJson(t,e,i){this.downloadText(t,t=>{e(JSON.parse(t))},i)}downloadBinary(t,e,i){if(this.start(t,e,i))return;if(this.rawDataUris[t]){try{let e=this.rawDataUris[t];this.finish(t,200,this.dataUriToUint8Array(e))}catch(e){this.finish(t,400,JSON.stringify(e))}return}let n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer";let s=()=>{this.finish(t,n.status,n.response)};n.onload=()=>{200==n.status||0==n.status?this.finish(t,200,new Uint8Array(n.response)):s()},n.onerror=s,n.send()}start(t,e,i){let n=this.callbacks[t];try{if(n)return!0;this.callbacks[t]=n=[]}finally{n.push(e,i)}}finish(t,e,i){let n=this.callbacks[t];delete this.callbacks[t];let s=200==e||0==e?[i]:[e,i];for(let t=s.length-1,e=n.length;t180?f-=360:f<-180&&(f+=360);let g=t.ascaleX,x=t.ascaleY;if(n||s){switch(t.data.transformMode){case 3:case 4:p=e-t.worldX,m=i-t.worldY}let o=t.data.length*g,h=Math.sqrt(p*p+m*m);if(n&&ho&&o>1e-4){let t=(h/o-1)*a+1;g*=t,r&&(x*=t)}}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*a,g,x,t.ashearX,t.ashearY)}apply2(t,e,i,n,s,r,a,o,h){let l=t.ax,c=t.ay,d=t.ascaleX,f=t.ascaleY,p=d,m=f,g=e.ascaleX,x=0,v=0,y=0;d<0?(d=-d,x=180,y=-1):(x=0,y=1),f<0&&(f=-f,y=-y),g<0?(g=-g,v=180):v=0;let w=e.ax,b=0,M=0,A=0,S=t.a,k=t.b,E=t.c,T=t.d,I=Math.abs(d-f)<=1e-4;!I||r?(b=0,M=S*w+t.worldX,A=E*w+t.worldY):(b=e.ay,M=S*w+k*b+t.worldX,A=E*w+T*b+t.worldY);let R=t.parent;if(!R)throw new Error("IK parent must itself have a parent.");S=R.a,k=R.b,E=R.c,T=R.d;let C,F,P=1/(S*T-k*E),Y=M-R.worldX,O=A-R.worldY,L=(Y*T-O*k)*P-l,D=(O*S-Y*E)*P-c,X=Math.sqrt(L*L+D*D),_=e.data.length*g;if(X<1e-4)return this.apply1(t,i,n,!1,r,!1,h),void e.updateWorldTransformWith(w,b,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);Y=i-R.worldX,O=n-R.worldY;let z=(Y*T-O*k)*P-l,B=(O*S-Y*E)*P-c,V=z*z+B*B;if(0!=o){o*=d*(g+1)*.5;let t=Math.sqrt(V),e=t-X-_*d+o;if(e>0){let i=Math.min(1,e/(2*o))-1;i=(e-o*(1-i*i))/t,z-=i*z,B-=i*B,V=z*z+B*B}}t:if(I){_*=d;let t=(V-X*X-_*_)/(2*X*_);t<-1?(t=-1,F=Math.PI*s):t>1?(t=1,F=0,r&&(S=(Math.sqrt(V)/(X+_)-1)*h+1,p*=S,a&&(m*=S))):F=Math.acos(t)*s,S=X+_*t,k=_*Math.sin(F),C=Math.atan2(B*S-z*k,z*S+B*k)}else{S=d*_,k=f*_;let t=S*S,e=k*k,i=Math.atan2(B,z);E=e*X*X+t*V-t*e;let n=-2*e*X,r=e-t;if(T=n*n-4*r*E,T>=0){let t=Math.sqrt(T);n<0&&(t=-t),t=.5*-(n+t);let e=t/r,a=E/t,o=Math.abs(e)=-1&&E<=1&&(E=Math.acos(E),Y=S*Math.cos(E)+X,O=k*Math.sin(E),T=Y*Y+O*O,Tm&&(c=E,m=T,p=Y,g=O)),V<=.5*(h+m)?(C=i-Math.atan2(l*s,o),F=a*s):(C=i-Math.atan2(g*s,p),F=c*s)}let N=Math.atan2(b,w)*y,U=t.arotation;C=(C-N)*u.radDeg+x-U,C>180?C-=360:C<-180&&(C+=360),t.updateWorldTransformWith(l,c,U+C*h,p,m,0,0),U=e.arotation,F=((F+N)*u.radDeg-e.ashearX)*y+v-U,F>180?F-=360:F<-180&&(F+=360),e.updateWorldTransformWith(w,b,U+F*h,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}},me=class extends le{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.")}},ge=class extends le{constructor(t){super(t,0,!1),this.bones=new Array,this._target=null,this.positionMode=xe.Fixed,this.spacingMode=ve.Fixed,this.rotateMode=ye.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}get target(){if(this._target)return this._target;throw new Error("SlotData not set.")}},xe=(t=>(t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent",t))(xe||{}),ve=(t=>(t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent",t[t.Proportional=3]="Proportional",t))(ve||{}),ye=(t=>(t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale",t))(ye||{}),we=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 i=0,n=t.bones.length;i0){t=l/t*f;for(let e=1;e0?u.degRad:-u.degRad}for(let t=0,s=3;t0){let i=h.a,n=h.b,a=h.c,o=h.d,l=0,d=0,f=0;if(l=r?p[s-1]:0==c[t+1]?p[s+2]:Math.atan2(w,m),l-=Math.atan2(a,i),y){d=Math.cos(l),f=Math.sin(l);let t=h.data.length;g+=(t*(d*i-f*a)-m)*e,x+=(t*(f*i+d*a)-w)*e}else l+=v;l>u.PI?l-=u.PI2:l<-u.PI&&(l+=u.PI2),l*=e,d=Math.cos(l),f=Math.sin(l),h.a=d*i-f*a,h.b=d*n-f*o,h.c=f*i+d*a,h.d=f*n+d*o}h.updateAppliedTransform()}}computeWorldPositions(t,e,i){let n=this.target,s=this.position,r=this.spaces,a=m.setArraySize(this.positions,3*e+2),o=this.world,h=t.closed,l=t.worldVerticesLength,u=l/6,c=we.NONE;if(!t.constantSpeed){let d=t.lengths;u-=h?1:2;let f,p=d[u];switch(1==this.data.positionMode&&(s*=p),this.data.spacingMode){case 2:f=p;break;case 3:f=p/e;break;default:f=1}o=m.setArraySize(this.world,8);for(let m=0,g=0,x=0;mp){c!=we.AFTER&&(c=we.AFTER,t.computeWorldVertices(n,l-6,4,o,0,2)),this.addAfterPosition(v-p,o,0,a,g);continue}}for(;;x++){let t=d[x];if(!(v>t)){if(0==x)v/=t;else{let e=d[x-1];v=(v-e)/(t-e)}break}}x!=c&&(c=x,h&&x==u?(t.computeWorldVertices(n,l-4,4,o,0,2),t.computeWorldVertices(n,0,4,o,4,2)):t.computeWorldVertices(n,6*x+2,8,o,0,2)),this.addCurvePosition(v,o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],a,g,i||m>0&&0==e)}return a}h?(l+=2,o=m.setArraySize(this.world,l),t.computeWorldVertices(n,2,l-4,o,0,2),t.computeWorldVertices(n,0,2,o,l-4,2),o[l-2]=o[0],o[l-1]=o[1]):(u--,l-=4,o=m.setArraySize(this.world,l),t.computeWorldVertices(n,2,l,o,0,2));let d,f=m.setArraySize(this.curves,u),p=0,g=o[0],x=o[1],v=0,y=0,w=0,b=0,M=0,A=0,S=0,k=0,E=0,T=0,I=0,R=0,C=0,F=0;for(let t=0,e=2;tp){this.addAfterPosition(O-p,o,l-4,a,n);continue}}for(;;u++){let t=f[u];if(!(O>t)){if(0==u)O/=t;else{let e=f[u-1];O=(O-e)/(t-e)}break}}if(u!=c){c=u;let t=6*u;for(g=o[t],x=o[t+1],v=o[t+2],y=o[t+3],w=o[t+4],b=o[t+5],M=o[t+6],A=o[t+7],S=.03*(g-2*v+w),k=.03*(x-2*y+b),E=.006*(3*(v-w)-g+M),T=.006*(3*(y-b)-x+A),I=2*S+E,R=2*k+T,C=.3*(v-g)+S+.16666667*E,F=.3*(y-x)+k+.16666667*T,Y=Math.sqrt(C*C+F*F),P[0]=Y,t=1;t<8;t++)C+=I,F+=R,I+=E,R+=T,Y+=Math.sqrt(C*C+F*F),P[t]=Y;C+=I,F+=R,Y+=Math.sqrt(C*C+F*F),P[8]=Y,C+=I+E,F+=R+T,Y+=Math.sqrt(C*C+F*F),P[9]=Y,m=0}for(O*=Y;;m++){let t=P[m];if(!(O>t)){if(0==m)O/=t;else{let e=P[m-1];O=m+(O-e)/(t-e)}break}}this.addCurvePosition(.1*O,g,x,v,y,w,b,M,A,a,n,i||t>0&&0==e)}return a}addBeforePosition(t,e,i,n,s){let r=e[i],a=e[i+1],o=e[i+2]-r,h=e[i+3]-a,l=Math.atan2(h,o);n[s]=r+t*Math.cos(l),n[s+1]=a+t*Math.sin(l),n[s+2]=l}addAfterPosition(t,e,i,n,s){let r=e[i+2],a=e[i+3],o=r-e[i],h=a-e[i+1],l=Math.atan2(h,o);n[s]=r+t*Math.cos(l),n[s+1]=a+t*Math.sin(l),n[s+2]=l}addCurvePosition(t,e,i,n,s,r,a,o,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=i,void(l[u+2]=Math.atan2(s-i,n-e));let d=t*t,f=d*t,p=1-t,m=p*p,g=m*p,x=p*t,v=3*x,y=p*v,w=v*t,b=e*g+n*y+r*w+o*f,M=i*g+s*y+a*w+h*f;l[u]=b,l[u+1]=M,c&&(l[u+2]=t<.001?Math.atan2(s-i,n-e):Math.atan2(M-(i*m+s*x*2+a*d),b-(e*m+n*x*2+r*d)))}},be=we;be.NONE=-1,be.BEFORE=-2,be.AFTER=-3,be.epsilon=1e-5;var Me=class{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 h,this.darkColor=t.darkColor?new h:null,this.setToSetupPose()}getSkeleton(){return this.bone.skeleton}getAttachment(){return this.attachment}setAttachment(t){this.attachment!=t&&(t instanceof A&&this.attachment instanceof A&&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}},Ae=class{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 v,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 i=0;i0?u.degRad:-u.degRad,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let f=0,x=g.length;fu.PI?r-=u.PI2:r<-u.PI&&(r+=u.PI2),r*=t;let a=Math.cos(r),o=Math.sin(r);x.a=a*e-o*n,x.b=a*i-o*s,x.c=o*e+a*n,x.d=o*i+a*s}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=(t.x-x.worldX)*e,x.worldY+=(t.y-x.worldY)*i}if(0!=n){let t=Math.sqrt(x.a*x.a+x.c*x.c);0!=t&&(t=(t+(Math.sqrt(h*h+c*c)-t+this.data.offsetScaleX)*n)/t),x.a*=t,x.c*=t}if(0!=s){let t=Math.sqrt(x.b*x.b+x.d*x.d);0!=t&&(t=(t+(Math.sqrt(l*l+d*d)-t+this.data.offsetScaleY)*s)/t),x.b*=t,x.d*=t}if(r>0){let t=x.b,e=x.d,i=Math.atan2(e,t),n=Math.atan2(d,l)-Math.atan2(c,h)-(i-Math.atan2(x.c,x.a));n>u.PI?n-=u.PI2:n<-u.PI&&(n+=u.PI2),n=i+(n+m)*r;let s=Math.sqrt(t*t+e*e);x.b=Math.cos(n)*s,x.d=Math.sin(n)*s}x.updateAppliedTransform()}}applyRelativeWorld(){let t=this.mixRotate,e=this.mixX,i=this.mixY,n=this.mixScaleX,s=this.mixScaleY,r=this.mixShearY,a=0!=e||0!=i,o=this.target,h=o.a,l=o.b,c=o.c,d=o.d,f=h*d-l*c>0?u.degRad:-u.degRad,p=this.data.offsetRotation*f,m=this.data.offsetShearY*f,g=this.bones;for(let f=0,x=g.length;fu.PI?r-=u.PI2:r<-u.PI&&(r+=u.PI2),r*=t;let a=Math.cos(r),o=Math.sin(r);x.a=a*e-o*n,x.b=a*i-o*s,x.c=o*e+a*n,x.d=o*i+a*s}if(a){let t=this.temp;o.localToWorld(t.set(this.data.offsetX,this.data.offsetY)),x.worldX+=t.x*e,x.worldY+=t.y*i}if(0!=n){let t=(Math.sqrt(h*h+c*c)-1+this.data.offsetScaleX)*n+1;x.a*=t,x.c*=t}if(0!=s){let t=(Math.sqrt(l*l+d*d)-1+this.data.offsetScaleY)*s+1;x.b*=t,x.d*=t}if(r>0){let t=Math.atan2(d,l)-Math.atan2(c,h);t>u.PI?t-=u.PI2:t<-u.PI&&(t+=u.PI2);let e=x.b,i=x.d;t=Math.atan2(i,e)+(t-u.PI/2+m)*r;let n=Math.sqrt(e*e+i*i);x.b=Math.cos(t)*n,x.d=Math.sin(t)*n}x.updateAppliedTransform()}}applyAbsoluteLocal(){let t=this.mixRotate,e=this.mixX,i=this.mixY,n=this.mixScaleX,s=this.mixScaleY,r=this.mixShearY,a=this.target,o=this.bones;for(let h=0,l=o.length;h=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=i}addSkin(t){for(let e=0;e= 0.");if(!e)throw new Error("name cannot be null.");if(!i)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=i}},Ce=(t=>(t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen",t))(Ce||{}),Fe=class extends le{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.")}},Pe=class{constructor(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}readSkeletonData(t){let e=this.scale,i=new Ee;i.name="";let n=new Ye(t),s=n.readInt32(),r=n.readInt32();i.hash=0==r&&0==s?null:r.toString(16)+s.toString(16),i.version=n.readString(),i.x=n.readFloat(),i.y=n.readFloat(),i.width=n.readFloat(),i.height=n.readFloat();let a=n.readBoolean();a&&(i.fps=n.readFloat(),i.imagesPath=n.readString(),i.audioPath=n.readString());let o=0;o=n.readInt(!0);for(let t=0;t>4,t.readFloat())}n.push(e);break}}}}}let r=t.readInt(!0);if(r>0){let e=new bt(r),s=i.slots.length;for(let i=0;i=0;t--)a[t]=-1;let o=m.newArray(s-r,0),h=0,l=0;for(let e=0;e=0;t--)-1==a[t]&&(a[t]=o[--l]);e.setFrame(i,n,a)}n.push(e)}let a=t.readInt(!0);if(a>0){let e=new yt(a);for(let n=0;n>>1^-(1&i)}readStringRef(){let 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 i=0;i>4){case 12:case 13:e+=String.fromCharCode((31&t)<<6|63&this.readByte()),i+=2;break;case 14:e+=String.fromCharCode((15&t)<<12|(63&this.readByte())<<6|63&this.readByte()),i+=3;break;default:e+=String.fromCharCode(t),i++}}return e}readFloat(){let t=this.buffer.getFloat32(this.index);return this.index+=4,t}readBoolean(){return 0!=this.readByte()}},Oe=class{constructor(t,e,i,n,s){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=n,this.inheritTimeline=s}},Le=class{constructor(t=null,e=null){this.bones=t,this.vertices=e}},De=(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))(De||{});function Xe(t,e,i){let n=t.readFloat(),s=t.readFloat()*i;for(let r=0,a=0,o=e.getFrameCount()-1;e.setFrame(r,n,s),r!=o;r++){let o=t.readFloat(),h=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(r);break;case li:ze(t,e,a++,r,0,n,o,s,h,i)}n=o,s=h}return e}function _e(t,e,i){let n=t.readFloat(),s=t.readFloat()*i,r=t.readFloat()*i;for(let a=0,o=0,h=e.getFrameCount()-1;e.setFrame(a,n,s,r),a!=h;a++){let h=t.readFloat(),l=t.readFloat()*i,u=t.readFloat()*i;switch(t.readByte()){case hi:e.setStepped(a);break;case li:ze(t,e,o++,a,0,n,h,s,l,i),ze(t,e,o++,a,1,n,h,r,u,i)}n=h,s=l,r=u}return e}function ze(t,e,i,n,s,r,a,o,h,l){e.setBezier(i,n,s,r,o,t.readFloat(),t.readFloat()*l,t.readFloat(),t.readFloat()*l,a,h)}var Be,Ve=0,Ne=1,Ue=2,qe=3,We=4,Ge=5,He=6,je=7,$e=8,Ke=9,Ze=0,Qe=1,Je=2,ti=3,ei=4,ii=5,ni=0,si=1,ri=0,ai=1,oi=2,hi=1,li=2,ui=class{constructor(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new x(()=>m.newFloatArray(16))}update(t,e){if(!t)throw new Error("skeleton cannot be null.");let i=this.boundingBoxes,n=this.polygons,s=this.polygonPool,r=t.slots,a=r.length;i.length=0,s.freeAll(n),n.length=0;for(let t=0;t=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY}aabbIntersectsSegment(t,e,i,n){let s=this.minX,r=this.minY,a=this.maxX,o=this.maxY;if(t<=s&&i<=s||e<=r&&n<=r||t>=a&&i>=a||e>=o&&n>=o)return!1;let h=(n-e)/(i-t),l=h*(s-t)+e;if(l>r&&lr&&ls&&us&&ut.minX&&this.minYt.minY}containsPoint(t,e){let i=this.polygons;for(let n=0,s=i.length;n=i||o=i){let h=n[t];h+(i-s)/(o-s)*(n[r]-h)=u&&x<=a||x>=a&&x<=u)&&(x>=e&&x<=n||x>=n&&x<=e)){let t=(l*m-h*f)/g;if((t>=c&&t<=d||t>=d&&t<=c)&&(t>=i&&t<=s||t>=s&&t<=i))return!0}u=a,c=d}return!1}getPolygon(t){if(!t)throw new Error("boundingBox cannot be null.");let e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]}getWidth(){return this.maxX-this.minX}getHeight(){return this.maxY-this.minY}},ci=class{constructor(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new x(()=>new Array),this.polygonIndicesPool=new x(()=>new Array)}triangulate(t){let e=t,i=t.length>>1,n=this.indicesArray;n.length=0;for(let t=0;t3;){let t=i-1,a=0,o=1;for(;;){t:if(!s[a]){let r=n[t]<<1,h=n[a]<<1,l=n[o]<<1,u=e[r],c=e[r+1],d=e[h],f=e[h+1],p=e[l],m=e[l+1];for(let r=(o+1)%i;r!=t;r=(r+1)%i){if(!s[r])continue;let t=n[r]<<1,i=e[t],a=e[t+1];if(ci.positiveArea(p,m,u,c,i,a)&&ci.positiveArea(u,c,d,f,i,a)&&ci.positiveArea(d,f,p,m,i,a))break t}break}if(0==o){do{if(!s[a])break;a--}while(a>0);break}t=a,a=o,o=(o+1)%i}r.push(n[(i+a-1)%i]),r.push(n[a]),r.push(n[(a+1)%i]),n.splice(a,1),s.splice(a,1),i--;let h=(i+a-1)%i,l=a==i?0:a;s[h]=ci.isConcave(h,i,e,n),s[l]=ci.isConcave(l,i,e,n)}return 3==i&&(r.push(n[2]),r.push(n[0]),r.push(n[1])),r}decompose(t,e){let i=t,n=this.convexPolygons;this.polygonPool.freeAll(n),n.length=0;let s=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(s),s.length=0;let r=this.polygonIndicesPool.obtain();r.length=0;let a=this.polygonPool.obtain();a.length=0;let o=-1,h=0;for(let t=0,l=e.length;t0?(n.push(a),s.push(r)):(this.polygonPool.free(a),this.polygonIndicesPool.free(r)),a=this.polygonPool.obtain(),a.length=0,a.push(d),a.push(f),a.push(p),a.push(m),a.push(g),a.push(x),r=this.polygonIndicesPool.obtain(),r.length=0,r.push(l),r.push(u),r.push(c),h=ci.winding(d,f,p,m,g,x),o=l)}a.length>0&&(n.push(a),s.push(r));for(let t=0,e=n.length;t=0;t--)a=n[t],0==a.length&&(n.splice(t,1),this.polygonPool.free(a),r=s[t],s.splice(t,1),this.polygonIndicesPool.free(r));return n}static isConcave(t,e,i,n){let s=n[(e+t-1)%e]<<1,r=n[t]<<1,a=n[(t+1)%e]<<1;return!this.positiveArea(i[s],i[s+1],i[r],i[r+1],i[a],i[a+1])}static positiveArea(t,e,i,n,s,r){return t*(r-n)+i*(e-r)+s*(n-e)>=0}static winding(t,e,i,n,s,r){let a=i-t,o=n-e;return s*o-r*a+a*e-t*o>=0?1:-1}},di=class{constructor(){this.triangulator=new ci,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array,this.clipAttachment=null,this.clippingPolygons=null}clipStart(t,e){if(this.clipAttachment)return 0;this.clipAttachment=e;let i=e.worldVerticesLength,n=m.setArraySize(this.clippingPolygon,i);e.computeWorldVertices(t,0,i,n,0,2);let s=this.clippingPolygon;di.makeClockwise(s);let r=this.clippingPolygons=this.triangulator.decompose(s,this.triangulator.triangulate(s));for(let t=0,e=r.length;t>1,R=this.clipOutput,C=m.setArraySize(l,e+I*f);for(let h=0;h=2?(h=o,o=this.scratch):h=this.scratch,h.length=0,h.push(t),h.push(e),h.push(i),h.push(n),h.push(s),h.push(r),h.push(t),h.push(e),o.length=0;let c=a,d=a.length-4;for(let t=0;;t+=2){let e=c[t],i=c[t+1],n=c[t+2],s=c[t+3],r=e-n,a=i-s,f=h,p=h.length-2,m=o.length;for(let t=0;t0;if(r*(l-s)-a*(h-n)>0){if(p){o.push(c),o.push(d);continue}let t=d-l,r=c-h,a=t*(n-e)-r*(s-i);if(Math.abs(a)>1e-6){let u=(r*(i-l)-t*(e-h))/a;o.push(e+(n-e)*u),o.push(i+(s-i)*u)}else o.push(e),o.push(i)}else if(p){let t=d-l,r=c-h,a=t*(n-e)-r*(s-i);if(Math.abs(a)>1e-6){let u=(r*(i-l)-t*(e-h))/a;o.push(e+(n-e)*u),o.push(i+(s-i)*u)}else o.push(e),o.push(i);o.push(c),o.push(d)}u=!0}if(m==o.length)return l.length=0,!0;if(o.push(o[0]),o.push(o[1]),t==d)break;let g=o;(o=h).length=0,h=g}if(l!=o){l.length=0;for(let t=0,e=o.length-2;t>1;t=0;e--)-1==o[e]&&(o[e]=t[--s])}e.setFrame(r,vi(a,"time",0),o)}s.push(e)}if(t.events){let e=new yt(t.events.length),n=0;for(let s=0;snew wi(t),t,e)}},Mi=m.newFloatArray(8),Ai=class{constructor(t){this.triangleRendering=!1,this.debugRendering=!1,this.vertices=m.newFloatArray(8192),this.tempColor=new h,this.ctx=t}draw(t){this.triangleRendering?this.drawTriangles(t):this.drawImages(t)}drawImages(t){let e=this.ctx,i=this.tempColor,n=t.color,s=t.drawOrder;this.debugRendering&&(e.strokeStyle="green");for(let t=0,r=s.length;t{if(r&&"object"==typeof r||"function"==typeof r)for(let h of i(r))n.call(s,h)||h===a||t(s,h,{get:()=>r[h],enumerable:!(o=e(r,h))||o.enumerable});return s})(t({},"__esModule",{value:!0}),yi)})();t.exports=e}).call(window)},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={ADD:i(211),COMPLETE:i(212),FILE_COMPLETE:i(213),FILE_KEY_COMPLETE:i(214),FILE_LOAD_ERROR:i(215),FILE_LOAD:i(216),FILE_PROGRESS:i(217),POST_PROCESS:i(218),PROGRESS:i(219),START:i(220)}},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|capacitor:\/\/|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(17),s=i(50);t.exports=function(t,e){var i=void 0===t?s():n({},t);if(e)for(var r in e)void 0!==e[r]&&(i[r]=e[r]);return i}},function(t,e){t.exports=function(t,e,i,n,s,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.displayList&&this.displayList.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(3),s=i(56),r=i(43),a=i(32),o=i(33),h=i(2),l={hasTransformComponent:!0,_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,0===t?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return o(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=a(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new s),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new s),void 0===e&&(e=new s);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,n){i||(i=new h),n||(n=this.scene.sys.cameras.main);var s=n.scrollX,a=n.scrollY,o=t+s*this.scrollFactorX-s,l=e+a*this.scrollFactorY-a;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,l,i):r(o,l,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=l},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(3),r=i(2),a=new n({initialize:function(t,e,i,n,s,r){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===s&&(s=0),void 0===r&&(r=0),this.matrix=new Float32Array([t,e,i,n,s,r,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0},this.quad=new Float32Array(8)},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3];return e||i?i>0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||r?s.TAU-(r>0?Math.acos(-n/this.scaleY):-Math.acos(n/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,s=n[0],r=n[1],a=n[2],o=n[3];return n[0]=s*i+a*e,n[1]=r*i+o*e,n[2]=s*-e+a*i,n[3]=r*-e+o*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,s=i[0],r=i[1],a=i[2],o=i[3],h=i[4],l=i[5],u=n[0],c=n[1],d=n[2],f=n[3],p=n[4],m=n[5],g=void 0===e?i:e.matrix;return g[0]=u*s+c*a,g[1]=u*r+c*o,g[2]=d*s+f*a,g[3]=d*r+f*o,g[4]=p*s+m*a+h,g[5]=p*r+m*o+l,g},multiplyWithOffset:function(t,e,i){var n=this.matrix,s=t.matrix,r=n[0],a=n[1],o=n[2],h=n[3],l=e*r+i*o+n[4],u=e*a+i*h+n[5],c=s[0],d=s[1],f=s[2],p=s[3],m=s[4],g=s[5];return n[0]=c*r+d*o,n[1]=c*a+d*h,n[2]=f*r+p*o,n[3]=f*a+p*h,n[4]=m*r+g*o+l,n[5]=m*a+g*h+u,this},transform:function(t,e,i,n,s,r){var a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],d=a[5];return a[0]=t*o+e*l,a[1]=t*h+e*u,a[2]=i*o+n*l,a[3]=i*h+n*u,a[4]=s*o+r*l+c,a[5]=s*h+r*u+d,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,s=n[0],r=n[1],a=n[2],o=n[3],h=n[4],l=n[5];return i.x=t*s+e*a+h,i.y=t*r+e*o+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],s=t[3],r=t[4],a=t[5],o=e*s-i*n;return t[0]=s/o,t[1]=-i/o,t[2]=-n/o,t[3]=e/o,t[4]=(n*a-s*r)/o,t[5]=-(e*a-i*r)/o,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,i,n,s,r){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=i,a[3]=n,a[4]=s,a[5]=r,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],s=e[2],r=e[3],a=i*r-n*s;if(t.translateX=e[4],t.translateY=e[5],i||n){var o=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/o):-Math.acos(i/o),t.scaleX=o,t.scaleY=a/o}else if(s||r){var h=Math.sqrt(s*s+r*r);t.rotation=.5*Math.PI-(r>0?Math.acos(-s/h):-Math.acos(s/h)),t.scaleX=a/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,s){var r=this.matrix,a=Math.sin(i),o=Math.cos(i);return r[4]=t,r[5]=e,r[0]=o*n,r[1]=a*n,r[2]=-a*s,r[3]=o*s,this},applyInverse:function(t,e,i){void 0===i&&(i=new r);var n=this.matrix,s=n[0],a=n[1],o=n[2],h=n[3],l=n[4],u=n[5],c=1/(s*h+o*-a);return i.x=h*c*t+-o*c*e+(u*o-l*h)*c,i.y=s*c*e+-a*c*t+(-u*s+l*a)*c,i},setQuad:function(t,e,i,n,s,r){void 0===r&&(r=this.quad);var a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],d=a[5];return r[0]=t*o+e*l+c,r[1]=t*h+e*u+d,r[2]=t*o+n*l+c,r[3]=t*h+n*u+d,r[4]=i*o+n*l+c,r[5]=i*h+n*u+d,r[6]=i*o+e*l+c,r[7]=i*h+e*u+d,s&&r.forEach((function(t,e){r[e]=Math.round(t)})),r},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,i){var n=this.getX(t,e);return i&&(n=Math.round(n)),n},getYRound:function(t,e,i){var n=this.getY(t,e);return i&&(n=Math.round(n)),n},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.quad=null,this.decomposedMatrix=null}});t.exports=a},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=i},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(59),r=i(226),a=i(233),o=i(60),h=i(23),l=new n({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.displayList=null,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,this.on(o.ADDED_TO_SCENE,this.addedToScene,this),this.on(o.REMOVED_FROM_SCENE,this.removedFromScene,this),t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new r(this)),this},setData:function(t,e){return this.data||(this.data=new r(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new r(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new r(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new r(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),this},disableInteractive:function(){return this.scene.sys.input.disable(this),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return s(this)},willRender:function(t){return!(!(!this.displayList||!this.displayList.active||this.displayList.willRender(t))||l.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return this.displayList?i.unshift(this.displayList.getIndex(t)):i.unshift(this.scene.sys.displayList.getIndex(t)),i},addToDisplayList:function(t){return void 0===t&&(t=this.scene.sys.displayList),this.displayList&&this.displayList!==t&&this.removeFromDisplayList(),t.exists(this)||(this.displayList=t,t.add(this,!0),t.queueDepthSort(),this.emit(o.ADDED_TO_SCENE,this,this.scene),t.events.emit(h.ADDED_TO_SCENE,this,this.scene)),this},addToUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.add(this),this},removeFromDisplayList:function(){var t=this.displayList||this.scene.sys.displayList;return t&&t.exists(this)&&(t.remove(this,!0),t.queueDepthSort(),this.displayList=null,this.emit(o.REMOVED_FROM_SCENE,this,this.scene),t.events.emit(h.REMOVED_FROM_SCENE,this,this.scene)),this},removeFromUpdateList:function(){return this.scene&&this.preUpdate&&this.scene.sys.updateList.remove(this),this},destroy:function(t){this.scene&&!this.ignoreDestroy&&(void 0===t&&(t=!1),this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this,t),this.removeAllListeners(),this.postPipelines&&this.resetPostPipeline(!0),this.removeFromDisplayList(),this.removeFromUpdateList(),this.input&&(this.scene.sys.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0)}});l.RENDER_MASK=15,t.exports=l},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={ADDED_TO_SCENE:i(234),DESTROY:i(235),REMOVED_FROM_SCENE:i(236),VIDEO_COMPLETE:i(237),VIDEO_CREATED:i(238),VIDEO_ERROR:i(239),VIDEO_LOOP:i(240),VIDEO_PLAY:i(241),VIDEO_SEEKED:i(242),VIDEO_SEEKING:i(243),VIDEO_STOP:i(244),VIDEO_TIMEOUT:i(245),VIDEO_UNLOCKED:i(246)}},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),s=0;s-1;r--)n[s][r]=t[r][s]}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n0;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n,s,r,a=i(300),o=i(302),h=[],l=!1;t.exports=(r=function(){var t=0;return h.forEach((function(e){e.parent&&t++})),t},{create2D:function(t,e,i){return n(t,e,i,a.CANVAS)},create:n=function(t,e,i,n,r){var u;void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=a.CANVAS),void 0===r&&(r=!1);var c=s(n);return null===c?(c={parent:t,canvas:document.createElement("canvas"),type:n},n===a.CANVAS&&h.push(c),u=c.canvas):(c.parent=t,u=c.canvas),r&&(c.parent=u),u.width=e,u.height=i,l&&n===a.CANVAS&&o.disable(u.getContext("2d")),u},createWebGL:function(t,e,i){return n(t,e,i,a.WEBGL)},disableSmoothing:function(){l=!0},enableSmoothing:function(){l=!1},first:s=function(t){if(void 0===t&&(t=a.CANVAS),t===a.WEBGL)return null;for(var e=0;e * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(67),s=i(11);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||e>=1)return i.x=t.x,i.y=t.y,i;var r=n(t)*e;return e>.5?(r-=t.width+t.height)<=t.width?(i.x=t.right-r,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(r-t.width)):r<=t.width?(i.x=t.x+r,i.y=t.y):(i.x=t.right,i.y=t.y+(r-t.width)),i}},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(4),r=i(17),a=new n({initialize:function(t,e,i,n,s,r,a){this.texture=t,this.name=e,this.source=t.source[i],this.sourceIndex=i,this.glTexture=this.source.glTexture,this.cutX,this.cutY,this.cutWidth,this.cutHeight,this.x=0,this.y=0,this.width,this.height,this.halfWidth,this.halfHeight,this.centerX,this.centerY,this.pivotX=0,this.pivotY=0,this.customPivot=!1,this.rotated=!1,this.autoRound=-1,this.customData={},this.u0=0,this.v0=0,this.u1=0,this.v1=0,this.data={cut:{x:0,y:0,w:0,h:0,r:0,b:0},trim:!1,sourceSize:{w:0,h:0},spriteSourceSize:{x:0,y:0,w:0,h:0,r:0,b:0},radius:0,drawImage:{x:0,y:0,width:0,height:0}},this.setSize(r,a,n,s)},setSize:function(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this.cutX=i,this.cutY=n,this.cutWidth=t,this.cutHeight=e,this.width=t,this.height=e,this.halfWidth=Math.floor(.5*t),this.halfHeight=Math.floor(.5*e),this.centerX=Math.floor(t/2),this.centerY=Math.floor(e/2);var s=this.data,r=s.cut;r.x=i,r.y=n,r.w=t,r.h=e,r.r=i+t,r.b=n+e,s.sourceSize.w=t,s.sourceSize.h=e,s.spriteSourceSize.w=t,s.spriteSourceSize.h=e,s.radius=.5*Math.sqrt(t*t+e*e);var a=s.drawImage;return a.x=i,a.y=n,a.width=t,a.height=e,this.updateUVs()},setTrim:function(t,e,i,n,s,r){var a=this.data,o=a.spriteSourceSize;return a.trim=!0,a.sourceSize.w=t,a.sourceSize.h=e,o.x=i,o.y=n,o.w=s,o.h=r,o.r=i+s,o.b=n+r,this.x=i,this.y=n,this.width=s,this.height=r,this.halfWidth=.5*s,this.halfHeight=.5*r,this.centerX=Math.floor(s/2),this.centerY=Math.floor(r/2),this.updateUVs()},setCropUVs:function(t,e,i,n,r,a,o){var h=this.cutX,l=this.cutY,u=this.cutWidth,c=this.cutHeight,d=this.realWidth,f=this.realHeight,p=h+(e=s(e,0,d)),m=l+(i=s(i,0,f)),g=n=s(n,0,d-e),x=r=s(r,0,f-i),v=this.data;if(v.trim){var y=v.spriteSourceSize,w=e+(n=s(n,0,u-e)),b=i+(r=s(r,0,c-i));if(!(y.rw||y.y>b)){var M=Math.max(y.x,e),A=Math.max(y.y,i),S=Math.min(y.r,w)-M,k=Math.min(y.b,b)-A;g=S,x=k,p=a?h+(u-(M-y.x)-S):h+(M-y.x),m=o?l+(c-(A-y.y)-k):l+(A-y.y),e=M,i=A,n=S,r=k}else p=0,m=0,g=0,x=0}else a&&(p=h+(u-e-n)),o&&(m=l+(c-i-r));var E=this.source.width,T=this.source.height;return t.u0=Math.max(0,p/E),t.v0=Math.max(0,m/T),t.u1=Math.min(1,(p+g)/E),t.v1=Math.min(1,(m+x)/T),t.x=e,t.y=i,t.cx=p,t.cy=m,t.cw=g,t.ch=x,t.width=n,t.height=r,t.flipX=a,t.flipY=o,t},updateCropUVs:function(t,e,i){return this.setCropUVs(t,t.x,t.y,t.width,t.height,e,i)},setUVs:function(t,e,i,n,s,r){var a=this.data.drawImage;return a.width=t,a.height=e,this.u0=i,this.v0=n,this.u1=s,this.v1=r,this},updateUVs:function(){var t=this.cutX,e=this.cutY,i=this.cutWidth,n=this.cutHeight,s=this.data.drawImage;s.width=i,s.height=n;var r=this.source.width,a=this.source.height;return this.u0=t/r,this.v0=e/a,this.u1=(t+i)/r,this.v1=(e+n)/a,this},updateUVsInverted:function(){var t=this.source.width,e=this.source.height;return this.u0=(this.cutX+this.cutHeight)/t,this.v0=this.cutY/e,this.u1=this.cutX/t,this.v1=(this.cutY+this.cutWidth)/e,this},clone:function(){var t=new a(this.texture,this.name,this.sourceIndex);return t.cutX=this.cutX,t.cutY=this.cutY,t.cutWidth=this.cutWidth,t.cutHeight=this.cutHeight,t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t.halfWidth=this.halfWidth,t.halfHeight=this.halfHeight,t.centerX=this.centerX,t.centerY=this.centerY,t.rotated=this.rotated,t.data=r(!0,t.data,this.data),t.updateUVs(),t},destroy:function(){this.source=null,this.texture=null,this.glTexture=null,this.customData=null,this.data=null},realWidth:{get:function(){return this.data.sourceSize.w}},realHeight:{get:function(){return this.data.sourceSize.h}},radius:{get:function(){return this.data.radius}},trimmed:{get:function(){return this.data.trim}},canvasData:{get:function(){return this.data.drawImage}}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ var n=i(70),s=i(0),r=i(7),a=i(184),o=i(185),h={canvas:i(46),webgl:i(46)},l=i(209),u=i(225),c=i(256),d=i(1),f=new s({Extends:o,initialize:function(t,e,i){o.call(this,t,e,i);var s=e.game;this.isWebGL=2===s.config.renderType,this.cache=s.cache.addCustom("spine"),this.spineTextures=s.cache.addCustom("spineTextures"),this.json=s.cache.json,this.textures=s.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=h,this.temp1,this.temp2,this.isWebGL?(this.runtime=h.webgl,this.renderer=s.renderer,this.gl=s.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=s.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:s.scale.width,height:s.scale.height,preRender:d,postRender:d,render:d,destroy:d});e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",(function(t,e,n,s,r){var a=this.scene.sys[i],o=new u(this.scene,a,t,e,n,s,r);return this.displayList.add(o),this.updateList.add(o),o}),(function(t,e){void 0===t&&(t={});var s=r(t,"key",null),a=r(t,"animationName",null),o=r(t,"loop",!1),h=this.scene.sys[i],l=new u(this.scene,h,0,0,s,a,o);void 0!==e&&(t.add=e),n(this.scene,l,t);var c=r(t,"skinName",!1);c&&l.setSkinByName(c);var d=r(t,"slotName",!1),f=r(t,"attachmentName",null);return d&&l.setAttachment(d,f),l.refresh()})),e.registerGameObject("spineContainer",(function(t,e,n){var s=this.scene.sys[i],r=new c(this.scene,s,t,e,n);return this.displayList.add(r),r}),(function(t,e){void 0===t&&(t={});var s=r(t,"x",0),a=r(t,"y",0),o=r(t,"children",null),h=this.scene.sys[i],l=new c(this.scene,h,s,a,o);return void 0!==e&&(t.add=e),n(this.scene,l,t),l}))},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(a,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){var t=this.renderer.spineSceneRenderer;t||(t=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0),this.renderer.spineSceneRenderer=t),this.sceneRenderer=t,this.skeletonRenderer=t.skeletonRenderer,this.skeletonDebugRenderer=t.skeletonDebugRenderer,this.temp1=new h.webgl.Vector3(0,0,0),this.temp2=new h.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var i,n=this.spineTextures;if(n.has(t))i=n.get(t);else{var s=this.textures;i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.canvas.CanvasTexture(s.get(e.prefix+t).getSourceImage())}))}return i}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,n=this.spineTextures;if(n.has(t))i=n.get(t);else{var s=this.textures,r=this.sceneRenderer.context.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i=new this.runtime.TextureAtlas(e.data,(function(t){return new h.webgl.GLTexture(r,s.get(e.prefix+t).getSourceImage(),!1)}))}return i}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,n,s,r,a){var o;if(a=a||{},Array.isArray(t))for(var h=0;h * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(12),s=i(71);t.exports=function(t,e,i){e.x=s(i,"x",0),e.y=s(i,"y",0),e.depth=s(i,"depth",0),e.flipX=s(i,"flipX",!1),e.flipY=s(i,"flipY",!1);var r=s(i,"scale",null);"number"==typeof r?e.setScale(r):null!==r&&(e.scaleX=s(r,"x",1),e.scaleY=s(r,"y",1));var a=s(i,"scrollFactor",null);"number"==typeof a?e.setScrollFactor(a):null!==a&&(e.scrollFactorX=s(a,"x",1),e.scrollFactorY=s(a,"y",1)),e.rotation=s(i,"rotation",0);var o=s(i,"angle",null);null!==o&&(e.angle=o),e.alpha=s(i,"alpha",1);var h=s(i,"origin",null);if("number"==typeof h)e.setOrigin(h);else if(null!==h){var l=s(h,"x",.5),u=s(h,"y",.5);e.setOrigin(l,u)}return e.blendMode=s(i,"blendMode",n.NORMAL),e.visible=s(i,"visible",!0),s(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(72),s=i(7);t.exports=function(t,e,i){var r=s(t,e,null);if(null===r)return i;if(Array.isArray(r))return n.RND.pick(r);if("object"==typeof r){if(r.hasOwnProperty("randInt"))return n.RND.integerInRange(r.randInt[0],r.randInt[1]);if(r.hasOwnProperty("randFloat"))return n.RND.realInRange(r.randFloat[0],r.randFloat[1])}else if("function"==typeof r)return r(e);return r}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(3),s=i(17),r={Angle:i(73),Distance:i(82),Easing:i(90),Fuzzy:i(135),Interpolation:i(140),Pow2:i(148),Snap:i(152),RandomDataGenerator:i(156),Average:i(157),Bernstein:i(35),Between:i(158),CatmullRom:i(37),CeilTo:i(159),Clamp:i(4),DegToRad:i(20),Difference:i(160),Euler:i(161),Factorial:i(36),FloatBetween:i(19),FloorTo:i(162),FromPercent:i(163),GetSpeed:i(164),IsEven:i(165),IsEvenStrict:i(166),Linear:i(38),LinearXY:i(167),MaxAdd:i(168),Median:i(169),MinSub:i(170),Percent:i(171),RadToDeg:i(22),RandomXY:i(172),RandomXYZ:i(173),RandomXYZW:i(174),Rotate:i(175),RotateAround:i(41),RotateAroundDistance:i(176),RotateTo:i(177),RoundAwayFromZero:i(42),RoundTo:i(178),SinCosTableGenerator:i(179),SmootherStep:i(40),SmoothStep:i(39),ToXY:i(180),TransformXY:i(43),Within:i(181),Wrap:i(13),Vector2:i(2),Vector3:i(14),Vector4:i(182),Matrix3:i(44),Matrix4:i(21),Quaternion:i(45),RotateVec3:i(183)};r=s(!1,r,n),t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Between:i(30),BetweenPoints:i(74),BetweenPointsY:i(75),BetweenY:i(76),CounterClockwise:i(18),Normalize:i(31),Random:i(77),RandomDegrees:i(78),Reverse:i(79),RotateTo:i(80),ShortestBetween:i(81),Wrap:i(32),WrapDegrees:i(33)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(i-t,n-e)}},function(t,e,i){ /** * @author Richard Davey * @author @samme * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(19);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){ /** * @author Richard Davey * @author @samme * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(19);t.exports=function(){return n(-180,180)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(31);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(3);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Between:i(83),BetweenPoints:i(84),BetweenPointsSquared:i(85),Chebyshev:i(86),Power:i(87),Snake:i(88),Squared:i(89)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return Math.sqrt(s*s+r*r)}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},function(t,e){t.exports=function(t,e,i,n){return Math.max(Math.abs(t-i),Math.abs(e-n))}},function(t,e){t.exports=function(t,e,i,n,s){return void 0===s&&(s=2),Math.sqrt(Math.pow(i-t,s)+Math.pow(n-e,s))}},function(t,e){t.exports=function(t,e,i,n){return Math.abs(t-i)+Math.abs(e-n)}},function(t,e){t.exports=function(t,e,i,n){var s=t-i,r=e-n;return s*s+r*r}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Back:i(91),Bounce:i(95),Circular:i(99),Cubic:i(103),Elastic:i(107),Expo:i(111),Linear:i(115),Quadratic:i(117),Quartic:i(121),Quintic:i(125),Sine:i(129),Stepped:i(133)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(92),Out:i(93),InOut:i(94)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((i+1)*t-i)*.5:.5*((t-=2)*t*((i+1)*t+i)+2)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(96),Out:i(97),InOut:i(98)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(100),Out:i(101),InOut:i(102)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(104),Out:i(105),InOut:i(106)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(108),Out:i(109),InOut:i(110)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(112),Out:i(113),InOut:i(114)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports=i(116)},function(t,e){t.exports=function(t){return t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(118),Out:i(119),InOut:i(120)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(122),Out:i(123),InOut:i(124)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(126),Out:i(127),InOut:i(128)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={In:i(130),Out:i(131),InOut:i(132)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports=i(134)},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:t>=1?1:1/e*(1+(e*t|0))}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Ceil:i(136),Equal:i(34),Floor:i(137),GreaterThan:i(138),LessThan:i(139)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t>e-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Bezier:i(141),CatmullRom:i(142),CubicBezier:i(143),Linear:i(144),QuadraticBezier:i(145),SmoothStep:i(146),SmootherStep:i(147)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(35);t.exports=function(t,e){for(var i=0,s=t.length-1,r=0;r<=s;r++)i+=Math.pow(1-e,s-r)*Math.pow(e,r)*t[r]*n(s,r);return i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(37);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return t[0]===t[i]?(e<0&&(r=Math.floor(s=i*(1+e))),n(s-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(n(-s,t[0],t[0],t[1],t[1])-t[0]):e>1?t[i]-(n(s-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(s-r,t[r?r-1:0],t[r],t[i * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,n)+function(t,e){return t*t*t*e}(t,s)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(38);t.exports=function(t,e){var i=t.length-1,s=i*e,r=Math.floor(s);return e<0?n(t[0],t[1],s):e>1?n(t[i],t[i-1],i-s):n(t[r],t[r+1>i?i:r+1],s-r)}},function(t,e){t.exports=function(t,e,i,n){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,n)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(39);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(40);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={GetNext:i(149),IsSize:i(150),IsValue:i(151)}},function(t,e){t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Ceil:i(153),Floor:i(154),To:i(155)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),n?(i+t)/e:i+t)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,i=this.n;t=t.toString();for(var n=0;n>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t){for(var e=0,i=0;i * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4),s=i(0),r=i(21),a=i(1),o=new r,h=new s({initialize:function t(e,i,n,s){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===s&&(s=t.DefaultOrder),this._x=e,this._y=i,this._z=n,this._order=s,this.onChangeCallback=a},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,n){return void 0===n&&(n=this._order),this._x=t,this._y=e,this._z=i,this._order=n,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var s=t.val,r=s[0],a=s[4],o=s[8],h=s[1],l=s[5],u=s[9],c=s[2],d=s[6],f=s[10],p=0,m=0,g=0;switch(e){case"XYZ":m=Math.asin(n(o,-1,1)),Math.abs(o)<.99999?(p=Math.atan2(-u,f),g=Math.atan2(-a,r)):p=Math.atan2(d,l);break;case"YXZ":p=Math.asin(-n(u,-1,1)),Math.abs(u)<.99999?(m=Math.atan2(o,f),g=Math.atan2(h,l)):m=Math.atan2(-c,r);break;case"ZXY":p=Math.asin(n(d,-1,1)),Math.abs(d)<.99999?(m=Math.atan2(-c,f),g=Math.atan2(-a,l)):g=Math.atan2(h,r);break;case"ZYX":m=Math.asin(-n(c,-1,1)),Math.abs(c)<.99999?(p=Math.atan2(d,f),g=Math.atan2(h,r)):g=Math.atan2(-a,l);break;case"YZX":g=Math.asin(n(h,-1,1)),Math.abs(h)<.99999?(p=Math.atan2(-u,l),m=Math.atan2(-c,r)):m=Math.atan2(o,f);break;case"XZY":g=Math.asin(-n(a,-1,1)),Math.abs(a)<.99999?(p=Math.atan2(d,l),m=Math.atan2(o,r)):p=Math.atan2(-u,f)}return this._x=p,this._y=m,this._z=g,this._order=e,i&&this.onChangeCallback(this),this}});h.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],h.DefaultOrder="XYZ",t.exports=h},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.floor(t*n)/n}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))+e}},function(t,e){t.exports=function(t,e){return t/e/1e3}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=0),t.clone().lerp(e,i)}},function(t,e){t.exports=function(t,e,i){return Math.min(t+e,i)}},function(t,e){t.exports=function(t){var e=t.length;if(0===e)return 0;t.sort((function(t,e){return t-e}));var i=Math.floor(e/2);return e%2==0?(t[i]+t[i-1])/2:t[i]}},function(t,e){t.exports=function(t,e,i){return Math.max(t-e,i)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=e+1);var s=(t-e)/(i-e);return s>1?void 0!==n?(s=(n-t)/(n-i))<0&&(s=0):s=1:s<0&&(s=0),s}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,s=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*s,t.y=Math.sin(i)*s,t.z=n*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e){var i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t,e,i,n,s){var r=n+Math.atan2(t.y-i,t.x-e);return t.x=e+s*Math.cos(r),t.y=i+s*Math.sin(r),t}},function(t,e){t.exports=function(t,e,i,n,s){return t.x=e+s*Math.cos(n),t.y=i+s*Math.sin(n),t}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var s=[],r=[],a=0;a * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(2);t.exports=function(t,e,i,s){void 0===s&&(s=new n);var r=0,a=0;return t>0&&t<=e*i&&(r=t>e-1?t-(a=Math.floor(t/e))*e:t),s.set(r,a)}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t,e,i,n){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0)},clone:function(){return new n(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,i,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,s=t*t+e*e+i*i+n*n;return s>0&&(s=1/Math.sqrt(s),this.x=t*s,this.y=e*s,this.z=i*s,this.w=n*s),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,s=this.z,r=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=s+e*(t.z-s),this.w=r+e*(t.w-r),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+s*s)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,s=t.w-this.w||0;return e*e+i*i+n*n+s*s},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,s=this.w,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12]*s,this.y=r[1]*e+r[5]*i+r[9]*n+r[13]*s,this.z=r[2]*e+r[6]*i+r[10]*n+r[14]*s,this.w=r[3]*e+r[7]*i+r[11]*n+r[15]*s,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,s=t.x,r=t.y,a=t.z,o=t.w,h=o*e+r*n-a*i,l=o*i+a*e-s*n,u=o*n+s*i-r*e,c=-s*e-r*i-a*n;return this.x=h*o+c*-s+l*-a-u*-r,this.y=l*o+c*-r+u*-s-h*-a,this.z=u*o+c*-a+h*-r-l*-s,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(14),s=i(21),r=i(45),a=new s,o=new r,h=new n;t.exports=function(t,e,i){return o.setAxisAngle(e,i),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="resize"},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ var n=i(186),s=i(0),r=i(23),a=new s({Extends:n,initialize:function(t,e,i){n.call(this,e),this.scene=t,this.systems=t.sys,this.pluginKey=i,t.sys.events.once(r.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ var n=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="addedtoscene"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="boot"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="create"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="destroy"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="pause"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="postupdate"},function(t,e){ /** * @author samme * @copyright 2021 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="prerender"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="preupdate"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="ready"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="removedfromscene"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="render"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="resume"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="shutdown"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="sleep"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="start"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="transitioncomplete"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="transitioninit"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="transitionout"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="transitionstart"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="transitionwake"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="update"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="wake"},function(t,e,i){ /** * @author Richard Davey * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ var n=i(0),s=i(8),r=i(210),a=i(6),o=i(222),h=i(223),l=i(224),u=new n({Extends:h,initialize:function(t,e,i,n,r,u,c){var d,f,p,m=[],g=t.cacheManager.custom.spine;if(a(e)){var x=e;for(e=s(x,"key"),f=new o(t,{key:e,url:s(x,"jsonURL"),extension:s(x,"jsonExtension","json"),xhrSettings:s(x,"jsonXhrSettings")}),n=s(x,"atlasURL"),r=s(x,"preMultipliedAlpha"),Array.isArray(n)||(n=[n]),d=0;d * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(9),r=i(24),a=i(25),o=i(8),h=i(6),l=i(48),u=new n({Extends:r,initialize:function t(e,i,n,s,a){var l,u="png";if(h(i)){var c=i;i=o(c,"key"),n=o(c,"url"),l=o(c,"normalMap"),s=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"frameConfig")}Array.isArray(n)&&(l=n[1],n=n[0]);var d={type:"image",cache:e.textureManager,extension:u,responseType:"blob",key:i,url:n,xhrSettings:s,config:a};if(r.call(this,e,d),l){var f=new t(e,this.key,l,s,a);f.type="normalMap",this.setLink(f),e.addFile(f)}this.useImageElementLoad="HTMLImageElement"===e.imageLoadType,this.useImageElementLoad&&(this.load=this.loadImage,this.onProcess=this.onProcessImage)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){r.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){r.revokeObjectURL(t.data),t.onProcessError()},r.createObjectURL(this.data,this.xhrLoader.response,"image/png")},onProcessImage:function(){var t=this.state;this.state=s.FILE_PROCESSING,t===s.FILE_LOADED?this.onProcessComplete():this.onProcessError()},loadImage:function(){if(this.state=s.FILE_LOADING,this.src=l(this,this.loader.baseURL),0===this.src.indexOf("data:"))console.warn("Local data URIs are not supported: "+this.key);else{this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){t.state=s.FILE_LOADED,t.loader.nextFile(t,!0)},this.data.onerror=function(){t.loader.nextFile(t,!1)},this.data.src=this.src}},addToCache:function(){var t=this.linkFile;t?t.state>=s.FILE_COMPLETE&&("normalMap"===this.type?this.cache.addImage(this.key,t.data,this.data):this.cache.addImage(this.key,this.data,t.data)):this.cache.addImage(this.key,this.data)}});a.register("image",(function(t,e,i){if(Array.isArray(t))for(var n=0;n * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="addfile"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="complete"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="filecomplete"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="filecomplete-"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="loaderror"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="load"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="fileprogress"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="postprocess"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="progress"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="start"},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(49);t.exports=function(t,e){var i=n(e,t.xhrSettings),s=new XMLHttpRequest;if(s.open("GET",t.src,i.async,i.user,i.password),s.responseType=t.xhrSettings.responseType,s.timeout=i.timeout,i.headers)for(var r in i.headers)s.setRequestHeader(r,i.headers[r]);return i.header&&i.headerValue&&s.setRequestHeader(i.header,i.headerValue),i.requestedWith&&s.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&s.overrideMimeType(i.overrideMimeType),i.withCredentials&&(s.withCredentials=!0),s.onload=t.onLoad.bind(t,s),s.onerror=t.onError.bind(t,s),s.onprogress=t.onProgress.bind(t),s.send(),s}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(9),r=i(24),a=i(25),o=i(8),h=i(7),l=i(6),u=new n({Extends:r,initialize:function(t,e,i,n,a){var u="json";if(l(e)){var c=e;e=o(c,"key"),i=o(c,"url"),n=o(c,"xhrSettings"),u=o(c,"extension",u),a=o(c,"dataKey",a)}var d={type:"json",cache:t.cacheManager.json,extension:u,responseType:"text",key:e,url:i,xhrSettings:n,config:a};r.call(this,t,d),l(i)&&(this.data=a?h(i,a):i,this.state=s.FILE_POPULATED)},onProcess:function(){if(this.state!==s.FILE_POPULATED){this.state=s.FILE_PROCESSING;try{var t=JSON.parse(this.xhrLoader.responseText)}catch(t){throw this.onProcessError(),t}var e=this.config;this.data="string"==typeof e?h(t,e,t):t}this.onProcessComplete()}});a.register("json",(function(t,e,i,n){if(Array.isArray(t))for(var s=0;s * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(9),r=i(47),a=new n({initialize:function(t,e,i,n){var r=[];n.forEach((function(t){t&&r.push(t)})),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=r,this.state=s.FILE_PENDING,this.complete=!1,this.pending=r.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var a=0;a * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(9),r=i(24),a=i(25),o=i(8),h=i(6),l=new n({Extends:r,initialize:function(t,e,i,n){var s="text",a="txt",l=t.cacheManager.text;if(h(e)){var u=e;e=o(u,"key"),i=o(u,"url"),n=o(u,"xhrSettings"),a=o(u,"extension",a),s=o(u,"type",s),l=o(u,"cache",l)}var c={type:s,cache:l,extension:a,responseType:"text",key:e,url:i,xhrSettings:n};r.call(this,t,c)},onProcess:function(){this.state=s.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});a.register("text",(function(t,e,i){if(Array.isArray(t))for(var n=0;n * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ var n=i(30),s=i(4),r=i(0),a=i(51),o=i(52),h=i(53),l=i(54),u=i(55),c=i(57),d=i(18),f=i(20),p=i(58),m=i(22),g=i(247),x=i(254),v=new r({Extends:p,Mixins:[a,o,h,l,u,c,x],initialize:function(t,e,i,n,s,r,a){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(i,n),s&&this.setSkeleton(s,r,a)},willRender:function(t,e){var i=!this.skeleton||!(15!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id);if(!e&&!i&&this.parentContainer){var n=this.plugin,s=n.sceneRenderer;n.gl&&s.batcher.isDrawing&&(s.end(),n.renderer.pipelines.rebind())}return i},setAlpha:function(t,e){if(void 0===t&&(t=1),e){var i=this.findSlot(e);i&&(i.color.a=s(t,0,1))}else this.alpha=t;return this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=s(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=s(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=s(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=s(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var i=(t>>16&255)/255,n=(t>>8&255)/255,s=(255&t)/255,r=t>16777215?(t>>>24)/255:null,a=this.skeleton;if(e){var o=this.findSlot(e);o&&(a=o)}return a.color.r=i,a.color.g=n,a.color.b=s,null!==r&&(a.color.a=r),this},setSkeletonFromJSON:function(t,e,i,n){return this.setSkeleton(t,e,i,n)},setSkeleton:function(t,e,i,n){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var s=this.plugin.createSkeleton(t,n);this.skeletonData=s.skeletonData,this.preMultipliedAlpha=s.preMultipliedAlpha;var r=s.skeleton;return r.setSkin(),r.setToSetupPose(),this.skeleton=r,s=this.plugin.createAnimationState(r),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=s.state,this.stateData=s.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,i),this.root=this.getRootBone(),this.root&&(this.root.rotation=m(d(this.rotation))+90),this.state.apply(r),r.updateCache(),this.updateSize()},onComplete:function(t){this.emit(g.COMPLETE,t)},onDispose:function(t){this.emit(g.DISPOSE,t)},onEnd:function(t){this.emit(g.END,t)},onEvent:function(t,e){this.emit(g.EVENT,t,e)},onInterrupted:function(t){this.emit(g.INTERRUPTED,t)},onStart:function(t){this.emit(g.START,t)},refresh:function(){return this.root&&(this.root.rotation=m(d(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,i,n){var s=this.skeleton;return void 0===t&&(t=s.data.width),void 0===e&&(e=s.data.height),void 0===i&&(i=0),void 0===n&&(n=0),this.width=t,this.height=e,this.displayOriginX=s.x-i,this.displayOriginY=s.y-n,this},setOffset:function(t,e){var i=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=i.x-t,this.displayOriginY=i.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,i=this.scaleX,n=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var s=this.getBounds();return this.width=s.size.x,this.height=s.size.y,this.displayOriginX=this.x-s.offset.x,this.displayOriginY=this.y-(e-(this.height+s.offset.y)),t.scaleX=i,t.scaleY=n,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var i=0;i * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(227),r=new n({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(s.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={CHANGE_DATA:i(228),CHANGE_DATA_KEY:i(229),DESTROY:i(230),REMOVE_DATA:i(231),SET_DATA:i(232)}},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="changedata"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="changedata-"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="destroy"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="removedata"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="setdata"},function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,s="~";function r(){}function a(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function o(t,e,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");var o=new a(i,n||t,r),h=s?s+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],o]:t._events[h].push(o):(t._events[h]=o,t._eventsCount++),t}function h(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function l(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(s=!1)),l.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(s?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},l.prototype.listeners=function(t){var e=s?s+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,r=i.length,a=new Array(r);n * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="addedtoscene"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="destroy"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="removedfromscene"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="complete"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="created"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="error"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="loop"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="play"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="seeked"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="seeking"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="stop"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="timeout"},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="unlocked"},function(t,e,i){ /** * @author Richard Davey * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={COMPLETE:i(248),DISPOSE:i(249),END:i(250),EVENT:i(251),INTERRUPTED:i(252),START:i(253)}},function(t,e){ /** * @author Richard Davey * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="complete"},function(t,e){ /** * @author Richard Davey * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="dispose"},function(t,e){ /** * @author Richard Davey * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="end"},function(t,e){ /** * @author Richard Davey * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="event"},function(t,e){ /** * @author Richard Davey * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="interrupted"},function(t,e){ /** * @author Richard Davey * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports="start"},function(t,e,i){ /** * @author Richard Davey * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ var n=i(1),s=i(1),r=i(1);s=i(255),t.exports={renderWebGL:n,renderCanvas:s,renderDirect:r}},function(t,e,i){ /** * @author Richard Davey * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ var n=i(18),s=i(22),r=i(13);t.exports=function(t,e,i,a){var o=t.currentContext,h=e.plugin,l=e.skeleton,u=h.skeletonRenderer,c=t._tempMatrix1,d=t._tempMatrix2,f=t._tempMatrix3;i.addToRenderList(e),d.applyITRS(e.x,e.y,e.rotation,Math.abs(e.scaleX),Math.abs(e.scaleY)),c.copyFrom(i.matrix),a?(c.multiplyWithOffset(a,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),d.e=e.x,d.f=e.y,c.multiply(d,f)):(d.e-=i.scrollX*e.scrollFactorX,d.f-=i.scrollY*e.scrollFactorY,c.multiply(d,f)),l.x=f.tx,l.y=f.ty,l.scaleX=f.scaleX,l.scaleY=-1*f.scaleY,e.scaleX<0?(l.scaleX*=-1,e.root.rotation=s(f.rotationNormalized)):e.root.rotation=r(s(n(f.rotationNormalized))+90,0,360),e.scaleY<0&&(l.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*s(f.rotationNormalized):e.root.rotation+=2*s(f.rotationNormalized)),i.renderToTexture&&(l.y=f.ty,l.scaleY*=-1),l.updateWorldTransform(),u.ctx=o,u.debugRendering=h.drawDebug||e.drawDebug,o.save(),u.draw(l),o.restore()}},function(t,e,i){ /** * @author Richard Davey * @copyright 2022 Photon Storm Ltd. * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ var n=i(0),s=i(257),r=i(342),a=new n({Extends:s,Mixins:[r],initialize:function(t,e,i,n,r){s.call(this,t,i,n,r),this.type="Spine",this.plugin=e},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,this.plugin=null}});t.exports=a},function(t,e,i){ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(258),s=i(12),r=i(0),a=i(309),o=i(60),h=i(58),l=i(28),u=i(339),c=i(341),d=i(2),f=new r({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.Pipeline,a.Transform,a.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.initPipeline(),this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(s.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,n=new l,s=!1;t.setEmpty();for(var r=0;r-1},setAll:function(t,e,i,s){return n.SetAll(this.list,t,e,i,s),this},each:function(t,e){var i,n=[null],s=this.list.slice(),r=s.length;for(i=2;i0?this.list[0]:null}},last:{get:function(){return this.list.length>0?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position0?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[]}});t.exports=f},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Matrix:i(259),Add:i(268),AddAt:i(269),BringToTop:i(270),CountAllMatching:i(271),Each:i(272),EachInRange:i(273),FindClosestInSorted:i(274),Flatten:i(275),GetAll:i(276),GetFirst:i(277),GetRandom:i(278),MoveDown:i(279),MoveTo:i(280),MoveUp:i(281),MoveAbove:i(282),MoveBelow:i(283),NumberArray:i(284),NumberArrayStep:i(285),QuickSelect:i(286),Range:i(287),Remove:i(288),RemoveAt:i(289),RemoveBetween:i(290),RemoveRandomElement:i(291),Replace:i(292),RotateLeft:i(62),RotateRight:i(63),SafeRange:i(5),SendToBack:i(293),SetAll:i(294),Shuffle:i(64),SortByDigits:i(295),SpliceOne:i(10),StableSort:i(296),Swap:i(308)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={CheckMatrix:i(26),MatrixToString:i(260),ReverseColumns:i(262),ReverseRows:i(263),Rotate180:i(264),RotateLeft:i(265),RotateMatrix:i(15),RotateRight:i(266),Translate:i(267),TransposeMatrix:i(61)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(261),s=i(26);t.exports=function(t){var e="";if(!s(t))return e;for(var i=0;i=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var r=Math.ceil((s=e-t.length)/2);t=new Array(s-r+1).join(i)+t+new Array(r+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e){t.exports=function(t){return t.reverse()}},function(t,e){t.exports=function(t){for(var e=0;e * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(15);t.exports=function(t){return n(t,180)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(15);t.exports=function(t){return n(t,90)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(15);t.exports=function(t){return n(t,-90)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(62),s=i(63);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?n(t,Math.abs(i)):s(t,i)),0!==e)for(var r=0;r0){var r=i-t.length;if(r<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(s,e),e):null;for(var a=e.length-1;a>=0;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;i>0&&a>r&&(e.splice(r),a=r);for(var o=0;o0){var a=n-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),s&&s.call(r,e),e):null;for(var o=e.length-1;o>=0;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;n>0&&o>a&&(e.splice(a),o=a);for(var h=o-1;h>=0;h--){var l=e[h];t.splice(i,0,l),s&&s.call(r,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5);t.exports=function(t,e,i,s,r){void 0===s&&(s=0),void 0===r&&(r=t.length);var a=0;if(n(t,s,r))for(var o=s;o * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r)){var a,o=[null];for(a=5;ae.length&&(r=e.length),i?(n=e[r-1][i],(s=e[r][i])-t<=t-n?e[r]:e[r-1]):(n=e[r-1],(s=e[r])-t<=t-n?s:n)}},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i=function(t,e){void 0===e&&(e=[]);for(var n=0;n * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5);t.exports=function(t,e,i,s,r){void 0===s&&(s=0),void 0===r&&(r=t.length);var a=[];if(n(t,s,r))for(var o=s;o * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r))for(var a=s;a0){var n=t[i-1],s=t.indexOf(n);t[i]=n,t[s]=e}return t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);if(-1!==i&&is||(t.splice(n,1),s===t.length-1?t.push(e):t.splice(s,0,e)),t}},function(t,e){t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),s=t.indexOf(i);if(n<0||s<0)throw new Error("Supplied items must be elements of the same array");return n=e;s--)a?r.push(i+s.toString()+n):r.push(s);else for(s=t;s<=e;s++)a?r.push(i+s.toString()+n):r.push(s);return r}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(42);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var s=[],r=Math.max(n((e-t)/(i||1)),0),a=0;a * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ function i(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function n(t,e){return te?1:0}var s=function(t,e,r,a,o){for(void 0===r&&(r=0),void 0===a&&(a=t.length-1),void 0===o&&(o=n);a>r;){if(a-r>600){var h=a-r+1,l=e-r+1,u=Math.log(h),c=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*c*(h-c)/h)*(l-h/2<0?-1:1),f=Math.max(r,Math.floor(e-l*c/h+d)),p=Math.min(a,Math.floor(e+(h-l)*c/h+d));s(t,e,f,p,o)}var m=t[e],g=r,x=a;for(i(t,r,e),o(t[a],m)>0&&i(t,r,a);g0;)x--}0===o(t[r],m)?i(t,r,x):i(t,++x,a),x<=e&&(r=x+1),e<=x&&(a=x-1)}};t.exports=s},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(7),s=i(64),r=function(t,e,i){for(var n=[],s=0;s * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(10);t.exports=function(t,e,i,s){var r;if(void 0===s&&(s=t),!Array.isArray(e))return-1!==(r=t.indexOf(e))?(n(t,r),i&&i.call(s,e),e):null;for(var a=e.length-1,o=[];a>=0;){var h=e[a];-1!==(r=t.indexOf(h))&&(n(t,r),o.push(h),i&&i.call(s,h)),a--}return o}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(10);t.exports=function(t,e,i,s){if(void 0===s&&(s=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var r=n(t,e);return i&&i.call(s,r),r}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5);t.exports=function(t,e,i,s,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),n(t,e,i)){var a=i-e,o=t.splice(e,a);if(s)for(var h=0;h * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(10);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var s=e+Math.floor(Math.random()*i);return n(t,s)}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e),s=t.indexOf(i);return-1!==n&&-1===s&&(t[n]=i,!0)}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i>0&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(5);t.exports=function(t,e,i,s,r){if(void 0===s&&(s=0),void 0===r&&(r=t.length),n(t,s,r))for(var a=s;a * @author Angry Bytes (and contributors) * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(297);function s(t,e){return String(t).localeCompare(e)}function r(t,e,i,n){var s,r,a,o,h,l=t.length,u=0,c=2*i;for(s=0;sl&&(r=l),a>l&&(a=l),o=s,h=r;;)if(o * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={os:i(27),browser:i(16),features:i(299),input:i(303),audio:i(304),video:i(305),fullscreen:i(306),canvasFeatures:i(307)}},function(t,e){var i,n,s=t.exports={};function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(t){if(i===setTimeout)return setTimeout(t,0);if((i===r||!i)&&setTimeout)return i=setTimeout,setTimeout(t,0);try{return i(t,0)}catch(e){try{return i.call(null,t,0)}catch(e){return i.call(this,t,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:r}catch(t){i=r}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var h,l=[],u=!1,c=-1;function d(){u&&h&&(u=!1,h.length?l=h.concat(l):c=-1,l.length&&f())}function f(){if(!u){var t=o(d);u=!0;for(var e=l.length;e;){for(h=l,l=[];++c1)for(var i=1;i * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(27),s=i(16),r=i(65),a={canvas:!1,canvasBitBltShift:null,file:!1,fileSystem:!1,getUserMedia:!0,littleEndian:!1,localStorage:!1,pointerLock:!1,stableSort:!1,support32bit:!1,vibration:!1,webGL:!1,worker:!1};t.exports=function(){if("function"==typeof importScripts)return a;a.canvas=!!window.CanvasRenderingContext2D;try{a.localStorage=!!localStorage.getItem}catch(t){a.localStorage=!1}a.file=!!(window.File&&window.FileReader&&window.FileList&&window.Blob),a.fileSystem=!!window.requestFileSystem;var t,e,i,o=!1;return a.webGL=function(){if(window.WebGLRenderingContext)try{var t=r.createWebGL(this),e=t.getContext("webgl")||t.getContext("experimental-webgl"),i=r.create2D(this),n=i.getContext("2d",{willReadFrequently:!0}).createImageData(1,1);return o=n.data instanceof Uint8ClampedArray,r.remove(t),r.remove(i),!!e}catch(t){return!1}return!1}(),a.worker=!!window.Worker,a.pointerLock="pointerLockElement"in document||"mozPointerLockElement"in document||"webkitPointerLockElement"in document,navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.oGetUserMedia,window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,a.getUserMedia=a.getUserMedia&&!!navigator.getUserMedia&&!!window.URL,s.firefox&&s.firefoxVersion<21&&(a.getUserMedia=!1),!n.iOS&&(s.ie||s.firefox||s.chrome)&&(a.canvasBitBltShift=!0),(s.safari||s.mobileSafari)&&(a.canvasBitBltShift=!1),navigator.vibrate=navigator.vibrate||navigator.webkitVibrate||navigator.mozVibrate||navigator.msVibrate,navigator.vibrate&&(a.vibration=!0),"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint32Array&&(a.littleEndian=(t=new ArrayBuffer(4),e=new Uint8Array(t),i=new Uint32Array(t),e[0]=161,e[1]=178,e[2]=195,e[3]=212,3569595041===i[0]||2712847316!==i[0]&&null)),a.support32bit="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof Int32Array&&null!==a.littleEndian&&o,a}()},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n={VERSION:"3.60.0-beta.18",BlendModes:i(12),ScaleModes:i(301),AUTO:0,CANVAS:1,WEBGL:2,HEADLESS:3,FOREVER:-1,NONE:4,UP:5,DOWN:6,LEFT:7,RIGHT:8};t.exports=n},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i,n="";t.exports={disable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!1),t},enable:function(t){return""===n&&(n=i(t)),n&&(t[n]=!0),t},getPrefix:i=function(t){for(var e=["i","webkitI","msI","mozI","oI"],i=0;i * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(16),s={gamepads:!1,mspointer:!1,touch:!1,wheelEvent:null};t.exports=("function"==typeof importScripts||(("ontouchstart"in document.documentElement||navigator.maxTouchPoints&&navigator.maxTouchPoints>=1)&&(s.touch=!0),(navigator.msPointerEnabled||navigator.pointerEnabled)&&(s.mspointer=!0),navigator.getGamepads&&(s.gamepads=!0),"onwheel"in window||n.ie&&"WheelEvent"in window?s.wheelEvent="wheel":"onmousewheel"in window?s.wheelEvent="mousewheel":n.firefox&&"MouseScrollEvent"in window&&(s.wheelEvent="DOMMouseScroll")),s)},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(16),s={flac:!1,aac:!1,audioData:!1,dolby:!1,m4a:!1,mp3:!1,ogg:!1,opus:!1,wav:!1,webAudio:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return s;s.audioData=!!window.Audio,s.webAudio=!(!window.AudioContext&&!window.webkitAudioContext);var t=document.createElement("audio"),e=!!t.canPlayType;try{if(e){var i=function(e,i){var n=t.canPlayType("audio/"+e).replace(/^no$/,"");return i?Boolean(n||t.canPlayType("audio/"+i).replace(/^no$/,"")):Boolean(n)};if(s.ogg=i('ogg; codecs="vorbis"'),s.opus=i('ogg; codecs="opus"',"opus"),s.mp3=i("mpeg"),s.wav=i("wav"),s.m4a=i("x-m4a"),s.aac=i("aac"),s.flac=i("flac","x-flac"),s.webm=i('webm; codecs="vorbis"'),""!==t.canPlayType('audio/mp4; codecs="ec-3"'))if(n.edge)s.dolby=!0;else if(n.safari&&n.safariVersion>=9&&/Mac OS X (\d+)_(\d+)/.test(navigator.userAgent)){var r=parseInt(RegExp.$1,10),a=parseInt(RegExp.$2,10);(10===r&&a>=11||r>10)&&(s.dolby=!0)}}}catch(t){}return s}()},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={h264:!1,hls:!1,mp4:!1,m4v:!1,ogg:!1,vp9:!1,webm:!1};t.exports=function(){if("function"==typeof importScripts)return i;var t=document.createElement("video"),e=!!t.canPlayType,n=/^no$/;try{e&&(t.canPlayType('video/ogg; codecs="theora"').replace(n,"")&&(i.ogg=!0),t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(n,"")&&(i.h264=!0,i.mp4=!0),t.canPlayType("video/x-m4v").replace(n,"")&&(i.m4v=!0),t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(n,"")&&(i.webm=!0),t.canPlayType('video/webm; codecs="vp9"').replace(n,"")&&(i.vp9=!0),t.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(n,"")&&(i.hls=!0))}catch(t){}return i}()},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={available:!1,cancel:"",keyboard:!1,request:""};t.exports=function(){if("function"==typeof importScripts)return i;var t,e="Fullscreen",n="FullScreen",s=["request"+e,"request"+n,"webkitRequest"+e,"webkitRequest"+n,"msRequest"+e,"msRequest"+n,"mozRequest"+n,"mozRequest"+e];for(t=0;t * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n,s,r,a=i(65),o={supportInverseAlpha:!1,supportNewBlendModes:!1};t.exports=("function"!=typeof importScripts&&void 0!==document&&(o.supportNewBlendModes=(n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/",s="AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==",(r=new Image).onload=function(){var t=new Image;t.onload=function(){var e=a.create2D(t,6).getContext("2d",{willReadFrequently:!0});if(e.globalCompositeOperation="multiply",e.drawImage(r,0,0),e.drawImage(t,2,0),!e.getImageData(2,0,1,1))return!1;var i=e.getImageData(2,0,1,1).data;a.remove(t),o.supportNewBlendModes=255===i[0]&&0===i[1]&&0===i[2]},t.src=n+"/wCKxvRF"+s},r.src=n+"AP804Oa6"+s,!1),o.supportInverseAlpha=function(){var t=a.create2D(this,2).getContext("2d",{willReadFrequently:!0});t.fillStyle="rgba(10, 20, 30, 0.5)",t.fillRect(0,0,1,1);var e=t.getImageData(0,0,1,1);if(null===e)return!1;t.putImageData(e,1,0);var i=t.getImageData(1,0,1,1),n=i.data[0]===e.data[0]&&i.data[1]===e.data[1]&&i.data[2]===e.data[2]&&i.data[3]===e.data[3];return a.remove(this),n}()),o)},function(t,e){t.exports=function(t,e,i){if(e===i)return t;var n=t.indexOf(e),s=t.indexOf(i);if(n<0||s<0)throw new Error("Supplied items must be elements of the same array");return t[n]=i,t[s]=e,t}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ t.exports={Alpha:i(310),AlphaSingle:i(311),BlendMode:i(312),ComputedSize:i(51),Crop:i(313),Depth:i(52),Flip:i(53),FX:i(314),GetBounds:i(315),Mask:i(324),Origin:i(329),PathFollower:i(330),Pipeline:i(333),ScrollFactor:i(54),Size:i(335),Texture:i(336),TextureCrop:i(337),Tint:i(338),ToJSON:i(59),Transform:i(55),TransformMatrix:i(56),Visible:i(57)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4),s={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,s){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=n(t,0,1),this._alphaTR=n(e,0,1),this._alphaBL=n(i,0,1),this._alphaBR=n(s,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,this._alphaBR=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=n(t,0,1);this._alphaTL=e,0!==e&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=n(t,0,1);this._alphaTR=e,0!==e&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=n(t,0,1);this._alphaBL=e,0!==e&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=n(t,0,1);this._alphaBR=e,0!==e&&(this.renderFlags|=2)}}};t.exports=s},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(4),s={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);this._alpha=e,0===e?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=s},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(12),s={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),(t|=0)>=-1&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=s},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={fxPadding:0,setFXPadding:function(t){return void 0===t&&(t=0),this.fxPadding=t,this},onFXCopy:function(){},onFX:function(){}};t.exports=i},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(28),s=i(41),r=i(2),a={prepareBoundsOutput:function(t,e){(void 0===e&&(e=!1),0!==this.rotation&&s(t,this.x,this.y,this.rotation),e&&this.parentContainer)&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t);return t},getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return t||(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,s,r,a,o,h,l;if(void 0===t&&(t=new n),this.parentContainer){var u=this.parentContainer.getBoundsTransformMatrix();this.getTopLeft(t),u.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),u.transformPoint(t.x,t.y,t),s=t.x,r=t.y,this.getBottomLeft(t),u.transformPoint(t.x,t.y,t),a=t.x,o=t.y,this.getBottomRight(t),u.transformPoint(t.x,t.y,t),h=t.x,l=t.y}else this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),s=t.x,r=t.y,this.getBottomLeft(t),a=t.x,o=t.y,this.getBottomRight(t),h=t.x,l=t.y;return t.x=Math.min(e,s,a,h),t.y=Math.min(i,r,o,l),t.width=Math.max(e,s,a,h)-t.x,t.height=Math.max(i,r,o,l)-t.y,t}};t.exports=a},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(66),s=i(67);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=s(t)/i);for(var a=0;a * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(319),r=i(320),a=i(29),o=i(322),h=i(2),l=new n({initialize:function(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.type=a.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return r(this,t,e,i)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(11);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(321),s=i(11);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(e=n(t)/i);for(var a=t.x1,o=t.y1,h=t.x2,l=t.y2,u=0;u * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(11);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(11);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(325),s=i(328),r={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t,e,i,s,r){return void 0===t&&(this.texture||this.shader||this.geom)&&(t=this),new n(this.scene,t,e,i,s,r)},createGeometryMask:function(t){return void 0!==t||"Graphics"!==this.type&&!this.geom||(t=this),new s(this.scene,t)}};t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(326),r=new n({initialize:function(t,e,i,n,s,r){e||(e=t.sys.make.image({x:i,y:n,key:s,frame:r,add:!1})),this.bitmapMask=e,this.invertAlpha=!1,this.isStencil=!1},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e,i)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null}});s.register("bitmapMask",(function(t,e,i,n,s){return new r(this.scene,t,e,i,n,s)})),t.exports=r},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(0),s=i(327),r=i(23),a=new n({initialize:function(t){this.scene=t,this.systems=t.sys,this.events=t.sys.events,this.displayList,this.updateList,this.events.once(r.BOOT,this.boot,this),this.events.on(r.START,this.start,this)},boot:function(){this.displayList=this.systems.displayList,this.updateList=this.systems.updateList,this.events.once(r.DESTROY,this.destroy,this)},start:function(){this.events.once(r.SHUTDOWN,this.shutdown,this)},existing:function(t){return(t.renderCanvas||t.renderWebGL)&&this.displayList.add(t),t.preUpdate&&this.updateList.add(t),t},shutdown:function(){this.events.off(r.SHUTDOWN,this.shutdown,this)},destroy:function(){this.shutdown(),this.events.off(r.START,this.start,this),this.scene=null,this.systems=null,this.events=null,this.displayList=null,this.updateList=null}});a.register=function(t,e){a.prototype.hasOwnProperty(t)||(a.prototype[t]=e)},a.remove=function(t){a.prototype.hasOwnProperty(t)&&delete a.prototype[t]},s.register("GameObjectFactory",a,"add"),t.exports=a},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={},n={},s={register:function(t,e,n,s){void 0===s&&(s=!1),i[t]={plugin:e,mapping:n,custom:s}},registerCustom:function(t,e,i,s){n[t]={plugin:e,mapping:i,data:s}},hasCore:function(t){return i.hasOwnProperty(t)},hasCustom:function(t){return n.hasOwnProperty(t)},getCore:function(t){return i[t]},getCustom:function(t){return n[t]},getCustomClass:function(t){return n.hasOwnProperty(t)?n[t].plugin:null},remove:function(t){i.hasOwnProperty(t)&&delete i[t]},removeCustom:function(t){n.hasOwnProperty(t)&&delete n[t]},destroyCorePlugins:function(){for(var t in i)i.hasOwnProperty(t)&&delete i[t]},destroyCustomPlugins:function(){for(var t in n)n.hasOwnProperty(t)&&delete n[t]}};t.exports=s},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=new(i(0))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var n=t.gl;t.flush(),0===t.maskStack.length&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var n=t.gl,s=this.geometryMask,r=t.maskCount;n.colorMask(!1,!1,!1,!1),i?(n.stencilFunc(n.EQUAL,r,255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)):(n.stencilFunc(n.EQUAL,r+1,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),s.renderWebGL(t,s,e),t.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),i?this.invertAlpha?n.stencilFunc(n.NOTEQUAL,r+1,255):n.stencilFunc(n.EQUAL,r+1,255):this.invertAlpha?n.stencilFunc(n.NOTEQUAL,r,255):n.stencilFunc(n.EQUAL,r,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i=t.currentMask;if(0===t.maskStack.length)i.mask=null,e.disable(e.STENCIL_TEST);else{var n=t.maskStack[t.maskStack.length-1];n.mask.applyStencil(t,n.camera,!1),t.currentCameraMask.mask!==n.mask?(i.mask=n.mask,i.camera=n.camera):i.mask=null}},preRenderCanvas:function(t,e,i){var n=this.geometryMask;t.currentContext.save(),n.renderCanvas(t,n,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=n},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=i},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(20),s=i(331),r=i(7),a=i(332),o=i(2),h={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:a.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=r(t,"from",0),t.to=r(t,"to",1);var h=s(t,"positionOnPath",!1);this.rotateToPath=s(t,"rotateToPath",!1),this.pathRotationOffset=r(t,"rotationOffset",0);var l=r(t,"startAt",e);if(l&&(t.onStart=function(t){var e=t.data[0];e.progress=l,e.elapsed=e.duration*l;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.setTargetValue()}),this.pathOffset||(this.pathOffset=new o(this.x,this.y)),this.pathVector||(this.pathVector=new o),this.pathDelta||(this.pathDelta=new o),this.pathDelta.reset(),t.persist=!0,this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),h&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=a.PLAYING_FORWARD,this.rotateToPath){var u=this.path.getPoint(.1);this.rotation=Math.atan2(u.y-this.y,u.x-this.x)+n(this.pathRotationOffset)}return this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,s=this.pathVector;if(i.copy(s).negate(),e.state===a.COMPLETE)return this.path.getPoint(e.end,s),i.add(s),s.add(this.pathOffset),void this.setPosition(s.x,s.y);if(e.state!==a.PLAYING_FORWARD&&e.state!==a.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),s),i.add(s),s.add(this.pathOffset);var r=this.x,o=this.y;this.setPosition(s.x,s.y);var h=this.x-r,l=this.y-o;if(0===h&&0===l)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(l,h)+n(this.pathRotationOffset))}}};t.exports=h},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports={CREATED:0,DELAY:2,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING:20,ACTIVE:21,LOOP_DELAY:22,COMPLETE_DELAY:23,START_DELAY:24,PENDING_REMOVE:25,REMOVED:26,FINISHED:27,DESTROYED:28,MAX:999999999999}},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(334),s=i(10),r={defaultPipeline:null,pipeline:null,hasPostPipeline:!1,postPipelines:null,pipelineData:null,initPipeline:function(t){var e=this.scene.sys.renderer;if(!e)return!1;var i=e.pipelines;if(this.postPipelines=[],this.pipelineData={},i){void 0===t&&(t=i.default);var n=i.get(t);if(n)return this.defaultPipeline=n,this.pipeline=n,!0}return!1},setPipeline:function(t,e,i){var s=this.scene.sys.renderer;if(!s)return this;var r=s.pipelines;if(r){var a=r.get(t);a&&(this.pipeline=a),e&&(this.pipelineData=i?n(e):e)}return this},setPostPipeline:function(t,e,i){var s=this.scene.sys.renderer;if(!s)return this;var r=s.pipelines;if(r){Array.isArray(t)||(t=[t]);for(var a=0;a0,this},setPipelineData:function(t,e){var i=this.pipelineData;return void 0===e?delete i[t]:i[t]=e,this},getPostPipeline:function(t){for(var e="string"==typeof t,i=this.postPipelines,n=[],s=0;s=0;i--){var n=e[i];("string"==typeof t&&n.name===t||"string"!=typeof t&&n instanceof t)&&(n.destroy(),s(e,i))}return this.hasPostPipeline=this.postPipelines.length>0,this},getPipelineName:function(){return this.pipeline.name}};t.exports=r},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i=function(t){var e,n,s;if("object"!=typeof t||null===t)return t;for(s in e=Array.isArray(t)?[]:{},t)n=t[s],e[s]=i(n);return e};t.exports=i},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight;var e=this.input;return e&&!e.customHitArea&&(e.hitArea.width=this.width,e.hitArea.height=this.height),this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(68),s={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof n?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=s},function(t,e,i){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(68),s={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){if(void 0===t)this.isCropped=!1;else if(this.frame){if("number"==typeof t)this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY);else{var s=t;this.frame.setCropUVs(this._crop,s.x,s.y,s.width,s.height,this.flipX,this.flipY)}this.isCropped=!0}return this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),t instanceof n?(this.texture=this.scene.sys.textures.get(t.texture.key),this.frame=t):this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=s},function(t,e){ /** * @author Richard Davey * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var i={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,n){return void 0===t&&(t=16777215),void 0===e&&(e=t,i=t,n=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=n,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this.tintFill||16777215!==this.tintTopLeft||16777215!==this.tintTopRight||16777215!==this.tintBottomLeft||16777215!==this.tintBottomRight}}};t.exports=i},function(t,e,i){ /** * @author Richard Davey * @author Felipe Alfonso <@bitnenfer> * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=n,r=n;r=i(340),t.exports={renderWebGL:s,renderCanvas:r}},function(t,e){t.exports=function(t,e,i,n){i.addToRenderList(e);var s=e.list;if(0!==s.length){var r=e.localTransform;n?(r.loadIdentity(),r.multiply(n),r.translate(e.x,e.y),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY)):r.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u * @copyright 2013-2023 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(28);t.exports=function(t,e,i){void 0===i&&(i=new n);var s=Math.min(t.x,e.x),r=Math.min(t.y,e.y),a=Math.max(t.right,e.right)-s,o=Math.max(t.bottom,e.bottom)-r;return i.setTo(s,r,a,o)}},function(t,e,i){ /** * @author Richard Davey * @copyright 2022 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ var n=i(1),s=i(1);s=i(343),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e){t.exports=function(t,e,i,n){var s=e.list;if(0!==s.length){i.addToRenderList(e);var r=e.localTransform;n?(r.loadIdentity(),r.multiply(n),r.translate(e.x,e.y),r.rotate(e.rotation),r.scale(e.scaleX,e.scaleY)):r.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u