!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){n(1),n(329),t.exports=n(437)},function(t,e,n){(function(t){"use strict";function e(t,e,n){t[e]||Object[r](t,e,{writable:!0,configurable:!0,value:n})}if(n(2),n(325),n(326),t._babelPolyfill)throw new Error("only one instance of babel-polyfill is allowed");t._babelPolyfill=!0;var r="defineProperty";e(String.prototype,"padLeft","".padStart),e(String.prototype,"padRight","".padEnd),"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function(t){[][t]&&e(Array,t,Function.call.bind([][t]))})}).call(e,function(){return this}())},function(t,e,n){n(3),n(52),n(53),n(54),n(55),n(57),n(60),n(61),n(62),n(63),n(64),n(65),n(66),n(67),n(68),n(70),n(72),n(74),n(76),n(79),n(80),n(81),n(85),n(87),n(89),n(92),n(93),n(94),n(95),n(97),n(98),n(99),n(100),n(101),n(102),n(103),n(105),n(106),n(107),n(109),n(110),n(111),n(113),n(115),n(116),n(117),n(118),n(119),n(120),n(121),n(122),n(123),n(124),n(125),n(126),n(127),n(132),n(133),n(137),n(138),n(139),n(140),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(158),n(159),n(161),n(162),n(168),n(169),n(171),n(172),n(173),n(177),n(178),n(179),n(180),n(181),n(183),n(184),n(185),n(186),n(189),n(191),n(192),n(193),n(195),n(197),n(199),n(200),n(201),n(203),n(204),n(205),n(206),n(216),n(220),n(221),n(223),n(224),n(228),n(229),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(251),n(252),n(253),n(254),n(255),n(257),n(258),n(259),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(270),n(271),n(273),n(274),n(275),n(276),n(279),n(280),n(282),n(283),n(284),n(285),n(287),n(288),n(289),n(290),n(291),n(292),n(293),n(294),n(295),n(296),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(323),n(324),t.exports=n(9)},function(t,e,n){"use strict";var r=n(4),i=n(5),o=n(6),a=n(8),s=n(18),u=n(22).KEY,h=n(7),l=n(23),f=n(24),c=n(19),d=n(25),p=n(26),y=n(27),v=n(29),g=n(42),x=n(45),m=n(12),b=n(32),w=n(16),A=n(17),T=n(46),E=n(49),O=n(51),S=n(11),M=n(30),P=O.f,C=S.f,R=E.f,I=r.Symbol,k=r.JSON,_=k&&k.stringify,L="prototype",j=d("_hidden"),D=d("toPrimitive"),N={}.propertyIsEnumerable,F=l("symbol-registry"),U=l("symbols"),B=l("op-symbols"),V=Object[L],X="function"==typeof I,W=r.QObject,q=!W||!W[L]||!W[L].findChild,G=o&&h(function(){return 7!=T(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=P(V,e);r&&delete V[e],C(t,e,n),r&&t!==V&&C(V,e,r)}:C,H=function(t){var e=U[t]=T(I[L]);return e._k=t,e},Y=X&&"symbol"==typeof I.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof I},z=function(t,e,n){return t===V&&z(B,e,n),m(t),e=w(e,!0),m(n),i(U,e)?(n.enumerable?(i(t,j)&&t[j][e]&&(t[j][e]=!1),n=T(n,{enumerable:A(0,!1)})):(i(t,j)||C(t,j,A(1,{})),t[j][e]=!0),G(t,e,n)):C(t,e,n)},Q=function(t,e){m(t);for(var n,r=g(e=b(e)),i=0,o=r.length;o>i;)z(t,n=r[i++],e[n]);return t},K=function(t,e){return void 0===e?T(t):Q(T(t),e)},Z=function(t){var e=N.call(this,t=w(t,!0));return!(this===V&&i(U,t)&&!i(B,t))&&(!(e||!i(this,t)||!i(U,t)||i(this,j)&&this[j][t])||e)},J=function(t,e){if(t=b(t),e=w(e,!0),t!==V||!i(U,e)||i(B,e)){var n=P(t,e);return!n||!i(U,e)||i(t,j)&&t[j][e]||(n.enumerable=!0),n}},$=function(t){for(var e,n=R(b(t)),r=[],o=0;n.length>o;)i(U,e=n[o++])||e==j||e==u||r.push(e);return r},tt=function(t){for(var e,n=t===V,r=R(n?B:b(t)),o=[],a=0;r.length>a;)!i(U,e=r[a++])||n&&!i(V,e)||o.push(U[e]);return o};X||(I=function(){if(this instanceof I)throw TypeError("Symbol is not a constructor!");var t=c(arguments.length>0?arguments[0]:void 0),e=function(n){this===V&&e.call(B,n),i(this,j)&&i(this[j],t)&&(this[j][t]=!1),G(this,t,A(1,n))};return o&&q&&G(V,t,{configurable:!0,set:e}),H(t)},s(I[L],"toString",function(){return this._k}),O.f=J,S.f=z,n(50).f=E.f=$,n(44).f=Z,n(43).f=tt,o&&!n(28)&&s(V,"propertyIsEnumerable",Z,!0),p.f=function(t){return H(d(t))}),a(a.G+a.W+a.F*!X,{Symbol:I});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)d(et[nt++]);for(var rt=M(d.store),it=0;rt.length>it;)y(rt[it++]);a(a.S+a.F*!X,"Symbol",{for:function(t){return i(F,t+="")?F[t]:F[t]=I(t)},keyFor:function(t){if(Y(t))return v(F,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){q=!0},useSimple:function(){q=!1}}),a(a.S+a.F*!X,"Object",{create:K,defineProperty:z,defineProperties:Q,getOwnPropertyDescriptor:J,getOwnPropertyNames:$,getOwnPropertySymbols:tt}),k&&a(a.S+a.F*(!X||h(function(){var t=I();return"[null]"!=_([t])||"{}"!=_({a:t})||"{}"!=_(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!Y(t)){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);return e=r[1],"function"==typeof e&&(n=e),!n&&x(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!Y(e))return e}),r[1]=e,_.apply(k,r)}}}),I[L][D]||n(10)(I[L],D,I[L].valueOf),f(I,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){t.exports=!n(7)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(4),i=n(9),o=n(10),a=n(18),s=n(20),u="prototype",h=function(t,e,n){var l,f,c,d,p=t&h.F,y=t&h.G,v=t&h.S,g=t&h.P,x=t&h.B,m=y?r:v?r[e]||(r[e]={}):(r[e]||{})[u],b=y?i:i[e]||(i[e]={}),w=b[u]||(b[u]={});y&&(n=e);for(l in n)f=!p&&m&&void 0!==m[l],c=(f?m:n)[l],d=x&&f?s(c,r):g&&"function"==typeof c?s(Function.call,c):c,m&&a(m,l,c,t&h.U),b[l]!=c&&o(b,l,d),g&&w[l]!=c&&(w[l]=c)};r.core=i,h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,h.U=64,h.R=128,t.exports=h},function(t,e){var n=t.exports={version:"2.5.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){var r=n(11),i=n(17);t.exports=n(6)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(12),i=n(14),o=n(16),a=Object.defineProperty;e.f=n(6)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(13);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(6)&&!n(7)(function(){return 7!=Object.defineProperty(n(15)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){var r=n(13),i=n(4).document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},function(t,e,n){var r=n(13);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(4),i=n(10),o=n(5),a=n(19)("src"),s="toString",u=Function[s],h=(""+u).split(s);n(9).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,s){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(u&&(o(n,a)||i(n,a,t[e]?""+t[e]:h.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||u.call(this)})},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(21);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var r=n(19)("meta"),i=n(13),o=n(5),a=n(11).f,s=0,u=Object.isExtensible||function(){return!0},h=!n(7)(function(){return u(Object.preventExtensions({}))}),l=function(t){a(t,r,{value:{i:"O"+ ++s,w:{}}})},f=function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!o(t,r)){if(!u(t))return"F";if(!e)return"E";l(t)}return t[r].i},c=function(t,e){if(!o(t,r)){if(!u(t))return!0;if(!e)return!1;l(t)}return t[r].w},d=function(t){return h&&p.NEED&&u(t)&&!o(t,r)&&l(t),t},p=t.exports={KEY:r,NEED:!1,fastKey:f,getWeak:c,onFreeze:d}},function(t,e,n){var r=n(4),i="__core-js_shared__",o=r[i]||(r[i]={});t.exports=function(t){return o[t]||(o[t]={})}},function(t,e,n){var r=n(11).f,i=n(5),o=n(25)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(23)("wks"),i=n(19),o=n(4).Symbol,a="function"==typeof o,s=t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))};s.store=r},function(t,e,n){e.f=n(25)},function(t,e,n){var r=n(4),i=n(9),o=n(28),a=n(26),s=n(11).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=o?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e){t.exports=!1},function(t,e,n){var r=n(30),i=n(32);t.exports=function(t,e){for(var n,o=i(t),a=r(o),s=a.length,u=0;s>u;)if(o[n=a[u++]]===e)return n}},function(t,e,n){var r=n(31),i=n(41);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(5),i=n(32),o=n(36)(!1),a=n(40)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),u=0,h=[];for(n in s)n!=a&&r(s,n)&&h.push(n);for(;e.length>u;)r(s,n=e[u++])&&(~o(h,n)||h.push(n));return h}},function(t,e,n){var r=n(33),i=n(35);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(34);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(32),i=n(37),o=n(39);t.exports=function(t){return function(e,n,a){var s,u=r(e),h=i(u.length),l=o(a,h);if(t&&n!=n){for(;h>l;)if(s=u[l++],s!=s)return!0}else for(;h>l;l++)if((t||l in u)&&u[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var r=n(38),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(38),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},function(t,e,n){var r=n(23)("keys"),i=n(19);t.exports=function(t){return r[t]||(r[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(30),i=n(43),o=n(44);t.exports=function(t){var e=r(t),n=i.f;if(n)for(var a,s=n(t),u=o.f,h=0;s.length>h;)u.call(t,a=s[h++])&&e.push(a);return e}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var r=n(34);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(12),i=n(47),o=n(41),a=n(40)("IE_PROTO"),s=function(){},u="prototype",h=function(){var t,e=n(15)("iframe"),r=o.length,i="<",a=">";for(e.style.display="none",n(48).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+a+"document.F=Object"+i+"/script"+a),t.close(),h=t.F;r--;)delete h[u][o[r]];return h()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[u]=r(t),n=new s,s[u]=null,n[a]=t):n=h(),void 0===e?n:i(n,e)}},function(t,e,n){var r=n(11),i=n(12),o=n(30);t.exports=n(6)?Object.defineProperties:function(t,e){i(t);for(var n,a=o(e),s=a.length,u=0;s>u;)r.f(t,n=a[u++],e[n]);return t}},function(t,e,n){var r=n(4).document;t.exports=r&&r.documentElement},function(t,e,n){var r=n(32),i=n(50).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return i(t)}catch(t){return a.slice()}};t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?s(t):i(r(t))}},function(t,e,n){var r=n(31),i=n(41).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(44),i=n(17),o=n(32),a=n(16),s=n(5),u=n(14),h=Object.getOwnPropertyDescriptor;e.f=n(6)?h:function(t,e){if(t=o(t),e=a(e,!0),u)try{return h(t,e)}catch(t){}if(s(t,e))return i(!r.f.call(t,e),t[e])}},function(t,e,n){var r=n(8);r(r.S,"Object",{create:n(46)})},function(t,e,n){var r=n(8);r(r.S+r.F*!n(6),"Object",{defineProperty:n(11).f})},function(t,e,n){var r=n(8);r(r.S+r.F*!n(6),"Object",{defineProperties:n(47)})},function(t,e,n){var r=n(32),i=n(51).f;n(56)("getOwnPropertyDescriptor",function(){return function(t,e){return i(r(t),e)}})},function(t,e,n){var r=n(8),i=n(9),o=n(7);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o(function(){n(1)}),"Object",a)}},function(t,e,n){var r=n(58),i=n(59);n(56)("getPrototypeOf",function(){return function(t){return i(r(t))}})},function(t,e,n){var r=n(35);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(5),i=n(58),o=n(40)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var r=n(58),i=n(30);n(56)("keys",function(){return function(t){return i(r(t))}})},function(t,e,n){n(56)("getOwnPropertyNames",function(){return n(49).f})},function(t,e,n){var r=n(13),i=n(22).onFreeze;n(56)("freeze",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(13),i=n(22).onFreeze;n(56)("seal",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(13),i=n(22).onFreeze;n(56)("preventExtensions",function(t){return function(e){return t&&r(e)?t(i(e)):e}})},function(t,e,n){var r=n(13);n(56)("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(13);n(56)("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},function(t,e,n){var r=n(13);n(56)("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},function(t,e,n){var r=n(8);r(r.S+r.F,"Object",{assign:n(69)})},function(t,e,n){"use strict";var r=n(30),i=n(43),o=n(44),a=n(58),s=n(33),u=Object.assign;t.exports=!u||n(7)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r})?function(t,e){for(var n=a(t),u=arguments.length,h=1,l=i.f,f=o.f;u>h;)for(var c,d=s(arguments[h++]),p=l?r(d).concat(l(d)):r(d),y=p.length,v=0;y>v;)f.call(d,c=p[v++])&&(n[c]=d[c]);return n}:u},function(t,e,n){var r=n(8);r(r.S,"Object",{is:n(71)})},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},function(t,e,n){var r=n(8);r(r.S,"Object",{setPrototypeOf:n(73).set})},function(t,e,n){var r=n(13),i=n(12),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(20)(Function.call,n(51).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},function(t,e,n){"use strict";var r=n(75),i={};i[n(25)("toStringTag")]="z",i+""!="[object z]"&&n(18)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},function(t,e,n){var r=n(34),i=n(25)("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(t){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),i))?n:o?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){var r=n(8);r(r.P,"Function",{bind:n(77)})},function(t,e,n){"use strict";var r=n(21),i=n(13),o=n(78),a=[].slice,s={},u=function(t,e,n){if(!(e in s)){for(var r=[],i=0;i>>0||(a.test(n)?16:10))}:r},function(t,e,n){var r=n(8),i=n(35),o=n(7),a=n(84),s="["+a+"]",u="​…",h=RegExp("^"+s+s+"*"),l=RegExp(s+s+"*$"),f=function(t,e,n){var i={},s=o(function(){return!!a[t]()||u[t]()!=u}),h=i[t]=s?e(c):a[t];n&&(i[n]=h),r(r.P+r.F*s,"String",i)},c=f.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(h,"")),2&e&&(t=t.replace(l,"")),t};t.exports=f},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,n){var r=n(8),i=n(86);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(t,e,n){var r=n(4).parseFloat,i=n(83).trim;t.exports=1/r(n(84)+"-0")!==-(1/0)?function(t){var e=i(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},function(t,e,n){"use strict";var r=n(4),i=n(5),o=n(34),a=n(88),s=n(16),u=n(7),h=n(50).f,l=n(51).f,f=n(11).f,c=n(83).trim,d="Number",p=r[d],y=p,v=p.prototype,g=o(n(46)(v))==d,x="trim"in String.prototype,m=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){e=x?e.trim():c(e,3);var n,r,i,o=e.charCodeAt(0);if(43===o||45===o){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var a,u=e.slice(2),h=0,l=u.length;hi)return NaN;return parseInt(u,r)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof p&&(g?u(function(){v.valueOf.call(n)}):o(n)!=d)?a(new y(m(e)),n,p):m(e)};for(var b,w=n(6)?h(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),A=0;w.length>A;A++)i(y,b=w[A])&&!i(p,b)&&f(p,b,l(y,b));p.prototype=v,v.constructor=p,n(18)(r,d,p)}},function(t,e,n){var r=n(13),i=n(73).set;t.exports=function(t,e,n){var o,a=e.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},function(t,e,n){"use strict";var r=n(8),i=n(38),o=n(90),a=n(91),s=1..toFixed,u=Math.floor,h=[0,0,0,0,0,0],l="Number.toFixed: incorrect invocation!",f="0",c=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*h[n],h[n]=r%1e7,r=u(r/1e7)},d=function(t){for(var e=6,n=0;--e>=0;)n+=h[e],h[e]=u(n/t),n=n%t*1e7},p=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==h[t]){var n=String(h[t]);e=""===e?n:e+a.call(f,7-n.length)+n}return e},y=function(t,e,n){return 0===e?n:e%2===1?y(t,e-1,n*t):y(t*t,e/2,n)},v=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(7)(function(){s.call({})})),"Number",{toFixed:function(t){var e,n,r,s,u=o(this,l),h=i(t),g="",x=f;if(h<0||h>20)throw RangeError(l);if(u!=u)return"NaN";if(u<=-1e21||u>=1e21)return String(u);if(u<0&&(g="-",u=-u),u>1e-21)if(e=v(u*y(2,69,1))-69,n=e<0?u*y(2,-e,1):u/y(2,e,1),n*=4503599627370496,e=52-e,e>0){for(c(0,n),r=h;r>=7;)c(1e7,0),r-=7;for(c(y(10,r,1),0),r=e-1;r>=23;)d(1<<23),r-=23;d(1<0?(s=x.length,x=g+(s<=h?"0."+a.call(f,h-s)+x:x.slice(0,s-h)+"."+x.slice(s-h))):x=g+x,x}})},function(t,e,n){var r=n(34);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},function(t,e,n){"use strict";var r=n(38),i=n(35);t.exports=function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Count can't be negative");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e,n){"use strict";var r=n(8),i=n(7),o=n(90),a=1..toPrecision;r(r.P+r.F*(i(function(){return"1"!==a.call(1,void 0)})||!i(function(){a.call({})})),"Number",{toPrecision:function(t){var e=o(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var r=n(8);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var r=n(8),i=n(4).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,n){var r=n(8);r(r.S,"Number",{isInteger:n(96)})},function(t,e,n){var r=n(13),i=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&i(t)===t}},function(t,e,n){var r=n(8);r(r.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var r=n(8),i=n(96),o=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return i(t)&&o(t)<=9007199254740991}})},function(t,e,n){var r=n(8);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var r=n(8);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var r=n(8),i=n(86);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,n){var r=n(8),i=n(82);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,n){var r=n(8),i=n(104),o=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+o(t-1)*o(t+1))}})},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){function r(t){return isFinite(t=+t)&&0!=t?t<0?-r(-t):Math.log(t+Math.sqrt(t*t+1)):t}var i=n(8),o=Math.asinh;i(i.S+i.F*!(o&&1/o(0)>0),"Math",{asinh:r})},function(t,e,n){var r=n(8),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var r=n(8),i=n(108);r(r.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e,n){var r=n(8);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var r=n(8),i=Math.exp;r(r.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var r=n(8),i=n(112);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||n(-2e-17)!=-2e-17?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){var r=n(8);r(r.S,"Math",{fround:n(114)})},function(t,e,n){var r=n(108),i=Math.pow,o=i(2,-52),a=i(2,-23),s=i(2,127)*(2-a),u=i(2,-126),h=function(t){return t+1/o-1/o};t.exports=Math.fround||function(t){var e,n,i=Math.abs(t),l=r(t);return is||n!=n?l*(1/0):l*n)}},function(t,e,n){var r=n(8),i=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,o=0,a=0,s=arguments.length,u=0;a0?(r=n/u,o+=r*r):o+=n;return u===1/0?1/0:u*Math.sqrt(o)}})},function(t,e,n){var r=n(8),i=Math.imul;r(r.S+r.F*n(7)(function(){return i(4294967295,5)!=-5||2!=i.length}),"Math",{imul:function(t,e){var n=65535,r=+t,i=+e,o=n&r,a=n&i;return 0|o*a+((n&r>>>16)*a+o*(n&i>>>16)<<16>>>0)}})},function(t,e,n){var r=n(8);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var r=n(8);r(r.S,"Math",{log1p:n(104)})},function(t,e,n){var r=n(8);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var r=n(8);r(r.S,"Math",{sign:n(108)})},function(t,e,n){var r=n(8),i=n(112),o=Math.exp;r(r.S+r.F*n(7)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(o(t-1)-o(-t-1))*(Math.E/2)}})},function(t,e,n){var r=n(8),i=n(112),o=Math.exp;r(r.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(o(t)+o(-t))}})},function(t,e,n){var r=n(8);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var r=n(8),i=n(39),o=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?o(e):o(((e-=65536)>>10)+55296,e%1024+56320))}return n.join("")}})},function(t,e,n){var r=n(8),i=n(32),o=n(37);r(r.S,"String",{raw:function(t){for(var e=i(t.raw),n=o(e.length),r=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var r=n(38),i=n(35);t.exports=function(t){return function(e,n){var o,a,s=String(i(e)),u=r(n),h=s.length;return u<0||u>=h?t?"":void 0:(o=s.charCodeAt(u),o<55296||o>56319||u+1===h||(a=s.charCodeAt(u+1))<56320||a>57343?t?s.charAt(u):o:t?s.slice(u,u+2):(o-55296<<10)+(a-56320)+65536)}}},function(t,e,n){"use strict";var r=n(28),i=n(8),o=n(18),a=n(10),s=n(5),u=n(130),h=n(131),l=n(24),f=n(59),c=n(25)("iterator"),d=!([].keys&&"next"in[].keys()),p="@@iterator",y="keys",v="values",g=function(){return this};t.exports=function(t,e,n,x,m,b,w){h(n,e,x);var A,T,E,O=function(t){if(!d&&t in C)return C[t];switch(t){case y:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",M=m==v,P=!1,C=t.prototype,R=C[c]||C[p]||m&&C[m],I=R||O(m),k=m?M?O("entries"):I:void 0,_="Array"==e?C.entries||R:R;if(_&&(E=f(_.call(new t)),E!==Object.prototype&&E.next&&(l(E,S,!0),r||s(E,c)||a(E,c,g))),M&&R&&R.name!==v&&(P=!0,I=function(){return R.call(this)}),r&&!w||!d&&!P&&C[c]||a(C,c,I),u[e]=I,u[S]=g,m)if(A={values:M?I:O(v),keys:b?I:O(y),entries:k},w)for(T in A)T in C||o(C,T,A[T]);else i(i.P+i.F*(d||P),e,A);return A}},function(t,e){t.exports={}},function(t,e,n){"use strict";var r=n(46),i=n(17),o=n(24),a={};n(10)(a,n(25)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},function(t,e,n){"use strict";var r=n(8),i=n(128)(!1);r(r.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(8),i=n(37),o=n(134),a="endsWith",s=""[a];r(r.P+r.F*n(136)(a),"String",{endsWith:function(t){var e=o(this,t,a),n=arguments.length>1?arguments[1]:void 0,r=i(e.length),u=void 0===n?r:Math.min(i(n),r),h=String(t);return s?s.call(e,h,u):e.slice(u-h.length,u)===h}})},function(t,e,n){var r=n(135),i=n(35);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},function(t,e,n){var r=n(13),i=n(34),o=n(25)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,n){var r=n(25)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){"use strict";var r=n(8),i=n(134),o="includes";r(r.P+r.F*n(136)(o),"String",{includes:function(t){return!!~i(this,t,o).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(8);r(r.P,"String",{repeat:n(91)})},function(t,e,n){"use strict";var r=n(8),i=n(37),o=n(134),a="startsWith",s=""[a];r(r.P+r.F*n(136)(a),"String",{startsWith:function(t){var e=o(this,t,a),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return s?s.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){"use strict";n(141)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},function(t,e,n){var r=n(8),i=n(7),o=n(35),a=/"/g,s=function(t,e,n,r){var i=String(o(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(r).replace(a,""")+'"'),s+">"+i+""};t.exports=function(t,e){var n={};n[t]=e(s),r(r.P+r.F*i(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},function(t,e,n){"use strict";n(141)("big",function(t){return function(){return t(this,"big","","")}})},function(t,e,n){"use strict";n(141)("blink",function(t){return function(){return t(this,"blink","","")}})},function(t,e,n){"use strict";n(141)("bold",function(t){return function(){return t(this,"b","","")}})},function(t,e,n){"use strict";n(141)("fixed",function(t){return function(){return t(this,"tt","","")}})},function(t,e,n){"use strict";n(141)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},function(t,e,n){"use strict";n(141)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},function(t,e,n){"use strict";n(141)("italics",function(t){return function(){return t(this,"i","","")}})},function(t,e,n){"use strict";n(141)("link",function(t){return function(e){return t(this,"a","href",e)}})},function(t,e,n){"use strict";n(141)("small",function(t){return function(){return t(this,"small","","")}})},function(t,e,n){"use strict";n(141)("strike",function(t){return function(){return t(this,"strike","","")}})},function(t,e,n){"use strict";n(141)("sub",function(t){return function(){return t(this,"sub","","")}})},function(t,e,n){"use strict";n(141)("sup",function(t){return function(){return t(this,"sup","","")}})},function(t,e,n){var r=n(8);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var r=n(8),i=n(58),o=n(16);r(r.P+r.F*n(7)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=i(this),n=o(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var r=n(8),i=n(157);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,e,n){"use strict";var r=n(7),i=Date.prototype.getTime,o=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=o.call(new Date(-5e13-1))})||!r(function(){o.call(new Date(NaN)); })?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:o},function(t,e,n){var r=Date.prototype,i="Invalid Date",o="toString",a=r[o],s=r.getTime;new Date(NaN)+""!=i&&n(18)(r,o,function(){var t=s.call(this);return t===t?a.call(this):i})},function(t,e,n){var r=n(25)("toPrimitive"),i=Date.prototype;r in i||n(10)(i,r,n(160))},function(t,e,n){"use strict";var r=n(12),i=n(16),o="number";t.exports=function(t){if("string"!==t&&t!==o&&"default"!==t)throw TypeError("Incorrect hint");return i(r(this),t!=o)}},function(t,e,n){var r=n(8);r(r.S,"Array",{isArray:n(45)})},function(t,e,n){"use strict";var r=n(20),i=n(8),o=n(58),a=n(163),s=n(164),u=n(37),h=n(165),l=n(166);i(i.S+i.F*!n(167)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,i,f,c=o(t),d="function"==typeof this?this:Array,p=arguments.length,y=p>1?arguments[1]:void 0,v=void 0!==y,g=0,x=l(c);if(v&&(y=r(y,p>2?arguments[2]:void 0,2)),void 0==x||d==Array&&s(x))for(e=u(c.length),n=new d(e);e>g;g++)h(n,g,v?y(c[g],g):c[g]);else for(f=x.call(c),n=new d;!(i=f.next()).done;g++)h(n,g,v?a(f,y,[i.value,g],!0):i.value);return n.length=g,n}})},function(t,e,n){var r=n(12);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(130),i=n(25)("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},function(t,e,n){"use strict";var r=n(11),i=n(17);t.exports=function(t,e,n){e in t?r.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var r=n(75),i=n(25)("iterator"),o=n(130);t.exports=n(9).getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},function(t,e,n){var r=n(25)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},t(o)}catch(t){}return n}},function(t,e,n){"use strict";var r=n(8),i=n(165);r(r.S+r.F*n(7)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var r=n(8),i=n(32),o=[].join;r(r.P+r.F*(n(33)!=Object||!n(170)(o)),"Array",{join:function(t){return o.call(i(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var r=n(7);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},function(t,e,n){"use strict";var r=n(8),i=n(48),o=n(34),a=n(39),s=n(37),u=[].slice;r(r.P+r.F*n(7)(function(){i&&u.call(i)}),"Array",{slice:function(t,e){var n=s(this.length),r=o(this);if(e=void 0===e?n:e,"Array"==r)return u.call(this,t,e);for(var i=a(t,n),h=a(e,n),l=s(h-i),f=Array(l),c=0;cw;w++)if((c||w in x)&&(y=x[w],v=m(y,w,g),t))if(n)A[w]=v;else if(v)switch(t){case 3:return!0;case 5:return y;case 6:return w;case 2:A.push(y)}else if(l)return!1;return f?-1:h||l?l:A}}},function(t,e,n){var r=n(176);t.exports=function(t,e){return new(r(t))(e)}},function(t,e,n){var r=n(13),i=n(45),o=n(25)("species");t.exports=function(t){var e;return i(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&(e=e[o],null===e&&(e=void 0))),void 0===e?Array:e}},function(t,e,n){"use strict";var r=n(8),i=n(174)(1);r(r.P+r.F*!n(170)([].map,!0),"Array",{map:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(8),i=n(174)(2);r(r.P+r.F*!n(170)([].filter,!0),"Array",{filter:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(8),i=n(174)(3);r(r.P+r.F*!n(170)([].some,!0),"Array",{some:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(8),i=n(174)(4);r(r.P+r.F*!n(170)([].every,!0),"Array",{every:function(t){return i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(8),i=n(182);r(r.P+r.F*!n(170)([].reduce,!0),"Array",{reduce:function(t){return i(this,t,arguments.length,arguments[1],!1)}})},function(t,e,n){var r=n(21),i=n(58),o=n(33),a=n(37);t.exports=function(t,e,n,s,u){r(e);var h=i(t),l=o(h),f=a(h.length),c=u?f-1:0,d=u?-1:1;if(n<2)for(;;){if(c in l){s=l[c],c+=d;break}if(c+=d,u?c<0:f<=c)throw TypeError("Reduce of empty array with no initial value")}for(;u?c>=0:f>c;c+=d)c in l&&(s=e(s,l[c],c,h));return s}},function(t,e,n){"use strict";var r=n(8),i=n(182);r(r.P+r.F*!n(170)([].reduceRight,!0),"Array",{reduceRight:function(t){return i(this,t,arguments.length,arguments[1],!0)}})},function(t,e,n){"use strict";var r=n(8),i=n(36)(!1),o=[].indexOf,a=!!o&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(170)(o)),"Array",{indexOf:function(t){return a?o.apply(this,arguments)||0:i(this,t,arguments[1])}})},function(t,e,n){"use strict";var r=n(8),i=n(32),o=n(38),a=n(37),s=[].lastIndexOf,u=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(u||!n(170)(s)),"Array",{lastIndexOf:function(t){if(u)return s.apply(this,arguments)||0;var e=i(this),n=a(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,o(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},function(t,e,n){var r=n(8);r(r.P,"Array",{copyWithin:n(187)}),n(188)("copyWithin")},function(t,e,n){"use strict";var r=n(58),i=n(39),o=n(37);t.exports=[].copyWithin||function(t,e){var n=r(this),a=o(n.length),s=i(t,a),u=i(e,a),h=arguments.length>2?arguments[2]:void 0,l=Math.min((void 0===h?a:i(h,a))-u,a-s),f=1;for(u0;)u in n?n[s]=n[u]:delete n[s],s+=f,u+=f;return n}},function(t,e,n){var r=n(25)("unscopables"),i=Array.prototype;void 0==i[r]&&n(10)(i,r,{}),t.exports=function(t){i[r][t]=!0}},function(t,e,n){var r=n(8);r(r.P,"Array",{fill:n(190)}),n(188)("fill")},function(t,e,n){"use strict";var r=n(58),i=n(39),o=n(37);t.exports=function(t){for(var e=r(this),n=o(e.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,h=void 0===u?n:i(u,n);h>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var r=n(8),i=n(174)(5),o="find",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(188)(o)},function(t,e,n){"use strict";var r=n(8),i=n(174)(6),o="findIndex",a=!0;o in[]&&Array(1)[o](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(188)(o)},function(t,e,n){n(194)("Array")},function(t,e,n){"use strict";var r=n(4),i=n(11),o=n(6),a=n(25)("species");t.exports=function(t){var e=r[t];o&&e&&!e[a]&&i.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,n){"use strict";var r=n(188),i=n(196),o=n(130),a=n(32);t.exports=n(129)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):"keys"==e?i(0,n):"values"==e?i(0,t[n]):i(0,[n,t[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(4),i=n(88),o=n(11).f,a=n(50).f,s=n(135),u=n(198),h=r.RegExp,l=h,f=h.prototype,c=/a/g,d=/a/g,p=new h(c)!==c;if(n(6)&&(!p||n(7)(function(){return d[n(25)("match")]=!1,h(c)!=c||h(d)==d||"/a/i"!=h(c,"i")}))){h=function(t,e){var n=this instanceof h,r=s(t),o=void 0===e;return!n&&r&&t.constructor===h&&o?t:i(p?new l(r&&!o?t.source:t,e):l((r=t instanceof h)?t.source:t,r&&o?u.call(t):e),n?this:f,h)};for(var y=(function(t){t in h||o(h,t,{configurable:!0,get:function(){return l[t]},set:function(e){l[t]=e}})}),v=a(l),g=0;v.length>g;)y(v[g++]);f.constructor=h,h.prototype=f,n(18)(r,"RegExp",h)}n(194)("RegExp")},function(t,e,n){"use strict";var r=n(12);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";n(200);var r=n(12),i=n(198),o=n(6),a="toString",s=/./[a],u=function(t){n(18)(RegExp.prototype,a,t,!0)};n(7)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?u(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?i.call(t):void 0)}):s.name!=a&&u(function(){return s.call(this)})},function(t,e,n){n(6)&&"g"!=/./g.flags&&n(11).f(RegExp.prototype,"flags",{configurable:!0,get:n(198)})},function(t,e,n){n(202)("match",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){"use strict";var r=n(10),i=n(18),o=n(7),a=n(35),s=n(25);t.exports=function(t,e,n){var u=s(t),h=n(a,u,""[t]),l=h[0],f=h[1];o(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(i(String.prototype,t,l),r(RegExp.prototype,u,2==e?function(t,e){return f.call(t,this,e)}:function(t){return f.call(t,this)}))}},function(t,e,n){n(202)("replace",2,function(t,e,n){return[function(r,i){"use strict";var o=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},n]})},function(t,e,n){n(202)("search",1,function(t,e,n){return[function(n){"use strict";var r=t(this),i=void 0==n?void 0:n[e];return void 0!==i?i.call(n,r):new RegExp(n)[e](String(r))},n]})},function(t,e,n){n(202)("split",2,function(t,e,r){"use strict";var i=n(135),o=r,a=[].push,s="split",u="length",h="lastIndex";if("c"=="abbc"[s](/(b)*/)[1]||4!="test"[s](/(?:)/,-1)[u]||2!="ab"[s](/(?:ab)*/)[u]||4!="."[s](/(.?)(.?)/)[u]||"."[s](/()()/)[u]>1||""[s](/.?/)[u]){var l=void 0===/()??/.exec("")[1];r=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!i(t))return o.call(n,t,e);var r,s,f,c,d,p=[],y=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,g=void 0===e?4294967295:e>>>0,x=new RegExp(t.source,y+"g");for(l||(r=new RegExp("^"+x.source+"$(?!\\s)",y));(s=x.exec(n))&&(f=s.index+s[0][u],!(f>v&&(p.push(n.slice(v,s.index)),!l&&s[u]>1&&s[0].replace(r,function(){for(d=1;d1&&s.index=g)));)x[h]===s.index&&x[h]++;return v===n[u]?!c&&x.test("")||p.push(""):p.push(n.slice(v)),p[u]>g?p.slice(0,g):p}}else"0"[s](void 0,0)[u]&&(r=function(t,e){return void 0===t&&0===e?[]:o.call(this,t,e)});return[function(n,i){var o=t(this),a=void 0==n?void 0:n[e];return void 0!==a?a.call(n,o,i):r.call(String(o),n,i)},r]})},function(t,e,n){"use strict";var r,i,o,a,s=n(28),u=n(4),h=n(20),l=n(75),f=n(8),c=n(13),d=n(21),p=n(207),y=n(208),v=n(209),g=n(210).set,x=n(211)(),m=n(212),b=n(213),w=n(214),A="Promise",T=u.TypeError,E=u.process,O=u[A],S="process"==l(E),M=function(){},P=i=m.f,C=!!function(){try{var t=O.resolve(1),e=(t.constructor={})[n(25)("species")]=function(t){t(M,M)};return(S||"function"==typeof PromiseRejectionEvent)&&t.then(M)instanceof e}catch(t){}}(),R=s?function(t,e){return t===e||t===O&&e===a}:function(t,e){return t===e},I=function(t){var e;return!(!c(t)||"function"!=typeof(e=t.then))&&e},k=function(t,e){if(!t._n){t._n=!0;var n=t._c;x(function(){for(var r=t._v,i=1==t._s,o=0,a=function(e){var n,o,a=i?e.ok:e.fail,s=e.resolve,u=e.reject,h=e.domain;try{a?(i||(2==t._h&&j(t),t._h=1),a===!0?n=r:(h&&h.enter(),n=a(r),h&&h.exit()),n===e.promise?u(T("Promise-chain cycle")):(o=I(n))?o.call(n,s,u):s(n)):u(r)}catch(t){u(t)}};n.length>o;)a(n[o++]);t._c=[],t._n=!1,e&&!t._h&&_(t)})}},_=function(t){g.call(u,function(){var e,n,r,i=t._v,o=L(t);if(o&&(e=b(function(){S?E.emit("unhandledRejection",i,t):(n=u.onunhandledrejection)?n({promise:t,reason:i}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",i)}),t._h=S||L(t)?2:1),t._a=void 0,o&&e.e)throw e.v})},L=function(t){if(1==t._h)return!1;for(var e,n=t._a||t._c,r=0;n.length>r;)if(e=n[r++],e.fail||!L(e.promise))return!1;return!0},j=function(t){g.call(u,function(){var e;S?E.emit("rejectionHandled",t):(e=u.onrejectionhandled)&&e({promise:t,reason:t._v})})},D=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),k(e,!0))},N=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw T("Promise can't be resolved itself");(e=I(t))?x(function(){var r={_w:n,_d:!1};try{e.call(t,h(N,r,1),h(D,r,1))}catch(t){D.call(r,t)}}):(n._v=t,n._s=1,k(n,!1))}catch(t){D.call({_w:n,_d:!1},t)}}};C||(O=function(t){p(this,O,A,"_h"),d(t),r.call(this);try{t(h(N,this,1),h(D,this,1))}catch(t){D.call(this,t)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(215)(O.prototype,{then:function(t,e){var n=P(v(this,O));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=S?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&k(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r;this.promise=t,this.resolve=h(N,t,1),this.reject=h(D,t,1)},m.f=P=function(t){return R(O,t)?new o(t):i(t)}),f(f.G+f.W+f.F*!C,{Promise:O}),n(24)(O,A),n(194)(A),a=n(9)[A],f(f.S+f.F*!C,A,{reject:function(t){var e=P(this),n=e.reject;return n(t),e.promise}}),f(f.S+f.F*(s||!C),A,{resolve:function(t){return t instanceof O&&R(t.constructor,this)?t:w(this,t)}}),f(f.S+f.F*!(C&&n(167)(function(t){O.all(t).catch(M)})),A,{all:function(t){var e=this,n=P(e),r=n.resolve,i=n.reject,o=b(function(){var n=[],o=0,a=1;y(t,!1,function(t){var s=o++,u=!1;n.push(void 0),a++,e.resolve(t).then(function(t){u||(u=!0,n[s]=t,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(t){var e=this,n=P(e),r=n.reject,i=b(function(){y(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(20),i=n(163),o=n(164),a=n(12),s=n(37),u=n(166),h={},l={},e=t.exports=function(t,e,n,f,c){var d,p,y,v,g=c?function(){return t}:u(t),x=r(n,f,e?2:1),m=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(o(g)){for(d=s(t.length);d>m;m++)if(v=e?x(a(p=t[m])[0],p[1]):x(t[m]),v===h||v===l)return v}else for(y=g.call(t);!(p=y.next()).done;)if(v=i(y,x,p.value,e),v===h||v===l)return v};e.BREAK=h,e.RETURN=l},function(t,e,n){var r=n(12),i=n(21),o=n(25)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[o])?e:i(n)}},function(t,e,n){var r,i,o,a=n(20),s=n(78),u=n(48),h=n(15),l=n(4),f=l.process,c=l.setImmediate,d=l.clearImmediate,p=l.MessageChannel,y=l.Dispatch,v=0,g={},x="onreadystatechange",m=function(){var t=+this;if(g.hasOwnProperty(t)){var e=g[t];delete g[t],e()}},b=function(t){m.call(t.data)};c&&d||(c=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return g[++v]=function(){s("function"==typeof t?t:Function(t),e)},r(v),v},d=function(t){delete g[t]},"process"==n(34)(f)?r=function(t){f.nextTick(a(m,t,1))}:y&&y.now?r=function(t){y.now(a(m,t,1))}:p?(i=new p,o=i.port2,i.port1.onmessage=b,r=a(o.postMessage,o,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(t){l.postMessage(t+"","*")},l.addEventListener("message",b,!1)):r=x in h("script")?function(t){u.appendChild(h("script"))[x]=function(){u.removeChild(this),m.call(t)}}:function(t){setTimeout(a(m,t,1),0)}),t.exports={set:c,clear:d}},function(t,e,n){var r=n(4),i=n(210).set,o=r.MutationObserver||r.WebKitMutationObserver,a=r.process,s=r.Promise,u="process"==n(34)(a);t.exports=function(){var t,e,n,h=function(){var r,i;for(u&&(r=a.domain)&&r.exit();t;){i=t.fn,t=t.next;try{i()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(h)};else if(o){var l=!0,f=document.createTextNode("");new o(h).observe(f,{characterData:!0}),n=function(){f.data=l=!l}}else if(s&&s.resolve){var c=s.resolve();n=function(){c.then(h)}}else n=function(){i.call(r,h)};return function(r){var i={fn:r,next:void 0};e&&(e.next=i),t||(t=i,n()),e=i}}},function(t,e,n){"use strict";function r(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=i(e),this.reject=i(n)}var i=n(21);t.exports.f=function(t){return new r(t)}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},function(t,e,n){var r=n(212);t.exports=function(t,e){var n=r.f(t),i=n.resolve;return i(e),n.promise}},function(t,e,n){var r=n(18);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},function(t,e,n){"use strict";var r=n(217),i=n(218),o="Map";t.exports=n(219)(o,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(i(this,o),t);return e&&e.v},set:function(t,e){return r.def(i(this,o),0===t?0:t,e)}},r,!0)},function(t,e,n){"use strict";var r=n(11).f,i=n(46),o=n(215),a=n(20),s=n(207),u=n(208),h=n(129),l=n(196),f=n(194),c=n(6),d=n(22).fastKey,p=n(218),y=c?"_s":"size",v=function(t,e){var n,r=d(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,h){var l=t(function(t,r){s(t,l,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[y]=0,void 0!=r&&u(r,n,t[h],t)});return o(l.prototype,{clear:function(){for(var t=p(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[y]=0},delete:function(t){var n=p(this,e),r=v(n,t);if(r){var i=r.n,o=r.p;delete n._i[r.i],r.r=!0,o&&(o.n=i),i&&(i.p=o),n._f==r&&(n._f=i),n._l==r&&(n._l=o),n[y]--}return!!r},forEach:function(t){p(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!v(p(this,e),t)}}),c&&r(l.prototype,"size",{get:function(){return p(this,e)[y]}}),l},def:function(t,e,n){var r,i,o=v(t,e);return o?o.v=n:(t._l=o={i:i=d(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=o),r&&(r.n=o),t[y]++,"F"!==i&&(t._i[i]=o)),t},getEntry:v,setStrong:function(t,e,n){h(t,e,function(t,n){this._t=p(t,e),this._k=n,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?l(0,n.k):"values"==e?l(0,n.v):l(0,[n.k,n.v]):(t._t=void 0,l(1))},n?"entries":"values",!n,!0),f(e)}}},function(t,e,n){var r=n(13);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e,n){"use strict";var r=n(4),i=n(8),o=n(18),a=n(215),s=n(22),u=n(208),h=n(207),l=n(13),f=n(7),c=n(167),d=n(24),p=n(88);t.exports=function(t,e,n,y,v,g){var x=r[t],m=x,b=v?"set":"add",w=m&&m.prototype,A={},T=function(t){var e=w[t];o(w,t,"delete"==t?function(t){return!(g&&!l(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(g&&!l(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!l(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof m&&(g||w.forEach&&!f(function(){(new m).entries().next()}))){var E=new m,O=E[b](g?{}:-0,1)!=E,S=f(function(){E.has(1)}),M=c(function(t){new m(t)}),P=!g&&f(function(){for(var t=new m,e=5;e--;)t[b](e,e);return!t.has(-0)});M||(m=e(function(e,n){h(e,m,t);var r=p(new x,e,m);return void 0!=n&&u(n,v,r[b],r),r}),m.prototype=w,w.constructor=m),(S||P)&&(T("delete"),T("has"),v&&T("get")),(P||O)&&T(b),g&&w.clear&&delete w.clear}else m=y.getConstructor(e,t,v,b),a(m.prototype,n),s.NEED=!0;return d(m,t),A[t]=m,i(i.G+i.W+i.F*(m!=x),A),g||y.setStrong(m,t,v),m}},function(t,e,n){"use strict";var r=n(217),i=n(218),o="Set";t.exports=n(219)(o,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,o),t=0===t?0:t,t)}},r)},function(t,e,n){"use strict";var r,i=n(174)(0),o=n(18),a=n(22),s=n(69),u=n(222),h=n(13),l=n(7),f=n(218),c="WeakMap",d=a.getWeak,p=Object.isExtensible,y=u.ufstore,v={},g=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},x={get:function(t){if(h(t)){var e=d(t);return e===!0?y(f(this,c)).get(t):e?e[this._i]:void 0}},set:function(t,e){return u.def(f(this,c),t,e)}},m=t.exports=n(219)(c,g,x,u,!0,!0);l(function(){return 7!=(new m).set((Object.freeze||Object)(v),7).get(v)})&&(r=u.getConstructor(g,c),s(r.prototype,x),a.NEED=!0,i(["delete","has","get","set"],function(t){var e=m.prototype,n=e[t];o(e,t,function(e,i){if(h(e)&&!p(e)){this._f||(this._f=new r);var o=this._f[t](e,i);return"set"==t?this:o}return n.call(this,e,i)})}))},function(t,e,n){"use strict";var r=n(215),i=n(22).getWeak,o=n(12),a=n(13),s=n(207),u=n(208),h=n(174),l=n(5),f=n(218),c=h(5),d=h(6),p=0,y=function(t){return t._l||(t._l=new v)},v=function(){this.a=[]},g=function(t,e){return c(t.a,function(t){return t[0]===e})};v.prototype={get:function(t){var e=g(this,t);if(e)return e[1]},has:function(t){return!!g(this,t)},set:function(t,e){var n=g(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=d(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,o){var h=t(function(t,r){s(t,h,e,"_i"),t._t=e,t._i=p++,t._l=void 0,void 0!=r&&u(r,n,t[o],t)});return r(h.prototype,{delete:function(t){if(!a(t))return!1;var n=i(t);return n===!0?y(f(this,e)).delete(t):n&&l(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=i(t);return n===!0?y(f(this,e)).has(t):n&&l(n,this._i)}}),h},def:function(t,e,n){var r=i(o(e),!0);return r===!0?y(t).set(e,n):r[t._i]=n,t},ufstore:y}},function(t,e,n){"use strict";var r=n(222),i=n(218),o="WeakSet";n(219)(o,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(i(this,o),t,!0)}},r,!1,!0)},function(t,e,n){"use strict";var r=n(8),i=n(225),o=n(226),a=n(12),s=n(39),u=n(37),h=n(13),l=n(4).ArrayBuffer,f=n(209),c=o.ArrayBuffer,d=o.DataView,p=i.ABV&&l.isView,y=c.prototype.slice,v=i.VIEW,g="ArrayBuffer";r(r.G+r.W+r.F*(l!==c),{ArrayBuffer:c}),r(r.S+r.F*!i.CONSTR,g,{isView:function(t){return p&&p(t)||h(t)&&v in t}}),r(r.P+r.U+r.F*n(7)(function(){return!new c(2).slice(1,void 0).byteLength}),g,{slice:function(t,e){if(void 0!==y&&void 0===e)return y.call(a(this),t);for(var n=a(this).byteLength,r=s(t,n),i=s(void 0===e?n:e,n),o=new(f(this,c))(u(i-r)),h=new d(this),l=new d(o),p=0;r>1,l=23===e?V(2,-24)-V(2,-77):0,f=0,c=t<0||0===t&&1/t<0?1:0;for(t=B(t),t!=t||t===F?(i=t!=t?1:0,r=u):(r=X(W(t)/q),t*(o=V(2,-r))<1&&(r--,o*=2),t+=r+h>=1?l/o:l*V(2,1-h),t*o>=2&&(r++,o/=2),r+h>=u?(i=0,r=u):r+h>=1?(i=(t*o-1)*V(2,e),r+=h):(i=t*V(2,h-1)*V(2,e),r=0));e>=8;a[f++]=255&i,i/=256,e-=8);for(r=r<0;a[f++]=255&r,r/=256,s-=8);return a[--f]|=128*c,a}function i(t,e,n){var r,i=8*n-e-1,o=(1<>1,s=i-7,u=n-1,h=t[u--],l=127&h;for(h>>=7;s>0;l=256*l+t[u],u--,s-=8);for(r=l&(1<<-s)-1,l>>=-s,s+=e;s>0;r=256*r+t[u],u--,s-=8);if(0===l)l=1-a;else{if(l===o)return r?NaN:h?-F:F;r+=V(2,e),l-=a}return(h?-1:1)*r*V(2,l-e)}function o(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function a(t){return[255&t]}function s(t){return[255&t,t>>8&255]}function u(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function h(t){return r(t,52,8)}function l(t){return r(t,23,4)}function f(t,e,n){S(t[I],e,{get:function(){return this[n]}})}function c(t,e,n,r){var i=+n,o=E(i);if(o+e>t[Q])throw N(_);var a=t[z]._b,s=o+t[K],u=a.slice(s,s+e);return r?u:u.reverse()}function d(t,e,n,r,i,o){var a=+n,s=E(a);if(s+e>t[Q])throw N(_);for(var u=t[z]._b,h=s+t[K],l=r(+i),f=0;ftt;)(Z=$[tt++])in L||x(L,Z,U[Z]);v||(J.constructor=L)}var et=new j(new L(2)),nt=j[I].setInt8;et.setInt8(0,2147483648),et.setInt8(1,2147483649),!et.getInt8(0)&&et.getInt8(1)||m(j[I],{setInt8:function(t,e){nt.call(this,t,e<<24>>24)},setUint8:function(t,e){nt.call(this,t,e<<24>>24)}},!0)}else L=function(t){w(this,L,C);var e=E(t);this._b=M.call(Array(e),0),this[Q]=e},j=function(t,e,n){w(this,j,R),w(t,L,R);var r=t[Q],i=A(e);if(i<0||i>r)throw N("Wrong offset!");if(n=void 0===n?r-i:T(n),i+n>r)throw N(k);this[z]=t,this[K]=i,this[Q]=n},y&&(f(L,H,"_l"),f(j,G,"_b"),f(j,H,"_l"),f(j,Y,"_o")),m(j[I],{getInt8:function(t){return c(this,1,t)[0]<<24>>24},getUint8:function(t){return c(this,1,t)[0]},getInt16:function(t){var e=c(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=c(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return o(c(this,4,t,arguments[1]))},getUint32:function(t){return o(c(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return i(c(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return i(c(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){d(this,1,t,a,e)},setUint8:function(t,e){d(this,1,t,a,e)},setInt16:function(t,e){d(this,2,t,s,e,arguments[2])},setUint16:function(t,e){d(this,2,t,s,e,arguments[2])},setInt32:function(t,e){d(this,4,t,u,e,arguments[2])},setUint32:function(t,e){d(this,4,t,u,e,arguments[2])},setFloat32:function(t,e){d(this,4,t,l,e,arguments[2])},setFloat64:function(t,e){d(this,8,t,h,e,arguments[2])}});P(L,C),P(j,R),x(j[I],g.VIEW,!0),e[C]=L,e[R]=j},function(t,e,n){var r=n(38),i=n(37);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var r=n(8);r(r.G+r.W+r.F*!n(225).ABV,{DataView:n(226).DataView})},function(t,e,n){n(230)("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},function(t,e,n){"use strict";if(n(6)){var r=n(28),i=n(4),o=n(7),a=n(8),s=n(225),u=n(226),h=n(20),l=n(207),f=n(17),c=n(10),d=n(215),p=n(38),y=n(37),v=n(227),g=n(39),x=n(16),m=n(5),b=n(75),w=n(13),A=n(58),T=n(164),E=n(46),O=n(59),S=n(50).f,M=n(166),P=n(19),C=n(25),R=n(174),I=n(36),k=n(209),_=n(195),L=n(130),j=n(167),D=n(194),N=n(190),F=n(187),U=n(11),B=n(51),V=U.f,X=B.f,W=i.RangeError,q=i.TypeError,G=i.Uint8Array,H="ArrayBuffer",Y="Shared"+H,z="BYTES_PER_ELEMENT",Q="prototype",K=Array[Q],Z=u.ArrayBuffer,J=u.DataView,$=R(0),tt=R(2),et=R(3),nt=R(4),rt=R(5),it=R(6),ot=I(!0),at=I(!1),st=_.values,ut=_.keys,ht=_.entries,lt=K.lastIndexOf,ft=K.reduce,ct=K.reduceRight,dt=K.join,pt=K.sort,yt=K.slice,vt=K.toString,gt=K.toLocaleString,xt=C("iterator"),mt=C("toStringTag"),bt=P("typed_constructor"),wt=P("def_constructor"),At=s.CONSTR,Tt=s.TYPED,Et=s.VIEW,Ot="Wrong length!",St=R(1,function(t,e){return It(k(t,t[wt]),e)}),Mt=o(function(){return 1===new G(new Uint16Array([1]).buffer)[0]}),Pt=!!G&&!!G[Q].set&&o(function(){new G(1).set({})}),Ct=function(t,e){var n=p(t);if(n<0||n%e)throw W("Wrong offset!");return n},Rt=function(t){if(w(t)&&Tt in t)return t;throw q(t+" is not a typed array!")},It=function(t,e){if(!(w(t)&&bt in t))throw q("It is not a typed array constructor!");return new t(e)},kt=function(t,e){return _t(k(t,t[wt]),e)},_t=function(t,e){for(var n=0,r=e.length,i=It(t,r);r>n;)i[n]=e[n++];return i},Lt=function(t,e,n){V(t,e,{get:function(){return this._d[n]}})},jt=function(t){var e,n,r,i,o,a,s=A(t),u=arguments.length,l=u>1?arguments[1]:void 0,f=void 0!==l,c=M(s);if(void 0!=c&&!T(c)){for(a=c.call(s),r=[],e=0;!(o=a.next()).done;e++)r.push(o.value);s=r}for(f&&u>2&&(l=h(l,arguments[2],2)),e=0,n=y(s.length),i=It(this,n);n>e;e++)i[e]=f?l(s[e],e):s[e];return i},Dt=function(){for(var t=0,e=arguments.length,n=It(this,e);e>t;)n[t]=arguments[t++];return n},Nt=!!G&&o(function(){gt.call(new G(1))}),Ft=function(){return gt.apply(Nt?yt.call(Rt(this)):Rt(this),arguments)},Ut={copyWithin:function(t,e){return F.call(Rt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return nt(Rt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return N.apply(Rt(this),arguments)},filter:function(t){return kt(this,tt(Rt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return rt(Rt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return it(Rt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){$(Rt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return at(Rt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return ot(Rt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return dt.apply(Rt(this),arguments)},lastIndexOf:function(t){return lt.apply(Rt(this),arguments)},map:function(t){return St(Rt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return ft.apply(Rt(this),arguments)},reduceRight:function(t){return ct.apply(Rt(this),arguments)},reverse:function(){for(var t,e=this,n=Rt(e).length,r=Math.floor(n/2),i=0;i1?arguments[1]:void 0)},sort:function(t){return pt.call(Rt(this),t)},subarray:function(t,e){var n=Rt(this),r=n.length,i=g(t,r);return new(k(n,n[wt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,y((void 0===e?r:g(e,r))-i))}},Bt=function(t,e){return kt(this,yt.call(Rt(this),t,e))},Vt=function(t){Rt(this);var e=Ct(arguments[1],1),n=this.length,r=A(t),i=y(r.length),o=0;if(i+e>n)throw W(Ot);for(;o255?255:255&r),i.v[d](n*e+i.o,r,Mt)},C=function(t,e){V(t,e,{get:function(){return M(this,e)},set:function(t){return P(this,e,t)},enumerable:!0})};m?(p=n(function(t,n,r,i){l(t,p,h,"_d");var o,a,s,u,f=0,d=0;if(w(n)){if(!(n instanceof Z||(u=b(n))==H||u==Y))return Tt in n?_t(p,n):jt.call(p,n);o=n,d=Ct(r,e);var g=n.byteLength;if(void 0===i){if(g%e)throw W(Ot);if(a=g-d,a<0)throw W(Ot)}else if(a=y(i)*e,a+d>g)throw W(Ot);s=a/e}else s=v(n),a=s*e,o=new Z(a);for(c(t,"_d",{b:o,o:d,l:a,e:s,v:new J(o)});f=n.length)return{value:void 0,done:!0};while(!((t=n[e._i++])in e._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new o(t)}})},function(t,e,n){function r(t,e){var n,s,l=arguments.length<3?t:arguments[2];return h(t)===l?t[e]:(n=i.f(t,e))?a(n,"value")?n.value:void 0!==n.get?n.get.call(l):void 0:u(s=o(t))?r(s,e,l):void 0}var i=n(51),o=n(59),a=n(5),s=n(8),u=n(13),h=n(12);s(s.S,"Reflect",{get:r})},function(t,e,n){var r=n(51),i=n(8),o=n(12);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(o(t),e)}})},function(t,e,n){var r=n(8),i=n(59),o=n(12);r(r.S,"Reflect",{getPrototypeOf:function(t){return i(o(t))}})},function(t,e,n){var r=n(8);r(r.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var r=n(8),i=n(12),o=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return i(t),!o||o(t)}})},function(t,e,n){var r=n(8);r(r.S,"Reflect",{ownKeys:n(250)})},function(t,e,n){var r=n(50),i=n(43),o=n(12),a=n(4).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(o(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){var r=n(8),i=n(12),o=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){i(t);try{return o&&o(t),!0}catch(t){return!1}}})},function(t,e,n){function r(t,e,n){var u,c,d=arguments.length<4?t:arguments[3],p=o.f(l(t),e);if(!p){if(f(c=a(t)))return r(c,e,n,d);p=h(0)}return s(p,"value")?!(p.writable===!1||!f(d))&&(u=o.f(d,e)||h(0),u.value=n,i.f(d,e,u),!0):void 0!==p.set&&(p.set.call(d,n),!0)}var i=n(11),o=n(51),a=n(59),s=n(5),u=n(8),h=n(17),l=n(12),f=n(13);u(u.S,"Reflect",{set:r})},function(t,e,n){var r=n(8),i=n(73);i&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){"use strict";var r=n(8),i=n(36)(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(188)("includes")},function(t,e,n){"use strict";var r=n(8),i=n(256),o=n(58),a=n(37),s=n(21),u=n(175);r(r.P,"Array",{flatMap:function(t){var e,n,r=o(this);return s(t),e=a(r.length),n=u(r,0),i(n,r,r,e,0,1,t,arguments[1]),n}}),n(188)("flatMap")},function(t,e,n){"use strict";function r(t,e,n,h,l,f,c,d){for(var p,y,v=l,g=0,x=!!c&&s(c,d,3);g0)v=r(t,e,p,a(p.length),v,f-1)-1;else{if(v>=9007199254740991)throw TypeError();t[v]=p}v++}g++}return v}var i=n(45),o=n(13),a=n(37),s=n(20),u=n(25)("isConcatSpreadable");t.exports=r},function(t,e,n){"use strict";var r=n(8),i=n(256),o=n(58),a=n(37),s=n(38),u=n(175);r(r.P,"Array",{flatten:function(){var t=arguments[0],e=o(this),n=a(e.length),r=u(e,0);return i(r,e,e,n,0,void 0===t?1:s(t)),r}}),n(188)("flatten")},function(t,e,n){"use strict";var r=n(8),i=n(128)(!0);r(r.P,"String",{at:function(t){return i(this,t)}})},function(t,e,n){"use strict";var r=n(8),i=n(260);r(r.P,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){var r=n(37),i=n(91),o=n(35);t.exports=function(t,e,n,a){var s=String(o(t)),u=s.length,h=void 0===n?" ":String(n),l=r(e);if(l<=u||""==h)return s;var f=l-u,c=i.call(h,Math.ceil(f/h.length));return c.length>f&&(c=c.slice(0,f)),a?c+s:s+c}},function(t,e,n){"use strict";var r=n(8),i=n(260);r(r.P,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){"use strict";n(83)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},function(t,e,n){"use strict";n(83)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},function(t,e,n){"use strict";var r=n(8),i=n(35),o=n(37),a=n(135),s=n(198),u=RegExp.prototype,h=function(t,e){this._r=t,this._s=e};n(131)(h,"RegExp String",function(){var t=this._r.exec(this._s);return{value:t,done:null===t}}),r(r.P,"String",{matchAll:function(t){if(i(this),!a(t))throw TypeError(t+" is not a regexp!");var e=String(this),n="flags"in u?String(t.flags):s.call(t),r=new RegExp(t.source,~n.indexOf("g")?n:"g"+n);return r.lastIndex=o(t.lastIndex),new h(r,e)}})},function(t,e,n){n(27)("asyncIterator")},function(t,e,n){n(27)("observable")},function(t,e,n){var r=n(8),i=n(250),o=n(32),a=n(51),s=n(165);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=o(t),u=a.f,h=i(r),l={},f=0;h.length>f;)n=u(r,e=h[f++]),void 0!==n&&s(l,e,n);return l}})},function(t,e,n){var r=n(8),i=n(269)(!1);r(r.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){var r=n(30),i=n(32),o=n(44).f;t.exports=function(t){return function(e){for(var n,a=i(e),s=r(a),u=s.length,h=0,l=[];u>h;)o.call(a,n=s[h++])&&l.push(t?[n,a[n]]:a[n]);return l}}},function(t,e,n){var r=n(8),i=n(269)(!0);r(r.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){"use strict";var r=n(8),i=n(58),o=n(21),a=n(11);n(6)&&r(r.P+n(272),"Object",{__defineGetter__:function(t,e){a.f(i(this),t,{get:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";t.exports=n(28)||!n(7)(function(){var t=Math.random();__defineSetter__.call(null,t,function(){}),delete n(4)[t]})},function(t,e,n){"use strict";var r=n(8),i=n(58),o=n(21),a=n(11);n(6)&&r(r.P+n(272),"Object",{__defineSetter__:function(t,e){a.f(i(this),t,{set:o(e),enumerable:!0,configurable:!0})}})},function(t,e,n){"use strict";var r=n(8),i=n(58),o=n(16),a=n(59),s=n(51).f;n(6)&&r(r.P+n(272),"Object",{__lookupGetter__:function(t){var e,n=i(this),r=o(t,!0);do if(e=s(n,r))return e.get;while(n=a(n))}})},function(t,e,n){"use strict";var r=n(8),i=n(58),o=n(16),a=n(59),s=n(51).f;n(6)&&r(r.P+n(272),"Object",{__lookupSetter__:function(t){var e,n=i(this),r=o(t,!0);do if(e=s(n,r))return e.set;while(n=a(n))}})},function(t,e,n){var r=n(8);r(r.P+r.R,"Map",{toJSON:n(277)("Map")})},function(t,e,n){var r=n(75),i=n(278);t.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");return i(this)}}},function(t,e,n){var r=n(208);t.exports=function(t,e){var n=[];return r(t,!1,n.push,n,e),n}},function(t,e,n){var r=n(8);r(r.P+r.R,"Set",{toJSON:n(277)("Set")})},function(t,e,n){n(281)("Map")},function(t,e,n){"use strict";var r=n(8);t.exports=function(t){r(r.S,t,{of:function(){for(var t=arguments.length,e=Array(t);t--;)e[t]=arguments[t];return new this(e)}})}},function(t,e,n){n(281)("Set")},function(t,e,n){n(281)("WeakMap")},function(t,e,n){n(281)("WeakSet")},function(t,e,n){n(286)("Map")},function(t,e,n){"use strict";var r=n(8),i=n(21),o=n(20),a=n(208);t.exports=function(t){r(r.S,t,{from:function(t){var e,n,r,s,u=arguments[1];return i(this),e=void 0!==u,e&&i(u),void 0==t?new this:(n=[],e?(r=0,s=o(u,arguments[2],2),a(t,!1,function(t){n.push(s(t,r++))})):a(t,!1,n.push,n),new this(n))}})}},function(t,e,n){n(286)("Set")},function(t,e,n){n(286)("WeakMap")},function(t,e,n){n(286)("WeakSet")},function(t,e,n){var r=n(8);r(r.G,{global:n(4)})},function(t,e,n){var r=n(8);r(r.S,"System",{global:n(4)})},function(t,e,n){var r=n(8),i=n(34);r(r.S,"Error",{isError:function(t){return"Error"===i(t)}})},function(t,e,n){var r=n(8);r(r.S,"Math",{clamp:function(t,e,n){return Math.min(n,Math.max(e,t))}})},function(t,e,n){var r=n(8);r(r.S,"Math",{DEG_PER_RAD:Math.PI/180})},function(t,e,n){var r=n(8),i=180/Math.PI;r(r.S,"Math",{degrees:function(t){return t*i}})},function(t,e,n){var r=n(8),i=n(297),o=n(114);r(r.S,"Math",{fscale:function(t,e,n,r,a){return o(i(t,e,n,r,a))}})},function(t,e){t.exports=Math.scale||function(t,e,n,r,i){return 0===arguments.length||t!=t||e!=e||n!=n||r!=r||i!=i?NaN:t===1/0||t===-(1/0)?t:(t-e)*(i-r)/(n-e)+r}},function(t,e,n){var r=n(8);r(r.S,"Math",{iaddh:function(t,e,n,r){var i=t>>>0,o=e>>>0,a=n>>>0;return o+(r>>>0)+((i&a|(i|a)&~(i+a>>>0))>>>31)|0}})},function(t,e,n){var r=n(8);r(r.S,"Math",{isubh:function(t,e,n,r){var i=t>>>0,o=e>>>0,a=n>>>0;return o-(r>>>0)-((~i&a|~(i^a)&i-a>>>0)>>>31)|0}})},function(t,e,n){var r=n(8);r(r.S,"Math",{imulh:function(t,e){var n=65535,r=+t,i=+e,o=r&n,a=i&n,s=r>>16,u=i>>16,h=(s*a>>>0)+(o*a>>>16);return s*u+(h>>16)+((o*u>>>0)+(h&n)>>16)}})},function(t,e,n){var r=n(8);r(r.S,"Math",{RAD_PER_DEG:180/Math.PI})},function(t,e,n){var r=n(8),i=Math.PI/180;r(r.S,"Math",{radians:function(t){return t*i}})},function(t,e,n){var r=n(8);r(r.S,"Math",{scale:n(297)})},function(t,e,n){var r=n(8);r(r.S,"Math",{umulh:function(t,e){var n=65535,r=+t,i=+e,o=r&n,a=i&n,s=r>>>16,u=i>>>16,h=(s*a>>>0)+(o*a>>>16);return s*u+(h>>>16)+((o*u>>>0)+(h&n)>>>16)}})},function(t,e,n){var r=n(8);r(r.S,"Math",{signbit:function(t){return(t=+t)!=t?t:0==t?1/t==1/0:t>0}})},function(t,e,n){"use strict";var r=n(8),i=n(9),o=n(4),a=n(209),s=n(214);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,i.Promise||o.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then(function(){return n})}:t,n?function(n){return s(e,t()).then(function(){throw n})}:t)}})},function(t,e,n){"use strict";var r=n(8),i=n(212),o=n(213);r(r.S,"Promise",{try:function(t){var e=i.f(this),n=o(t);return(n.e?e.reject:e.resolve)(n.v),e.promise}})},function(t,e,n){var r=n(309),i=n(12),o=r.key,a=r.set;r.exp({defineMetadata:function(t,e,n,r){a(t,e,i(n),o(r))}})},function(t,e,n){var r=n(216),i=n(8),o=n(23)("metadata"),a=o.store||(o.store=new(n(221))),s=function(t,e,n){var i=a.get(t);if(!i){if(!n)return;a.set(t,i=new r)}var o=i.get(e);if(!o){if(!n)return;i.set(e,o=new r)}return o},u=function(t,e,n){var r=s(e,n,!1);return void 0!==r&&r.has(t)},h=function(t,e,n){var r=s(e,n,!1);return void 0===r?void 0:r.get(t)},l=function(t,e,n,r){s(n,r,!0).set(t,e)},f=function(t,e){var n=s(t,e,!1),r=[];return n&&n.forEach(function(t,e){r.push(e)}),r},c=function(t){return void 0===t||"symbol"==typeof t?t:String(t)},d=function(t){i(i.S,"Reflect",t)};t.exports={store:a,map:s,has:u,get:h,set:l,keys:f,key:c,exp:d}},function(t,e,n){var r=n(309),i=n(12),o=r.key,a=r.map,s=r.store;r.exp({deleteMetadata:function(t,e){var n=arguments.length<3?void 0:o(arguments[2]),r=a(i(e),n,!1);if(void 0===r||!r.delete(t))return!1;if(r.size)return!0;var u=s.get(e);return u.delete(n),!!u.size||s.delete(e)}})},function(t,e,n){var r=n(309),i=n(12),o=n(59),a=r.has,s=r.get,u=r.key,h=function(t,e,n){var r=a(t,e,n);if(r)return s(t,e,n);var i=o(e);return null!==i?h(t,i,n):void 0};r.exp({getMetadata:function(t,e){return h(t,i(e),arguments.length<3?void 0:u(arguments[2]))}})},function(t,e,n){var r=n(220),i=n(278),o=n(309),a=n(12),s=n(59),u=o.keys,h=o.key,l=function(t,e){var n=u(t,e),o=s(t);if(null===o)return n;var a=l(o,e);return a.length?n.length?i(new r(n.concat(a))):a:n};o.exp({getMetadataKeys:function(t){return l(a(t),arguments.length<2?void 0:h(arguments[1]))}})},function(t,e,n){var r=n(309),i=n(12),o=r.get,a=r.key;r.exp({getOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(309),i=n(12),o=r.keys,a=r.key;r.exp({getOwnMetadataKeys:function(t){return o(i(t),arguments.length<2?void 0:a(arguments[1]))}})},function(t,e,n){var r=n(309),i=n(12),o=n(59),a=r.has,s=r.key,u=function(t,e,n){var r=a(t,e,n);if(r)return!0;var i=o(e);return null!==i&&u(t,i,n)};r.exp({hasMetadata:function(t,e){return u(t,i(e),arguments.length<3?void 0:s(arguments[2]))}})},function(t,e,n){var r=n(309),i=n(12),o=r.has,a=r.key;r.exp({hasOwnMetadata:function(t,e){return o(t,i(e),arguments.length<3?void 0:a(arguments[2]))}})},function(t,e,n){var r=n(309),i=n(12),o=n(21),a=r.key,s=r.set;r.exp({metadata:function(t,e){return function(n,r){s(t,e,(void 0!==r?i:o)(n),a(r))}}})},function(t,e,n){var r=n(8),i=n(211)(),o=n(4).process,a="process"==n(34)(o);r(r.G,{asap:function(t){var e=a&&o.domain;i(e?e.bind(t):t)}})},function(t,e,n){"use strict";var r=n(8),i=n(4),o=n(9),a=n(211)(),s=n(25)("observable"),u=n(21),h=n(12),l=n(207),f=n(215),c=n(10),d=n(208),p=d.RETURN,y=function(t){return null==t?void 0:u(t)},v=function(t){var e=t._c;e&&(t._c=void 0,e())},g=function(t){return void 0===t._o},x=function(t){g(t)||(t._o=void 0,v(t))},m=function(t,e){h(t),this._c=void 0,this._o=t,t=new b(this);try{var n=e(t),r=n;null!=n&&("function"==typeof n.unsubscribe?n=function(){r.unsubscribe()}:u(n),this._c=n)}catch(e){return void t.error(e)}g(this)&&v(this)};m.prototype=f({},{unsubscribe:function(){x(this)}});var b=function(t){this._s=t};b.prototype=f({},{next:function(t){var e=this._s;if(!g(e)){var n=e._o;try{var r=y(n.next);if(r)return r.call(n,t)}catch(t){try{x(e)}finally{throw t}}}},error:function(t){var e=this._s;if(g(e))throw t;var n=e._o;e._o=void 0;try{var r=y(n.error);if(!r)throw t;t=r.call(n,t)}catch(t){try{v(e)}finally{throw t}}return v(e),t},complete:function(t){var e=this._s;if(!g(e)){var n=e._o;e._o=void 0;try{var r=y(n.complete);t=r?r.call(n,t):void 0}catch(t){try{v(e)}finally{throw t}}return v(e),t}}});var w=function(t){l(this,w,"Observable","_f")._f=u(t)};f(w.prototype,{subscribe:function(t){return new m(t,this._f)},forEach:function(t){var e=this;return new(o.Promise||i.Promise)(function(n,r){u(t);var i=e.subscribe({next:function(e){try{return t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:n})})}}),f(w,{from:function(t){var e="function"==typeof this?this:w,n=y(h(t)[s]);if(n){var r=h(n.call(t));return r.constructor===e?r:new e(function(t){return r.subscribe(t)})}return new e(function(e){var n=!1;return a(function(){if(!n){try{if(d(t,!1,function(t){if(e.next(t),n)return p})===p)return}catch(t){if(n)throw t;return void e.error(t)}e.complete()}}),function(){n=!0}})},of:function(){for(var t=0,e=arguments.length,n=Array(e);ta;)(n[a]=arguments[a++])===s&&(u=!0);return function(){var r,o=this,a=arguments.length,h=0,l=0;if(!u&&!a)return i(t,n,o);if(r=n.slice(),u)for(;e>h;h++)r[h]===s&&(r[h]=arguments[l++]);for(;a>l;)r.push(arguments[l++]);return i(t,r,o)}}},function(t,e,n){t.exports=n(4)},function(t,e,n){var r=n(8),i=n(210);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){for(var r=n(195),i=n(30),o=n(18),a=n(4),s=n(10),u=n(130),h=n(25),l=h("iterator"),f=h("toStringTag"),c=u.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(d),y=0;y=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return e("end");if(i.tryLoc<=this.prev){var a=x.call(i,"catchLoc"),s=x.call(i,"finallyLoc");if(a&&s){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&x.call(r,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),c(n),C}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;c(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:p(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=v),C}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}).call(e,function(){return this}())},function(t,e,n){n(327),t.exports=n(9).RegExp.escape},function(t,e,n){var r=n(8),i=n(328)(/[\\^$*+?.()|[\]{}]/g,"\\$&");r(r.S,"RegExp",{escape:function(t){return i(t)}})},function(t,e){t.exports=function(t,e){var n=e===Object(e)?function(t){return e[t]}:e;return function(e){return String(e).replace(t,n)}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(){window.removeEventListener("load",i),(0,a.default)(u.default,l.default)}var o=n(330),a=r(o),s=n(351),u=r(s),h=n(436),l=r(h);window.addEventListener("load",i)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.default,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new t(e);n.init(function(t){function e(){var t=document.getElementsByClassName("p2m-layer-screens")[0];t.style.backgroundImage="url(assets/images/back-fill.png)",t.style.backgroundRepeat="repeat-x",o.layout.on("fitlayout",n),n();var e=new c.default("assets/CONFIG.json");e.once("complete",function(){return o.configClient=e.data}),u.default.supportedLanguages=["en"],u.default.init();var a=new i.SyncQueue,s=new o.external.LoaderUI(o.layout,a);s.once("complete",r),navigator.userAgent.match(/iPad/i)&&1024==window.screen.availWidth&&748==window.screen.availHeight?o.iPadMini=!0:o.iPadMini=!1,a.add(e),o.iPadMini||a.add(o.audio.createLoaderQueue(w.default.sounds)),a.add(o.library.createLoaderQueue(w.default.images),u.default.createLoaderQueue(),o.spineLibrary.createLoaderQueue(["slingshot/fire"])),a.load()}function n(){var t=window.innerHeight,e=document.getElementsByClassName("p2m-layer-screens")[0];e.style.backgroundSize="100% "+t+"px",(0,d.createFbButton)()}function r(t){o.settings.load(function(){return o.run()})}l.default.LINES_DELIMITER="\\n";var o=new y.default(g.default.name,m.default,t);o.once("ready",e),o.init(document.body)})},n(331),n(332);var i=n(333),o=n(351),a=r(o),s=n(362),u=r(s),h=n(363),l=r(h),f=n(344),c=r(f),d=n(390),p=n(391),y=r(p),v=n(425),g=r(v),x=n(422),m=r(x),b=n(435),w=r(b)},function(t,e){/*! * pixi.js - v4.5.1 * Compiled Sat, 22 Apr 2017 13:46:35 UTC * * pixi.js is licensed under the MIT License. * http://www.opensource.org/licenses/mit-license */ !function(n){if("object"==typeof e&&"undefined"!=typeof t)t.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var r;r="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,r.PIXI=n()}}(function(){var t;return function t(e,n,r){function i(a,s){if(!n[a]){if(!e[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var h=new Error("Cannot find module '"+a+"'");throw h.code="MODULE_NOT_FOUND",h}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return i(n?n:t)},l,l.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a0)-(t<0)},n.abs=function(t){var e=t>>i-1;return(t^e)-e},n.min=function(t,e){return e^(t^e)&-(t65535)<<4,t>>>=e,n=(t>255)<<3,t>>>=n,e|=n,n=(t>15)<<2,t>>>=n,e|=n,n=(t>3)<<1,t>>>=n,e|=n,e|t>>1},n.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},n.popCount=function(t){return t-=t>>>1&1431655765,t=(858993459&t)+(t>>>2&858993459),16843009*(t+(t>>>4)&252645135)>>>24},n.countTrailingZeros=r,n.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t+1},n.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t-(t>>>1)},n.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,t&=15,27030>>>t&1};var o=new Array(256);!function(t){for(var e=0;e<256;++e){var n=e,r=e,i=7;for(n>>>=1;n;n>>>=1)r<<=1,r|=1&n,--i;t[e]=r<>>8&255]<<16|o[t>>>16&255]<<8|o[t>>>24&255]},n.interleave2=function(t,e){return t&=65535,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e&=65535,e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1},n.deinterleave2=function(t,e){return t=t>>>e&1431655765,t=858993459&(t|t>>>1),t=252645135&(t|t>>>2),t=16711935&(t|t>>>4),t=65535&(t|t>>>16),t<<16>>16},n.interleave3=function(t,e,n){return t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),e&=1023,e=4278190335&(e|e<<16),e=251719695&(e|e<<8),e=3272356035&(e|e<<4),e=1227133513&(e|e<<2),t|=e<<1,n&=1023,n=4278190335&(n|n<<16),n=251719695&(n|n<<8),n=3272356035&(n|n<<4),n=1227133513&(n|n<<2),t|n<<2},n.deinterleave3=function(t,e){return t=t>>>e&1227133513,t=3272356035&(t|t>>>2),t=251719695&(t|t>>>4),t=4278190335&(t|t>>>8),t=1023&(t|t>>>16),t<<22>>22},n.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},{}],2:[function(t,e,n){"use strict";function r(t,e,n){n=n||2;var r=e&&e.length,o=r?e[0]*n:t.length,s=i(t,0,o,n,!0),u=[];if(!s)return u;var h,l,c,d,p,y,v;if(r&&(s=f(t,e,s,n)),t.length>80*n){h=c=t[0],l=d=t[1];for(var g=n;gc&&(c=p),y>d&&(d=y);v=Math.max(c-h,d-l)}return a(s,u,n,h,l,v),u}function i(t,e,n,r,i){var o,a;if(i===I(t,e,n,r)>0)for(o=e;o=e;o-=r)a=P(o,t[o],t[o+1],a);return a&&A(a,a.next)&&(C(a),a=a.next),a}function o(t,e){if(!t)return t;e||(e=t);var n,r=t;do if(n=!1,r.steiner||!A(r,r.next)&&0!==w(r.prev,r,r.next))r=r.next;else{if(C(r),r=e=r.prev,r===r.next)return null;n=!0}while(n||r!==e);return e}function a(t,e,n,r,i,f,c){if(t){!c&&f&&y(t,r,i,f);for(var d,p,v=t;t.prev!==t.next;)if(d=t.prev,p=t.next,f?u(t,r,i,f):s(t))e.push(d.i/n),e.push(t.i/n),e.push(p.i/n),C(t),t=p.next,v=p.next;else if(t=p,t===v){c?1===c?(t=h(t,e,n),a(t,e,n,r,i,f,2)):2===c&&l(t,e,n,r,i,f):a(o(t),e,n,r,i,f,1);break}}}function s(t){var e=t.prev,n=t,r=t.next;if(w(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(m(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&w(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function u(t,e,n,r){var i=t.prev,o=t,a=t.next;if(w(i,o,a)>=0)return!1;for(var s=i.xo.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,l=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,f=g(s,u,e,n,r),c=g(h,l,e,n,r),d=t.nextZ;d&&d.z<=c;){if(d!==t.prev&&d!==t.next&&m(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&w(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=f;){if(d!==t.prev&&d!==t.next&&m(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&w(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function h(t,e,n){var r=t;do{var i=r.prev,o=r.next.next;!A(i,o)&&T(i,r,r.next,o)&&O(i,o)&&O(o,i)&&(e.push(i.i/n),e.push(r.i/n),e.push(o.i/n),C(r),C(r.next),r=t=o),r=r.next}while(r!==t);return r}function l(t,e,n,r,i,s){var u=t;do{for(var h=u.next.next;h!==u.prev;){if(u.i!==h.i&&b(u,h)){var l=M(u,h);return u=o(u,u.next),l=o(l,l.next),a(u,e,n,r,i,s),void a(l,e,n,r,i,s)}h=h.next}u=u.next}while(u!==t)}function f(t,e,n,r){var a,s,u,h,l,f=[];for(a=0,s=e.length;a=r.next.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x=r.x&&r.x>=l&&m(on.x)&&O(r,t)&&(n=r,c=u)),r=r.next;return n}function y(t,e,n,r){var i=t;do null===i.z&&(i.z=g(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,v(i)}function v(t){var e,n,r,i,o,a,s,u,h=1;do{for(n=t,t=null,o=null,a=0;n;){for(a++,r=n,s=0,e=0;e0||u>0&&r;)0===s?(i=r,r=r.nextZ,u--):0!==u&&r?n.z<=r.z?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,u--):(i=n,n=n.nextZ,s--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,h*=2}while(a>1);return t}function g(t,e,n,r,i){return t=32767*(t-n)/i,e=32767*(e-r)/i,t=16711935&(t|t<<8),t=252645135&(t|t<<4),t=858993459&(t|t<<2),t=1431655765&(t|t<<1),e=16711935&(e|e<<8),e=252645135&(e|e<<4),e=858993459&(e|e<<2),e=1431655765&(e|e<<1),t|e<<1}function x(t){var e=t,n=t;do e.x=0&&(t-a)*(r-s)-(n-a)*(e-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function b(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!E(t,e)&&O(t,e)&&O(e,t)&&S(t,e)}function w(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function A(t,e){return t.x===e.x&&t.y===e.y}function T(t,e,n,r){return!!(A(t,e)&&A(n,r)||A(t,r)&&A(n,e))||w(t,e,n)>0!=w(t,e,r)>0&&w(n,r,t)>0!=w(n,r,e)>0}function E(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&T(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function O(t,e){return w(t.prev,t,t.next)<0?w(t,e,t.next)>=0&&w(t,t.prev,e)>=0:w(t,e,t.prev)<0||w(t,t.next,e)<0}function S(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do n.y>o!=n.next.y>o&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next;while(n!==t);return r}function M(t,e){var n=new R(t.i,t.x,t.y),r=new R(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function P(t,e,n,r){var i=new R(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function C(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function R(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function I(t,e,n,r){for(var i=0,o=e,a=n-r;o0&&(r+=t[i-1].length,n.holes.push(r))}return n}},{}],3:[function(t,e,n){"use strict";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(){this._events=new r,this._eventsCount=0}var a=Object.prototype.hasOwnProperty,s="~";Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(s=!1)),o.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)a.call(t,e)&&n.push(s?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},o.prototype.listeners=function(t,e){var n=s?s+t:t,r=this._events[n];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i=t.byteLength?r.bufferSubData(this.type,e,t):r.bufferData(this.type,t,this.drawType),this.data=t},i.prototype.bind=function(){var t=this.gl;t.bindBuffer(this.type,this.buffer)},i.createVertexBuffer=function(t,e,n){return new i(t,t.ARRAY_BUFFER,e,n)},i.createIndexBuffer=function(t,e,n){return new i(t,t.ELEMENT_ARRAY_BUFFER,e,n)},i.create=function(t,e,n,r){return new i(t,e,n,r)},i.prototype.destroy=function(){this.gl.deleteBuffer(this.buffer)},e.exports=i},{}],7:[function(t,e,n){var r=t("./GLTexture"),i=function(t,e,n){this.gl=t,this.framebuffer=t.createFramebuffer(),this.stencil=null,this.texture=null,this.width=e||100,this.height=n||100};i.prototype.enableTexture=function(t){var e=this.gl;this.texture=t||new r(e),this.texture.bind(),this.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture.texture,0)},i.prototype.enableStencil=function(){if(!this.stencil){var t=this.gl;this.stencil=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,this.stencil),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,this.stencil),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,this.width,this.height)}},i.prototype.clear=function(t,e,n,r){this.bind();var i=this.gl;i.clearColor(t,e,n,r),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT)},i.prototype.bind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer)},i.prototype.unbind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)},i.prototype.resize=function(t,e){var n=this.gl;this.width=t,this.height=e,this.texture&&this.texture.uploadData(null,t,e),this.stencil&&(n.bindRenderbuffer(n.RENDERBUFFER,this.stencil),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t,e))},i.prototype.destroy=function(){var t=this.gl;this.texture&&this.texture.destroy(),t.deleteFramebuffer(this.framebuffer),this.gl=null,this.stencil=null,this.texture=null},i.createRGBA=function(t,e,n,o){var a=r.fromData(t,null,e,n);a.enableNearestScaling(),a.enableWrapClamp();var s=new i(t,e,n);return s.enableTexture(a),s.unbind(),s},i.createFloat32=function(t,e,n,o){var a=new r.fromData(t,o,e,n);a.enableNearestScaling(),a.enableWrapClamp();var s=new i(t,e,n);return s.enableTexture(a),s.unbind(),s},e.exports=i},{"./GLTexture":9}],8:[function(t,e,n){var r=t("./shader/compileProgram"),i=t("./shader/extractAttributes"),o=t("./shader/extractUniforms"),a=t("./shader/setPrecision"),s=t("./shader/generateUniformAccessObject"),u=function(t,e,n,u,h){this.gl=t,u&&(e=a(e,u),n=a(n,u)),this.program=r(t,e,n,h),this.attributes=i(t,this.program),this.uniformData=o(t,this.program),this.uniforms=s(t,this.uniformData)};u.prototype.bind=function(){this.gl.useProgram(this.program)},u.prototype.destroy=function(){this.attributes=null,this.uniformData=null,this.uniforms=null;var t=this.gl;t.deleteProgram(this.program)},e.exports=u},{"./shader/compileProgram":14,"./shader/extractAttributes":16,"./shader/extractUniforms":17,"./shader/generateUniformAccessObject":18,"./shader/setPrecision":22}],9:[function(t,e,n){var r=function(t,e,n,r,i){this.gl=t,this.texture=t.createTexture(),this.mipmap=!1,this.premultiplyAlpha=!1,this.width=e||-1,this.height=n||-1,this.format=r||t.RGBA,this.type=i||t.UNSIGNED_BYTE};r.prototype.upload=function(t){this.bind();var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);var n=t.videoWidth||t.width,r=t.videoHeight||t.height;r!==this.height||n!==this.width?e.texImage2D(e.TEXTURE_2D,0,this.format,this.format,this.type,t):e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.format,this.type,t),this.width=n,this.height=r};var i=!1;r.prototype.uploadData=function(t,e,n){this.bind();var r=this.gl;if(t instanceof Float32Array){if(!i){var o=r.getExtension("OES_texture_float");if(!o)throw new Error("floating point textures not available");i=!0}this.type=r.FLOAT}else this.type=this.type||r.UNSIGNED_BYTE;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e!==this.width||n!==this.height?r.texImage2D(r.TEXTURE_2D,0,this.format,e,n,0,this.format,this.type,t||null):r.texSubImage2D(r.TEXTURE_2D,0,0,0,e,n,this.format,this.type,t||null),this.width=e,this.height=n},r.prototype.bind=function(t){var e=this.gl;void 0!==t&&e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},r.prototype.unbind=function(){var t=this.gl;t.bindTexture(t.TEXTURE_2D,null)},r.prototype.minFilter=function(t){var e=this.gl;this.bind(),this.mipmap?e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.NEAREST_MIPMAP_NEAREST):e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR:e.NEAREST)},r.prototype.magFilter=function(t){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t?e.LINEAR:e.NEAREST)},r.prototype.enableMipmap=function(){var t=this.gl;this.bind(),this.mipmap=!0,t.generateMipmap(t.TEXTURE_2D)},r.prototype.enableLinearScaling=function(){this.minFilter(!0),this.magFilter(!0)},r.prototype.enableNearestScaling=function(){this.minFilter(!1),this.magFilter(!1)},r.prototype.enableWrapClamp=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)},r.prototype.enableWrapRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT)},r.prototype.enableWrapMirrorRepeat=function(){var t=this.gl;this.bind(),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.MIRRORED_REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.MIRRORED_REPEAT)},r.prototype.destroy=function(){var t=this.gl;t.deleteTexture(this.texture)},r.fromSource=function(t,e,n){var i=new r(t);return i.premultiplyAlpha=n||!1,i.upload(e),i},r.fromData=function(t,e,n,i){var o=new r(t);return o.uploadData(e,n,i),o},e.exports=r},{}],10:[function(t,e,n){function r(t,e){if(this.nativeVaoExtension=null,r.FORCE_NATIVE||(this.nativeVaoExtension=t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object")),this.nativeState=e,this.nativeVaoExtension){this.nativeVao=this.nativeVaoExtension.createVertexArrayOES();var n=t.getParameter(t.MAX_VERTEX_ATTRIBS);this.nativeState={tempAttribState:new Array(n),attribState:new Array(n)}}this.gl=t,this.attributes=[],this.indexBuffer=null,this.dirty=!1}var i=t("./setVertexAttribArrays");r.prototype.constructor=r,e.exports=r,r.FORCE_NATIVE=!1,r.prototype.bind=function(){return this.nativeVao?(this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.dirty&&(this.dirty=!1,this.activate())):this.activate(),this},r.prototype.unbind=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(null),this},r.prototype.activate=function(){for(var t=this.gl,e=null,n=0;n=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r=-1&&!i;o--){var a=o>=0?arguments[o]:t.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,i="/"===a.charAt(0))}return n=e(r(n.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(t){var i=n.isAbsolute(t),o="/"===a(t,-1);return t=e(r(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&o&&(t+="/"),(i?"/":"")+t},n.isAbsolute=function(t){return"/"===t.charAt(0)},n.join=function(){var t=Array.prototype.slice.call(arguments,0);return n.normalize(r(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},n.relative=function(t,e){function r(t){for(var e=0;e=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=n.resolve(t).substr(1),e=n.resolve(e).substr(1);for(var i=r(t.split("/")),o=r(e.split("/")),a=Math.min(i.length,o.length),s=a,u=0;u1)for(var n=1;n1&&(r=n[0]+"@",t=n[1]),t=t.replace(_,".");var i=t.split("."),o=a(i,e).join(".");return r+o}function u(t){for(var e,n,r=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(t-=65536,e+=N(t>>>10&1023|55296),t=56320|1023&t),e+=N(t)}).join("")}function l(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:T}function f(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function c(t,e,n){var r=0;for(t=n?D(t/M):t>>1,t+=D(t/e);t>j*O>>1;r+=T)t=D(t/j);return D(r+(j+1)*t/(t+S))}function d(t){var e,n,r,i,a,s,u,f,d,p,y=[],v=t.length,g=0,x=C,m=P;for(n=t.lastIndexOf(R),n<0&&(n=0),r=0;r=128&&o("not-basic"),y.push(t.charCodeAt(r));for(i=n>0?n+1:0;i=v&&o("invalid-input"),f=l(t.charCodeAt(i++)),(f>=T||f>D((A-g)/s))&&o("overflow"),g+=f*s,d=u<=m?E:u>=m+O?O:u-m,!(fD(A/p)&&o("overflow"),s*=p;e=y.length+1,m=c(g-a,e,0==a),D(g/e)>A-x&&o("overflow"),x+=D(g/e),g%=e,y.splice(g++,0,x)}return h(y)}function p(t){var e,n,r,i,a,s,h,l,d,p,y,v,g,x,m,b=[];for(t=u(t),v=t.length,e=C,n=0,a=P,s=0;s=e&&yD((A-n)/g)&&o("overflow"),n+=(h-e)*g,e=h,s=0;sA&&o("overflow"),y==e){for(l=n,d=T;p=d<=a?E:d>=a+O?O:d-a,!(l= 0x80 (not a basic code point)","invalid-input":"Invalid input"},j=T-E,D=Math.floor,N=String.fromCharCode;if(b={version:"1.4.1",ucs2:{decode:u,encode:h},decode:d,encode:p,toASCII:v,toUnicode:y},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return b});else if(g&&x)if(n.exports==g)x.exports=b;else for(w in b)b.hasOwnProperty(w)&&(g[w]=b[w]);else i.punycode=b}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],26:[function(t,e,n){"use strict";function r(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,n,o){e=e||"&",n=n||"=";var a={};if("string"!=typeof t||0===t.length)return a;var s=/\+/g;t=t.split(e);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var h=t.length;u>0&&h>u&&(h=u);for(var l=0;l=0?(f=y.substr(0,v),c=y.substr(v+1)):(f=y,c=""),d=decodeURIComponent(f),p=decodeURIComponent(c),r(a,d)?i(a[d])?a[d].push(p):a[d]=[a[d],p]:a[d]=p}return a};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],27:[function(t,e,n){"use strict";function r(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),y=["'"].concat(p),v=["%","/","?",";","#"].concat(y),g=["/","?","#"],x=255,m=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w={javascript:!0,"javascript:":!0},A={javascript:!0,"javascript:":!0},T={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=t("querystring");r.prototype.parse=function(t,e,n){if(!h.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t.indexOf("?"),i=r!==-1&&r127?"x":L[D];if(!j.match(m)){var F=k.slice(0,M),U=k.slice(M+1),B=L.match(b);B&&(F.push(B[1]),U.unshift(B[2])),U.length&&(s="/"+U.join(".")+s),this.hostname=F.join(".");break}}}this.hostname.length>x?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=u.toASCII(this.hostname));var V=this.port?":"+this.port:"",X=this.hostname||"";this.host=X+V,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!w[p])for(var M=0,_=y.length;M<_;M++){var W=y[M];if(s.indexOf(W)!==-1){var q=encodeURIComponent(W);q===W&&(q=escape(W)),s=s.split(W).join(q)}}var G=s.indexOf("#");G!==-1&&(this.hash=s.substr(G),s=s.slice(0,G));var H=s.indexOf("?");if(H!==-1?(this.search=s.substr(H),this.query=s.substr(H+1),e&&(this.query=E.parse(this.query)),s=s.slice(0,H)):e&&(this.search="",this.query={}),s&&(this.pathname=s),T[p]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var V=this.pathname||"",Y=this.search||"";this.path=V+Y}return this.href=this.format(),this},r.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=t+this.host:this.hostname&&(i=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&h.isObject(this.query)&&Object.keys(this.query).length&&(o=E.stringify(this.query));var a=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||T[e])&&i!==!1?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),a=a.replace("#","%23"),e+i+n+a+r},r.prototype.resolve=function(t){return this.resolveObject(i(t,!1,!0)).format()},r.prototype.resolveObject=function(t){if(h.isString(t)){var e=new r;e.parse(t,!1,!0),t=e}for(var n=new r,i=Object.keys(this),o=0;o0)&&n.host.split("@");O&&(n.auth=O.shift(),n.host=n.hostname=O.shift())}return n.search=t.search,n.query=t.query,h.isNull(n.pathname)&&h.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=w.slice(-1)[0],M=(n.host||t.host||w.length>1)&&("."===S||".."===S)||""===S,P=0,C=w.length;C>=0;C--)S=w[C],"."===S?w.splice(C,1):".."===S?(w.splice(C,1),P++):P&&(w.splice(C,1),P--);if(!m&&!b)for(;P--;P)w.unshift("..");!m||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),M&&"/"!==w.join("/").substr(-1)&&w.push("");var R=""===w[0]||w[0]&&"/"===w[0].charAt(0);if(E){n.hostname=n.host=R?"":w.length?w.shift():"";var O=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");O&&(n.auth=O.shift(),n.host=n.hostname=O.shift())}return m=m||n.host&&w.length,m&&!R&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),h.isNull(n.pathname)&&h.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var t=this.host,e=f.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":30,punycode:25,querystring:28}],30:[function(t,e,n){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){ return null==t}}},{}],31:[function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=t("mini-signals"),u=i(s),h=t("parse-uri"),l=i(h),f=t("./async"),c=r(f),d=t("./Resource"),p=i(d),y=100,v=/(#[\w-]+)?$/,g=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;o(this,t),this.baseUrl=n,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,n){return e._loadResource(t,n)},this._queue=c.queue(this._boundLoadResource,r),this._queue.pause(),this.resources={},this.onProgress=new u.default,this.onError=new u.default,this.onLoad=new u.default,this.onStart=new u.default,this.onComplete=new u.default}return t.prototype.add=function(t,e,n,r){if(Array.isArray(t)){for(var i=0;i0?r=v:r===x&&(r=g);var i=r/100|0;if(i!==m)return void this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL);if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=n,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(n),this.type=t.TYPE.JSON}catch(t){return void this.abort("Error trying to parse loaded json: "+t)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var o=new DOMParser;this.data=o.parseFromString(n,"text/xml")}else{var a=document.createElement("div");a.innerHTML=n,this.data=a}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: "+t)}else this.data=e.response||n;this.complete()},t.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";e=e||window.location,p||(p=document.createElement("a")),p.href=t,t=(0,l.default)(p.href,{strictMode:!0});var n=!t.port&&""===e.port||t.port===e.port,r=t.protocol?t.protocol+":":"";return t.host===e.hostname&&n&&r===e.protocol?"":"anonymous"},t.prototype._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},t.prototype._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var n=t.indexOf("/");e=t.substring(n+1,t.indexOf(";",n))}else{var r=t.indexOf("?");r!==-1&&(t=t.substring(0,r)),e=t.substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},t.prototype._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},u(t,[{key:"isDataUrl",get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)}}]),t}();n.default=b,b.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},b.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},b.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},b.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},b._loadTypeMap={gif:b.LOAD_TYPE.IMAGE,png:b.LOAD_TYPE.IMAGE,bmp:b.LOAD_TYPE.IMAGE,jpg:b.LOAD_TYPE.IMAGE,jpeg:b.LOAD_TYPE.IMAGE,tif:b.LOAD_TYPE.IMAGE,tiff:b.LOAD_TYPE.IMAGE,webp:b.LOAD_TYPE.IMAGE,tga:b.LOAD_TYPE.IMAGE,svg:b.LOAD_TYPE.IMAGE,"svg+xml":b.LOAD_TYPE.IMAGE,mp3:b.LOAD_TYPE.AUDIO,ogg:b.LOAD_TYPE.AUDIO,wav:b.LOAD_TYPE.AUDIO,mp4:b.LOAD_TYPE.VIDEO,webm:b.LOAD_TYPE.VIDEO},b._xhrTypeMap={xhtml:b.XHR_RESPONSE_TYPE.DOCUMENT,html:b.XHR_RESPONSE_TYPE.DOCUMENT,htm:b.XHR_RESPONSE_TYPE.DOCUMENT,xml:b.XHR_RESPONSE_TYPE.DOCUMENT,tmx:b.XHR_RESPONSE_TYPE.DOCUMENT,svg:b.XHR_RESPONSE_TYPE.DOCUMENT,tsx:b.XHR_RESPONSE_TYPE.DOCUMENT,gif:b.XHR_RESPONSE_TYPE.BLOB,png:b.XHR_RESPONSE_TYPE.BLOB,bmp:b.XHR_RESPONSE_TYPE.BLOB,jpg:b.XHR_RESPONSE_TYPE.BLOB,jpeg:b.XHR_RESPONSE_TYPE.BLOB,tif:b.XHR_RESPONSE_TYPE.BLOB,tiff:b.XHR_RESPONSE_TYPE.BLOB,webp:b.XHR_RESPONSE_TYPE.BLOB,tga:b.XHR_RESPONSE_TYPE.BLOB,json:b.XHR_RESPONSE_TYPE.JSON,text:b.XHR_RESPONSE_TYPE.TEXT,txt:b.XHR_RESPONSE_TYPE.TEXT,ttf:b.XHR_RESPONSE_TYPE.BUFFER,otf:b.XHR_RESPONSE_TYPE.BUFFER},b.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="},{"mini-signals":37,"parse-uri":38}],33:[function(t,e,n){"use strict";function r(){}function i(t,e,n){var r=0,i=t.length;!function o(a){return a||r===i?void(n&&n(a)):void e(t[r++],o)}()}function o(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}function a(t,e){function n(t,e,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");if(s.started=!0,null==t&&s.idle())return void setTimeout(function(){return s.drain()},1);var i={data:t,callback:"function"==typeof n?n:r};e?s._tasks.unshift(i):s._tasks.push(i),setTimeout(function(){return s.process()},1)}function i(t){return function(){a-=1,t.callback.apply(t,arguments),null!=arguments[0]&&s.error(arguments[0],t.data),a<=s.concurrency-s.buffer&&s.unsaturated(),s.idle()&&s.drain(),s.process()}}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var a=0,s={_tasks:[],concurrency:e,saturated:r,unsaturated:r,buffer:e/4,empty:r,drain:r,error:r,started:!1,paused:!1,push:function(t,e){n(t,!1,e)},kill:function(){a=0,s.drain=r,s.started=!1,s._tasks=[]},unshift:function(t,e){n(t,!0,e)},process:function(){for(;!s.paused&&a>2,o[1]=(3&r[0])<<4|r[1]>>4,o[2]=(15&r[1])<<2|r[2]>>6,o[3]=63&r[2];var s=n-(t.length-1);switch(s){case 2:o[3]=64,o[2]=64;break;case 1:o[3]=64}for(var u=0;u=0;n--)this.updateAccessibleObjects(e[n])}},t.prototype.update=function(){if(this.renderer.renderingToScreen){this.updateAccessibleObjects(this.renderer._lastObjectRendered);var t=this.renderer.view.getBoundingClientRect(),e=t.width/this.renderer.width,n=t.height/this.renderer.height,r=this.div;r.style.left=t.left+"px",r.style.top=t.top+"px",r.style.width=this.renderer.width+"px",r.style.height=this.renderer.height+"px";for(var i=0;ithis.renderer.width&&(t.width=this.renderer.width-t.x),t.y+t.height>this.renderer.height&&(t.height=this.renderer.height-t.y)},t.prototype.addChild=function(t){var e=this.pool.pop();e||(e=document.createElement("button"),e.style.width=d+"px",e.style.height=d+"px",e.style.backgroundColor=this.debug?"rgba(255,0,0,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=v,e.style.borderStyle="none",e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleTitle||t.accessibleHint||(e.title="displayObject "+this.tabIndex),t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"click",e.eventData)},t.prototype._onFocus=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseover",e.eventData)},t.prototype._onFocusOut=function(t){var e=this.renderer.plugins.interaction;e.dispatchEvent(t.target.displayObject,"mouseout",e.eventData)},t.prototype._onKeyDown=function(t){t.keyCode===c&&this.activate()},t.prototype._onMouseMove=function(){this.deactivate()},t.prototype.destroy=function(){this.div=null;for(var t=0;t]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,n.SHAPES={POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},n.PRECISION={LOW:"lowp",MEDIUM:"mediump",HIGH:"highp"},n.TRANSFORM_MODE={STATIC:0,DYNAMIC:1},n.TEXT_GRADIENT={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1},n.UPDATE_PRIORITY={INTERACTION:50,HIGH:25,NORMAL:0,LOW:-25,UTILITY:-50}},{}],46:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("../math"),o=function(){function t(){r(this,t),this.minX=1/0,this.minY=1/0,this.maxX=-(1/0),this.maxY=-(1/0),this.rect=null}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-(1/0),this.maxY=-(1/0)},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?i.Rectangle.EMPTY:(t=t||new i.Rectangle(0,0,1,1),t.x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addQuad=function(t){var e=this.minX,n=this.minY,r=this.maxX,i=this.maxY,o=t[0],a=t[1];e=or?o:r,i=a>i?a:i,o=t[2],a=t[3],e=or?o:r,i=a>i?a:i,o=t[4],a=t[5],e=or?o:r,i=a>i?a:i,o=t[6],a=t[7],e=or?o:r,i=a>i?a:i,this.minX=e,this.minY=n,this.maxX=r,this.maxY=i},t.prototype.addFrame=function(t,e,n,r,i){var o=t.worldTransform,a=o.a,s=o.b,u=o.c,h=o.d,l=o.tx,f=o.ty,c=this.minX,d=this.minY,p=this.maxX,y=this.maxY,v=a*e+u*n+l,g=s*e+h*n+f;c=vp?v:p,y=g>y?g:y,v=a*r+u*n+l,g=s*r+h*n+f,c=vp?v:p,y=g>y?g:y,v=a*e+u*i+l,g=s*e+h*i+f,c=vp?v:p,y=g>y?g:y,v=a*r+u*i+l,g=s*r+h*i+f,c=vp?v:p,y=g>y?g:y,this.minX=c,this.minY=d,this.maxX=p,this.maxY=y},t.prototype.addVertices=function(t,e,n,r){for(var i=t.worldTransform,o=i.a,a=i.b,s=i.c,u=i.d,h=i.tx,l=i.ty,f=this.minX,c=this.minY,d=this.maxX,p=this.maxY,y=n;yd?x:d,p=m>p?m:p}this.minX=f,this.minY=c,this.maxX=d,this.maxY=p},t.prototype.addBounds=function(t){var e=this.minX,n=this.minY,r=this.maxX,i=this.maxY;this.minX=t.minXr?t.maxX:r,this.maxY=t.maxY>i?t.maxY:i},t.prototype.addBoundsMask=function(t,e){var n=t.minX>e.minX?t.minX:e.minX,r=t.minY>e.minY?t.minY:e.minY,i=t.maxXu?i:u,this.maxY=o>h?o:h}},t.prototype.addBoundsArea=function(t,e){var n=t.minX>e.x?t.minX:e.x,r=t.minY>e.y?t.minY:e.y,i=t.maxXu?i:u,this.maxY=o>h?o:h}},t}();n.default=o},{"../math":69}],47:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=function(){function t(t,e){for(var n=0;n1)for(var n=0;nthis.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),t},e.prototype.swapChildren=function(t,e){if(t!==e){var n=this.getChildIndex(t),r=this.getChildIndex(e);this.children[n]=e,this.children[r]=t,this.onChildrenChange(n=this.children.length)throw new Error("The supplied index is out of bounds");var n=this.getChildIndex(t);(0,u.removeItems)(this.children,n,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(t){var e=arguments.length;if(e>1)for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],n=t,r="number"==typeof e?e:this.children.length,i=r-n,o=void 0;if(i>0&&i<=r){o=this.children.splice(n,i);for(var a=0;a2&&void 0!==arguments[2]&&arguments[2];return n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,n,r){return e&&(t=e.toGlobal(t,n,r)),r||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,n)},e.prototype.renderWebGL=function(t){},e.prototype.renderCanvas=function(t){},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,u=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0;return this.position.x=t,this.position.y=e,this.scale.x=n?n:1,this.scale.y=r?r:1,this.rotation=i,this.skew.x=o,this.skew.y=a,this.pivot.x=s,this.pivot.y=u,this},e.prototype.destroy=function(){this.removeAllListeners(),this.parent&&this.parent.removeChild(this),this.transform=null,this.parent=null,this._bounds=null,this._currentBounds=null,this._mask=null,this.filterArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},s(e,[{key:"_tempDisplayObjectParent",get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new e),this.tempDisplayObjectParent}},{key:"x",get:function(){return this.position.x},set:function(t){this.transform.position.x=t}},{key:"y",get:function(){return this.position.y},set:function(t){this.transform.position.y=t}},{key:"worldTransform",get:function(){return this.transform.worldTransform}},{key:"localTransform",get:function(){return this.transform.localTransform}},{key:"position",get:function(){return this.transform.position},set:function(t){this.transform.position.copy(t)}},{key:"scale",get:function(){return this.transform.scale},set:function(t){this.transform.scale.copy(t)}},{key:"pivot",get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copy(t)}},{key:"skew",get:function(){return this.transform.skew},set:function(t){this.transform.skew.copy(t)}},{key:"rotation",get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t}},{key:"worldVisible",get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0}},{key:"mask",get:function(){return this._mask},set:function(t){this._mask&&(this._mask.renderable=!0),this._mask=t,this._mask&&(this._mask.renderable=!1)}},{key:"filters",get:function(){return this._filters&&this._filters.slice()},set:function(t){this._filters=t&&t.slice()}}]),e}(h.default);n.default=b,b.prototype.displayObjectUpdateTransform=b.prototype.updateTransform},{"../const":45,"../math":69,"../settings":100,"./Bounds":46,"./Transform":49,"./TransformStatic":51,eventemitter3:3}],49:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0];i(this,e);var r=o(this,t.call(this));return r.fillAlpha=1,r.lineWidth=0,r.nativeLines=n,r.lineColor=0,r.graphicsData=[],r.tint=16777215,r._prevTint=16777215,r.blendMode=m.BLEND_MODES.NORMAL,r.currentPath=null,r._webGL={},r.isMask=!1,r.boundsPadding=0,r._localBounds=new w.default,r.dirty=0,r.fastRectDirty=-1,r.clearDirty=0,r.boundsDirty=-1,r.cachedSpriteDirty=!1,r._spriteRect=null,r._fastRect=!1,r}return a(e,t),e.prototype.clone=function t(){var t=new e;t.renderable=this.renderable,t.fillAlpha=this.fillAlpha,t.lineWidth=this.lineWidth,t.lineColor=this.lineColor,t.tint=this.tint,t.blendMode=this.blendMode,t.isMask=this.isMask,t.boundsPadding=this.boundsPadding,t.dirty=0,t.cachedSpriteDirty=this.cachedSpriteDirty;for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(this.lineWidth=t,this.lineColor=e,this.lineAlpha=n,this.currentPath)if(this.currentPath.shape.points.length){var r=new g.Polygon(this.currentPath.shape.points.slice(-2));r.closed=!1,this.drawShape(r)}else this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha;return this},e.prototype.moveTo=function(t,e){var n=new g.Polygon([t,e]);return n.closed=!1,this.drawShape(n),this},e.prototype.lineTo=function(t,e){return this.currentPath.shape.points.push(t,e),this.dirty++,this},e.prototype.quadraticCurveTo=function(t,e,n,r){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var i=20,o=this.currentPath.shape.points,a=0,s=0;0===o.length&&this.moveTo(0,0);for(var u=o[o.length-2],h=o[o.length-1],l=1;l<=i;++l){var f=l/i;a=u+(t-u)*f,s=h+(e-h)*f,o.push(a+(t+(n-t)*f-a)*f,s+(e+(r-e)*f-s)*f)}return this.dirty++,this},e.prototype.bezierCurveTo=function(t,e,n,r,i,o){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var a=this.currentPath.shape.points,s=a[a.length-2],u=a[a.length-1];return a.length-=2,(0,T.default)(s,u,t,e,n,r,i,o,a),this.dirty++,this},e.prototype.arcTo=function(t,e,n,r,i){this.currentPath?0===this.currentPath.shape.points.length&&this.currentPath.shape.points.push(t,e):this.moveTo(t,e);var o=this.currentPath.shape.points,a=o[o.length-2],s=o[o.length-1],u=s-e,h=a-t,l=r-e,f=n-t,c=Math.abs(u*f-h*l);if(c<1e-8||0===i)o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e);else{var d=u*u+h*h,p=l*l+f*f,y=u*l+h*f,v=i*Math.sqrt(d)/c,g=i*Math.sqrt(p)/c,x=v*y/d,m=g*y/p,b=v*f+g*h,w=v*l+g*u,A=h*(g+x),T=u*(g+x),E=f*(v+m),O=l*(v+m),S=Math.atan2(T-w,A-b),M=Math.atan2(O-w,E-b);this.arc(b+t,w+e,i,S,M,h*l>f*u)}return this.dirty++,this},e.prototype.arc=function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(r===i)return this;!o&&i<=r?i+=2*Math.PI:o&&r<=i&&(r+=2*Math.PI);var a=i-r,s=40*Math.ceil(Math.abs(a)/(2*Math.PI));if(0===a)return this;var u=t+Math.cos(r)*n,h=e+Math.sin(r)*n,l=this.currentPath?this.currentPath.shape.points:null;l?l[l.length-2]===u&&l[l.length-1]===h||l.push(u,h):(this.moveTo(u,h),l=this.currentPath.shape.points);for(var f=a/(2*s),c=2*f,d=Math.cos(f),p=Math.sin(f),y=s-1,v=y%1/y,g=0;g<=y;++g){var x=g+v*g,m=f+r+c*x,b=Math.cos(m),w=-Math.sin(m);l.push((d*b+p*w)*n+t,(d*-w+p*b)*n+e)}return this.dirty++,this},e.prototype.beginFill=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this.filling=!0,this.fillColor=t,this.fillAlpha=e,this.currentPath&&this.currentPath.shape.points.length<=2&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},e.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},e.prototype.drawRect=function(t,e,n,r){return this.drawShape(new g.Rectangle(t,e,n,r)),this},e.prototype.drawRoundedRect=function(t,e,n,r,i){return this.drawShape(new g.RoundedRectangle(t,e,n,r,i)),this},e.prototype.drawCircle=function(t,e,n){return this.drawShape(new g.Circle(t,e,n)),this},e.prototype.drawEllipse=function(t,e,n,r){return this.drawShape(new g.Ellipse(t,e,n,r)),this},e.prototype.drawPolygon=function(t){var e=t,n=!0;if(e instanceof g.Polygon&&(n=e.closed,e=e.points),!Array.isArray(e)){e=new Array(arguments.length);for(var r=0;r0)&&(this.lineWidth=0,this.filling=!1,this.boundsDirty=-1,this.dirty++,this.clearDirty++,this.graphicsData.length=0),this.currentPath=null,this._spriteRect=null,this},e.prototype.isFastRect=function(){return 1===this.graphicsData.length&&this.graphicsData[0].shape.type===m.SHAPES.RECT&&!this.graphicsData[0].lineWidth},e.prototype._renderWebGL=function(t){this.dirty!==this.fastRectDirty&&(this.fastRectDirty=this.dirty,this._fastRect=this.isFastRect()),this._fastRect?this._renderSpriteRect(t):(t.setObjectRenderer(t.plugins.graphics),t.plugins.graphics.render(this))},e.prototype._renderSpriteRect=function(t){var e=this.graphicsData[0].shape;this._spriteRect||(this._spriteRect=new v.default(new c.default(c.default.WHITE)));var n=this._spriteRect;if(16777215===this.tint)n.tint=this.graphicsData[0].fillColor;else{var r=C,i=R;(0,x.hex2rgb)(this.graphicsData[0].fillColor,r),(0,x.hex2rgb)(this.tint,i),r[0]*=i[0],r[1]*=i[1],r[2]*=i[2],n.tint=(0,x.rgb2hex)(r)}n.alpha=this.graphicsData[0].fillAlpha,n.worldAlpha=this.worldAlpha*n.alpha,n.blendMode=this.blendMode,n._texture._frame.width=e.width,n._texture._frame.height=e.height,n.transform.worldTransform=this.transform.worldTransform,n.anchor.set(-e.x/e.width,-e.y/e.height),n._onAnchorUpdate(),n._renderWebGL(t)},e.prototype._renderCanvas=function(t){this.isMask!==!0&&t.plugins.graphics.render(this)},e.prototype._calculateBounds=function(){this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.updateLocalBounds(),this.cachedSpriteDirty=!0);var t=this._localBounds;this._bounds.addFrame(this.transform,t.minX,t.minY,t.maxX,t.maxY)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,P);for(var e=this.graphicsData,n=0;ne?o+s:e,n=ar?a+u:r;else if(f===m.SHAPES.CIRC)o=i.x,a=i.y,s=i.radius+c/2,u=i.radius+c/2,t=o-se?o+s:e,n=a-ur?a+u:r;else if(f===m.SHAPES.ELIP)o=i.x,a=i.y,s=i.width+c/2,u=i.height+c/2,t=o-se?o+s:e,n=a-ur?a+u:r;else for(var d=i.points,p=0,y=0,v=0,g=0,x=0,b=0,w=0,A=0,T=0;T+2e?w+x:e,n=A-br?A+b:r)}else t=0,e=0,n=0,r=0;var E=this.boundsPadding;this._localBounds.minX=t-E,this._localBounds.maxX=e+2*E,this._localBounds.minY=n-E,this._localBounds.maxY=r+2*E},e.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null;var e=new p.default(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,this.nativeLines,t);return this.graphicsData.push(e),e.type===m.SHAPES.POLY&&(e.shape.closed=e.shape.closed||this.filling,this.currentPath=e),this.dirty++,e},e.prototype.generateCanvasTexture=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getLocalBounds(),r=l.default.create(n.width,n.height,t,e);S||(S=new O.default),this.transform.updateLocalTransform(),this.transform.localTransform.copy(M),M.invert(),M.tx-=n.x,M.ty-=n.y,S.render(this,r,!0,M);var i=c.default.fromCanvas(r.baseTexture._canvasRenderTarget.canvas,t,"graphics");return i.baseTexture.resolution=e,i.baseTexture.update(),i},e.prototype.closePath=function(){var t=this.currentPath;return t&&t.shape&&t.shape.close(),this},e.prototype.addHole=function(){var t=this.graphicsData.pop();return this.currentPath=this.graphicsData[this.graphicsData.length-1],this.currentPath.addHole(t.shape), this.currentPath=null,this},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e);for(var n=0;nC?C:P,n.beginPath(),n.moveTo(E,O+P),n.lineTo(E,O+M-P),n.quadraticCurveTo(E,O+M,E+P,O+M),n.lineTo(E+S-P,O+M),n.quadraticCurveTo(E+S,O+M,E+S,O+M-P),n.lineTo(E+S,O+P),n.quadraticCurveTo(E+S,O,E+S-P,O),n.lineTo(E+P,O),n.quadraticCurveTo(E,O,E,O+P),n.closePath(),(u.fillColor||0===u.fillColor)&&(n.globalAlpha=u.fillAlpha*r,n.fillStyle="#"+("00000"+(0|l).toString(16)).substr(-6),n.fill()),u.lineWidth&&(n.globalAlpha=u.lineAlpha*r,n.strokeStyle="#"+("00000"+(0|f).toString(16)).substr(-6),n.stroke())}}},t.prototype.updateGraphicsTint=function(t){t._prevTint=t.tint;for(var e=(t.tint>>16&255)/255,n=(t.tint>>8&255)/255,r=(255&t.tint)/255,i=0;i>16&255)/255*e*255<<16)+((a>>8&255)/255*n*255<<8)+(255&a)/255*r*255,o._lineTint=((s>>16&255)/255*e*255<<16)+((s>>8&255)/255*n*255<<8)+(255&s)/255*r*255}},t.prototype.renderPolygon=function(t,e,n){n.moveTo(t[0],t[1]);for(var r=1;r8&&void 0!==arguments[8]?arguments[8]:[],h=20,l=0,f=0,c=0,d=0,p=0;u.push(t,e);for(var y=1,v=0;y<=h;++y)v=y/h,l=1-v,f=l*l,c=f*l,d=v*v,p=d*v,u.push(c*t+3*f*v*n+3*l*d*i+p*a,c*e+3*f*v*r+3*l*d*o+p*s);return u}n.__esModule=!0,n.default=r},{}],56:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("../../utils"),u=t("../../const"),h=t("../../renderers/webgl/utils/ObjectRenderer"),l=r(h),f=t("../../renderers/webgl/WebGLRenderer"),c=r(f),d=t("./WebGLGraphicsData"),p=r(d),y=t("./shaders/PrimitiveShader"),v=r(y),g=t("./utils/buildPoly"),x=r(g),m=t("./utils/buildRectangle"),b=r(m),w=t("./utils/buildRoundedRectangle"),A=r(w),T=t("./utils/buildCircle"),E=r(T),O=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.graphicsDataPool=[],r.primitiveShader=null,r.gl=n.gl,r.CONTEXT_UID=0,r}return a(e,t),e.prototype.onContextChange=function(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.primitiveShader=new v.default(this.gl)},e.prototype.destroy=function(){l.default.prototype.destroy.call(this);for(var t=0;t32e4)&&(r=this.graphicsDataPool.pop()||new p.default(this.renderer.gl,this.primitiveShader,this.renderer.state.attribsState),r.nativeLines=n,r.reset(e),t.data.push(r)),r.dirty=!0,r},e}(l.default);n.default=O,c.default.registerPlugin("graphics",O)},{"../../const":45,"../../renderers/webgl/WebGLRenderer":83,"../../renderers/webgl/utils/ObjectRenderer":93,"../../utils":123,"./WebGLGraphicsData":57,"./shaders/PrimitiveShader":58,"./utils/buildCircle":59,"./utils/buildPoly":61,"./utils/buildRectangle":62,"./utils/buildRoundedRectangle":63}],57:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=t("pixi-gl-core"),a=r(o),s=function(){function t(e,n,r){i(this,t),this.gl=e,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=a.default.GLBuffer.createVertexBuffer(e),this.indexBuffer=a.default.GLBuffer.createIndexBuffer(e),this.dirty=!0,this.nativeLines=!1,this.glPoints=null,this.glIndices=null,this.shader=n,this.vao=new a.default.VertexArrayObject(e,r).addIndex(this.indexBuffer).addAttribute(this.buffer,n.attributes.aVertexPosition,e.FLOAT,!1,24,0).addAttribute(this.buffer,n.attributes.aColor,e.FLOAT,!1,24,8)}return t.prototype.reset=function(){this.points.length=0,this.indices.length=0},t.prototype.upload=function(){this.glPoints=new Float32Array(this.points),this.buffer.upload(this.glPoints),this.glIndices=new Uint16Array(this.indices),this.indexBuffer.upload(this.glIndices),this.dirty=!1},t.prototype.destroy=function(){this.color=null,this.points=null,this.indices=null,this.vao.destroy(),this.buffer.destroy(),this.indexBuffer.destroy(),this.gl=null,this.buffer=null,this.indexBuffer=null,this.glPoints=null,this.glIndices=null},t}();n.default=s},{"pixi-gl-core":12}],58:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("../../../Shader"),u=r(s),h=function(t){function e(n){return i(this,e),o(this,t.call(this,n,["attribute vec2 aVertexPosition;","attribute vec4 aColor;","uniform mat3 translationMatrix;","uniform mat3 projectionMatrix;","uniform float alpha;","uniform vec3 tint;","varying vec4 vColor;","void main(void){"," gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);"," vColor = aColor * vec4(tint * alpha, alpha);","}"].join("\n"),["varying vec4 vColor;","void main(void){"," gl_FragColor = vColor;","}"].join("\n")))}return a(e,t),e}(u.default);n.default=h},{"../../../Shader":43}],59:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n){var r=t.shape,i=r.x,o=r.y,h=void 0,l=void 0;if(t.type===s.SHAPES.CIRC?(h=r.radius,l=r.radius):(h=r.width,l=r.height),0!==h&&0!==l){var f=Math.floor(30*Math.sqrt(r.radius))||Math.floor(15*Math.sqrt(r.width+r.height)),c=2*Math.PI/f;if(t.fill){var d=(0,u.hex2rgb)(t.fillColor),p=t.fillAlpha,y=d[0]*p,v=d[1]*p,g=d[2]*p,x=e.points,m=e.indices,b=x.length/6;m.push(b);for(var w=0;w196*p*p?(R=S-P,I=M-C,k=Math.sqrt(R*R+I*I),R/=k,I/=k,R*=p,I*=p,h.push(A-R,T-I),h.push(g,x,m,v),h.push(A+R,T+I),h.push(g,x,m,v),h.push(A-R,T-I),h.push(g,x,m,v),c++):(h.push(V,X),h.push(g,x,m,v),h.push(A-(V-A),T-(X-T)),h.push(g,x,m,v))}}b=n[2*(f-2)],w=n[2*(f-2)+1],A=n[2*(f-1)],T=n[2*(f-1)+1],S=-(w-T),M=b-A,k=Math.sqrt(S*S+M*M),S/=k,M/=k,S*=p,M*=p,h.push(A-S,T-M),h.push(g,x,m,v),h.push(A+S,T+M),h.push(g,x,m,v),l.push(d);for(var q=0;q=6){for(var i=[],o=t.holes,u=0;u0&&(0,a.default)(t,e,n)}n.__esModule=!0,n.default=i;var o=t("./buildLine"),a=r(o),s=t("../../../utils"),u=t("earcut"),h=r(u)},{"../../../utils":123,"./buildLine":60,earcut:2}],62:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n){var r=t.shape,i=r.x,o=r.y,u=r.width,h=r.height;if(t.fill){var l=(0,s.hex2rgb)(t.fillColor),f=t.fillAlpha,c=l[0]*f,d=l[1]*f,p=l[2]*f,y=e.points,v=e.indices,g=y.length/6;y.push(i,o),y.push(c,d,p,f),y.push(i+u,o),y.push(c,d,p,f),y.push(i,o+h),y.push(c,d,p,f),y.push(i+u,o+h),y.push(c,d,p,f),v.push(g,g,g+1,g+2,g+3,g+3)}if(t.lineWidth){var x=t.points;t.points=[i,o,i+u,o,i+u,o+h,i,o+h,i,o],(0,a.default)(t,e,n),t.points=x}}n.__esModule=!0,n.default=i;var o=t("./buildLine"),a=r(o),s=t("../../../utils")},{"../../../utils":123,"./buildLine":60}],63:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n){var r=t.shape,i=r.x,o=r.y,s=r.width,h=r.height,c=r.radius,d=[];if(d.push(i,o+c),a(i,o+h-c,i,o+h,i+c,o+h,d),a(i+s-c,o+h,i+s,o+h,i+s,o+h-c,d),a(i+s,o+c,i+s,o,i+s-c,o,d),a(i+c,o,i,o,i,o+c+1e-10,d),t.fill){for(var p=(0,f.hex2rgb)(t.fillColor),y=t.fillAlpha,v=p[0]*y,g=p[1]*y,x=p[2]*y,m=e.points,b=e.indices,w=m.length/6,A=(0,u.default)(d,null,2),T=0,E=A.length;T6&&void 0!==arguments[6]?arguments[6]:[],u=20,h=s,l=0,f=0,c=0,d=0,p=0,y=0,v=0,g=0;v<=u;++v)g=v/u,l=o(t,n,g),f=o(e,r,g),c=o(n,i,g),d=o(r,a,g),p=o(l,c,g),y=o(f,d,g),h.push(p,y);return h}n.__esModule=!0,n.default=i;var s=t("earcut"),u=r(s),h=t("./buildLine"),l=r(h),f=t("../../../utils")},{"../../../utils":123,"./buildLine":60,earcut:2}],64:[function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0,n.autoDetectRenderer=n.Application=n.Filter=n.SpriteMaskFilter=n.Quad=n.RenderTarget=n.ObjectRenderer=n.WebGLManager=n.Shader=n.CanvasRenderTarget=n.TextureUvs=n.VideoBaseTexture=n.BaseRenderTexture=n.RenderTexture=n.BaseTexture=n.Texture=n.Spritesheet=n.CanvasGraphicsRenderer=n.GraphicsRenderer=n.GraphicsData=n.Graphics=n.TextMetrics=n.TextStyle=n.Text=n.SpriteRenderer=n.CanvasTinter=n.CanvasSpriteRenderer=n.Sprite=n.TransformBase=n.TransformStatic=n.Transform=n.Container=n.DisplayObject=n.Bounds=n.glCore=n.WebGLRenderer=n.CanvasRenderer=n.ticker=n.utils=n.settings=void 0;var o=t("./const");Object.keys(o).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return o[t]}})});var a=t("./math");Object.keys(a).forEach(function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(n,t,{enumerable:!0,get:function(){return a[t]}})});var s=t("pixi-gl-core");Object.defineProperty(n,"glCore",{enumerable:!0,get:function(){return i(s).default}});var u=t("./display/Bounds");Object.defineProperty(n,"Bounds",{enumerable:!0,get:function(){return i(u).default}});var h=t("./display/DisplayObject");Object.defineProperty(n,"DisplayObject",{enumerable:!0,get:function(){return i(h).default}});var l=t("./display/Container");Object.defineProperty(n,"Container",{enumerable:!0,get:function(){return i(l).default}});var f=t("./display/Transform");Object.defineProperty(n,"Transform",{enumerable:!0,get:function(){return i(f).default}});var c=t("./display/TransformStatic");Object.defineProperty(n,"TransformStatic",{enumerable:!0,get:function(){return i(c).default}});var d=t("./display/TransformBase");Object.defineProperty(n,"TransformBase",{enumerable:!0,get:function(){return i(d).default}});var p=t("./sprites/Sprite");Object.defineProperty(n,"Sprite",{enumerable:!0,get:function(){return i(p).default}});var y=t("./sprites/canvas/CanvasSpriteRenderer");Object.defineProperty(n,"CanvasSpriteRenderer",{enumerable:!0,get:function(){return i(y).default}});var v=t("./sprites/canvas/CanvasTinter");Object.defineProperty(n,"CanvasTinter",{enumerable:!0,get:function(){return i(v).default}});var g=t("./sprites/webgl/SpriteRenderer");Object.defineProperty(n,"SpriteRenderer",{enumerable:!0,get:function(){return i(g).default}});var x=t("./text/Text");Object.defineProperty(n,"Text",{enumerable:!0,get:function(){return i(x).default}});var m=t("./text/TextStyle");Object.defineProperty(n,"TextStyle",{enumerable:!0,get:function(){return i(m).default}});var b=t("./text/TextMetrics");Object.defineProperty(n,"TextMetrics",{enumerable:!0,get:function(){return i(b).default}});var w=t("./graphics/Graphics");Object.defineProperty(n,"Graphics",{enumerable:!0,get:function(){return i(w).default}});var A=t("./graphics/GraphicsData");Object.defineProperty(n,"GraphicsData",{enumerable:!0,get:function(){return i(A).default}});var T=t("./graphics/webgl/GraphicsRenderer");Object.defineProperty(n,"GraphicsRenderer",{enumerable:!0,get:function(){return i(T).default}});var E=t("./graphics/canvas/CanvasGraphicsRenderer");Object.defineProperty(n,"CanvasGraphicsRenderer",{enumerable:!0,get:function(){return i(E).default}});var O=t("./textures/Spritesheet");Object.defineProperty(n,"Spritesheet",{enumerable:!0,get:function(){return i(O).default}});var S=t("./textures/Texture");Object.defineProperty(n,"Texture",{enumerable:!0,get:function(){return i(S).default}});var M=t("./textures/BaseTexture");Object.defineProperty(n,"BaseTexture",{enumerable:!0,get:function(){return i(M).default}});var P=t("./textures/RenderTexture");Object.defineProperty(n,"RenderTexture",{enumerable:!0,get:function(){return i(P).default}});var C=t("./textures/BaseRenderTexture");Object.defineProperty(n,"BaseRenderTexture",{enumerable:!0,get:function(){return i(C).default}});var R=t("./textures/VideoBaseTexture");Object.defineProperty(n,"VideoBaseTexture",{enumerable:!0,get:function(){return i(R).default}});var I=t("./textures/TextureUvs");Object.defineProperty(n,"TextureUvs",{enumerable:!0,get:function(){return i(I).default}});var k=t("./renderers/canvas/utils/CanvasRenderTarget");Object.defineProperty(n,"CanvasRenderTarget",{enumerable:!0,get:function(){return i(k).default}});var _=t("./Shader");Object.defineProperty(n,"Shader",{enumerable:!0,get:function(){return i(_).default}});var L=t("./renderers/webgl/managers/WebGLManager");Object.defineProperty(n,"WebGLManager",{enumerable:!0,get:function(){return i(L).default}});var j=t("./renderers/webgl/utils/ObjectRenderer");Object.defineProperty(n,"ObjectRenderer",{enumerable:!0,get:function(){return i(j).default}});var D=t("./renderers/webgl/utils/RenderTarget");Object.defineProperty(n,"RenderTarget",{enumerable:!0,get:function(){return i(D).default}});var N=t("./renderers/webgl/utils/Quad");Object.defineProperty(n,"Quad",{enumerable:!0,get:function(){return i(N).default}});var F=t("./renderers/webgl/filters/spriteMask/SpriteMaskFilter");Object.defineProperty(n,"SpriteMaskFilter",{enumerable:!0,get:function(){return i(F).default}});var U=t("./renderers/webgl/filters/Filter");Object.defineProperty(n,"Filter",{enumerable:!0,get:function(){return i(U).default}});var B=t("./Application");Object.defineProperty(n,"Application",{enumerable:!0,get:function(){return i(B).default}});var V=t("./autoDetectRenderer");Object.defineProperty(n,"autoDetectRenderer",{enumerable:!0,get:function(){return V.autoDetectRenderer}});var X=t("./utils"),W=r(X),q=t("./ticker"),G=r(q),H=t("./settings"),Y=i(H),z=t("./renderers/canvas/CanvasRenderer"),Q=i(z),K=t("./renderers/webgl/WebGLRenderer"),Z=i(K);n.settings=Y.default,n.utils=W,n.ticker=G,n.CanvasRenderer=Q.default,n.WebGLRenderer=Z.default},{"./Application":42,"./Shader":43,"./autoDetectRenderer":44,"./const":45,"./display/Bounds":46,"./display/Container":47,"./display/DisplayObject":48,"./display/Transform":49,"./display/TransformBase":50,"./display/TransformStatic":51,"./graphics/Graphics":52,"./graphics/GraphicsData":53,"./graphics/canvas/CanvasGraphicsRenderer":54,"./graphics/webgl/GraphicsRenderer":56,"./math":69,"./renderers/canvas/CanvasRenderer":76,"./renderers/canvas/utils/CanvasRenderTarget":78,"./renderers/webgl/WebGLRenderer":83,"./renderers/webgl/filters/Filter":85,"./renderers/webgl/filters/spriteMask/SpriteMaskFilter":88,"./renderers/webgl/managers/WebGLManager":92,"./renderers/webgl/utils/ObjectRenderer":93,"./renderers/webgl/utils/Quad":94,"./renderers/webgl/utils/RenderTarget":95,"./settings":100,"./sprites/Sprite":101,"./sprites/canvas/CanvasSpriteRenderer":102,"./sprites/canvas/CanvasTinter":103,"./sprites/webgl/SpriteRenderer":105,"./text/Text":107,"./text/TextMetrics":108,"./text/TextStyle":109,"./textures/BaseRenderTexture":110,"./textures/BaseTexture":111,"./textures/RenderTexture":112,"./textures/Spritesheet":113,"./textures/Texture":114,"./textures/TextureUvs":115,"./textures/VideoBaseTexture":116,"./ticker":119,"./utils":123,"pixi-gl-core":12}],65:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){return t<0?-1:t>0?1:0}function o(){for(var t=0;t<16;t++){var e=[];d.push(e);for(var n=0;n<16;n++)for(var r=i(u[t]*u[n]+l[t]*h[n]),o=i(h[t]*u[n]+f[t]*h[n]),a=i(u[t]*l[n]+l[t]*f[n]),p=i(h[t]*l[n]+f[t]*f[n]),y=0;y<16;y++)if(u[y]===r&&h[y]===o&&l[y]===a&&f[y]===p){e.push(y);break}}for(var v=0;v<16;v++){var g=new s.default;g.set(u[v],h[v],l[v],f[v],0,0),c.push(g)}}n.__esModule=!0;var a=t("./Matrix"),s=r(a),u=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],h=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],l=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],f=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],c=[],d=[];o();var p={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MIRROR_HORIZONTAL:12,uX:function(t){return u[t]},uY:function(t){return h[t]},vX:function(t){return l[t]},vY:function(t){return f[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return d[t][e]},sub:function(t,e){return d[t][p.inv(e)]},rotate180:function(t){return 4^t},isSwapWidthHeight:function(t){return 2===(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?p.S:p.N:2*Math.abs(e)<=Math.abs(t)?t>0?p.E:p.W:e>0?t>0?p.SE:p.SW:t>0?p.NE:p.NW},matrixAppendRotationInv:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=c[p.inv(e)];i.tx=n,i.ty=r,t.append(i)}};n.default=p},{"./Matrix":66}],66:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;i(this,t),this.a=e,this.b=n,this.c=r,this.d=o,this.tx=a,this.ty=s,this.array=null}return t.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},t.prototype.set=function(t,e,n,r,i,o){return this.a=t,this.b=e,this.c=n,this.d=r,this.tx=i,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var n=e||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},t.prototype.apply=function(t,e){e=e||new s.default;var n=t.x,r=t.y;return e.x=this.a*n+this.c*r+this.tx,e.y=this.b*n+this.d*r+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new s.default;var n=1/(this.a*this.d+this.c*-this.b),r=t.x,i=t.y;return e.x=this.d*n*r+-this.c*n*i+(this.ty*this.c-this.tx*this.d)*n,e.y=this.a*n*i+-this.b*n*r+(-this.ty*this.a+this.tx*this.b)*n,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),n=Math.sin(t),r=this.a,i=this.c,o=this.tx;return this.a=r*e-this.b*n,this.b=r*n+this.b*e,this.c=i*e-this.d*n,this.d=i*n+this.d*e,this.tx=o*e-this.ty*n,this.ty=o*n+this.ty*e,this},t.prototype.append=function(t){var e=this.a,n=this.b,r=this.c,i=this.d;return this.a=t.a*e+t.b*r,this.b=t.a*n+t.b*i,this.c=t.c*e+t.d*r,this.d=t.c*n+t.d*i,this.tx=t.tx*e+t.ty*r+this.tx,this.ty=t.tx*n+t.ty*i+this.ty,this},t.prototype.setTransform=function(t,e,n,r,i,o,a,s,u){var h=Math.sin(a),l=Math.cos(a),f=Math.cos(u),c=Math.sin(u),d=-Math.sin(s),p=Math.cos(s),y=l*i,v=h*i,g=-h*o,x=l*o;return this.a=f*y+c*g,this.b=f*v+c*x,this.c=d*y+p*g,this.d=d*v+p*x,this.tx=t+(n*y+r*g),this.ty=e+(n*v+r*x),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var n=this.a,r=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=r*t.a+this.d*t.c,this.d=r*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,n=this.b,r=this.c,i=this.d,o=-Math.atan2(-r,i),a=Math.atan2(n,e),s=Math.abs(o+a);return s<1e-5?(t.rotation=a,e<0&&i>=0&&(t.rotation+=t.rotation<=0?Math.PI:-Math.PI),t.skew.x=t.skew.y=0):(t.skew.x=o,t.skew.y=a),t.scale.x=Math.sqrt(e*e+n*n),t.scale.y=Math.sqrt(r*r+i*i),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function(){var t=this.a,e=this.b,n=this.c,r=this.d,i=this.tx,o=t*r-e*n;return this.a=r/o,this.b=-e/o,this.c=-n/o,this.d=t/o,this.tx=(n*this.ty-r*i)/o,this.ty=-(t*this.ty-e*i)/o,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copy=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},o(t,null,[{key:"IDENTITY",get:function(){return new t}},{key:"TEMP_MATRIX",get:function(){return new t}}]),t}();n.default=u},{"./Point":68}],67:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;r(this,t),this._x=i,this._y=o,this.cb=e,this.scope=n}return t.prototype.set=function(t,e){var n=t||0,r=e||(0!==e?n:0);this._x===n&&this._y===r||(this._x=n,this._y=r,this.cb.call(this.scope))},t.prototype.copy=function(t){this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope))},i(t,[{key:"x",get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))}},{key:"y",get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))}}]),t}();n.default=o},{}],68:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;r(this,t),this.x=e,this.y=n}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copy=function(t){this.set(t.x,t.y)},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){this.x=t||0,this.y=e||(0!==e?this.x:0)},t}();n.default=i},{}],69:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=t("./Point");Object.defineProperty(n,"Point",{enumerable:!0,get:function(){return r(i).default}});var o=t("./ObservablePoint");Object.defineProperty(n,"ObservablePoint",{enumerable:!0,get:function(){return r(o).default}});var a=t("./Matrix");Object.defineProperty(n,"Matrix",{enumerable:!0,get:function(){return r(a).default}});var s=t("./GroupD8");Object.defineProperty(n,"GroupD8",{enumerable:!0,get:function(){return r(s).default}});var u=t("./shapes/Circle");Object.defineProperty(n,"Circle",{enumerable:!0,get:function(){ return r(u).default}});var h=t("./shapes/Ellipse");Object.defineProperty(n,"Ellipse",{enumerable:!0,get:function(){return r(h).default}});var l=t("./shapes/Polygon");Object.defineProperty(n,"Polygon",{enumerable:!0,get:function(){return r(l).default}});var f=t("./shapes/Rectangle");Object.defineProperty(n,"Rectangle",{enumerable:!0,get:function(){return r(f).default}});var c=t("./shapes/RoundedRectangle");Object.defineProperty(n,"RoundedRectangle",{enumerable:!0,get:function(){return r(c).default}})},{"./GroupD8":65,"./Matrix":66,"./ObservablePoint":67,"./Point":68,"./shapes/Circle":70,"./shapes/Ellipse":71,"./shapes/Polygon":72,"./shapes/Rectangle":73,"./shapes/RoundedRectangle":74}],70:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=t("./Rectangle"),a=r(o),s=t("../../const"),u=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;i(this,t),this.x=e,this.y=n,this.radius=r,this.type=s.SHAPES.CIRC}return t.prototype.clone=function(){return new t(this.x,this.y,this.radius)},t.prototype.contains=function(t,e){if(this.radius<=0)return!1;var n=this.radius*this.radius,r=this.x-t,i=this.y-e;return r*=r,i*=i,r+i<=n},t.prototype.getBounds=function(){return new a.default(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},t}();n.default=u},{"../../const":45,"./Rectangle":73}],71:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=t("./Rectangle"),a=r(o),s=t("../../const"),u=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;i(this,t),this.x=e,this.y=n,this.width=r,this.height=o,this.type=s.SHAPES.ELIP}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var n=(t-this.x)/this.width,r=(e-this.y)/this.height;return n*=n,r*=r,n+r<=1},t.prototype.getBounds=function(){return new a.default(this.x-this.width,this.y-this.height,this.width,this.height)},t}();n.default=u},{"../../const":45,"./Rectangle":73}],72:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=t("../Point"),a=r(o),s=t("../../const"),u=function(){function t(){for(var e=arguments.length,n=Array(e),r=0;re!=h>e&&t<(u-a)*((e-s)/(h-s))+a;l&&(n=!n)}return n},t}();n.default=u},{"../../const":45,"../Point":68}],73:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;r(this,t),this.x=e,this.y=n,this.width=i,this.height=a,this.type=o.SHAPES.RECT}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t=this.y&&et.x+t.width&&(this.width=t.width-this.x,this.width<0&&(this.width=0)),this.y+this.height>t.y+t.height&&(this.height=t.height-this.y,this.height<0&&(this.height=0))},t.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),r=Math.min(this.y,t.y),i=Math.max(this.y+this.height,t.y+t.height);this.x=e,this.width=n-e,this.y=r,this.height=i-r},i(t,[{key:"left",get:function(){return this.x}},{key:"right",get:function(){return this.x+this.width}},{key:"top",get:function(){return this.y}},{key:"bottom",get:function(){return this.y+this.height}}],[{key:"EMPTY",get:function(){return new t(0,0,0,0)}}]),t}();n.default=a},{"../../const":45}],74:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=t("../../const"),o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20;r(this,t),this.x=e,this.y=n,this.width=o,this.height=a,this.radius=s,this.type=i.SHAPES.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var n=t-(this.x+this.radius),r=e-(this.y+this.radius),i=this.radius*this.radius;if(n*n+r*r<=i)return!0;if(n=t-(this.x+this.width-this.radius),n*n+r*r<=i)return!0;if(r=e-(this.y+this.height-this.radius),n*n+r*r<=i)return!0;if(n=t-(this.x+this.radius),n*n+r*r<=i)return!0}return!1},t}();n.default=o},{"../../const":45}],75:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=function(){function t(t,e){for(var n=0;nO?O:E,e.moveTo(b,w+E),e.lineTo(b,w+T-E),e.quadraticCurveTo(b,w+T,b+E,w+T),e.lineTo(b+A-E,w+T),e.quadraticCurveTo(b+A,w+T,b+A,w+T-E),e.lineTo(b+A,w+E),e.quadraticCurveTo(b+A,w,b+A-E,w),e.lineTo(b+E,w),e.quadraticCurveTo(b,w,b,w+E),e.closePath()}}}},t.prototype.popMask=function(t){t.context.restore()},t.prototype.destroy=function(){},t}();n.default=o},{"../../../const":45}],78:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:[];return(0,s.default)()?(t[o.BLEND_MODES.NORMAL]="source-over",t[o.BLEND_MODES.ADD]="lighter",t[o.BLEND_MODES.MULTIPLY]="multiply",t[o.BLEND_MODES.SCREEN]="screen",t[o.BLEND_MODES.OVERLAY]="overlay",t[o.BLEND_MODES.DARKEN]="darken",t[o.BLEND_MODES.LIGHTEN]="lighten",t[o.BLEND_MODES.COLOR_DODGE]="color-dodge",t[o.BLEND_MODES.COLOR_BURN]="color-burn",t[o.BLEND_MODES.HARD_LIGHT]="hard-light",t[o.BLEND_MODES.SOFT_LIGHT]="soft-light",t[o.BLEND_MODES.DIFFERENCE]="difference",t[o.BLEND_MODES.EXCLUSION]="exclusion",t[o.BLEND_MODES.HUE]="hue",t[o.BLEND_MODES.SATURATION]="saturate",t[o.BLEND_MODES.COLOR]="color",t[o.BLEND_MODES.LUMINOSITY]="luminosity"):(t[o.BLEND_MODES.NORMAL]="source-over",t[o.BLEND_MODES.ADD]="lighter",t[o.BLEND_MODES.MULTIPLY]="source-over",t[o.BLEND_MODES.SCREEN]="source-over",t[o.BLEND_MODES.OVERLAY]="source-over",t[o.BLEND_MODES.DARKEN]="source-over",t[o.BLEND_MODES.LIGHTEN]="source-over",t[o.BLEND_MODES.COLOR_DODGE]="source-over",t[o.BLEND_MODES.COLOR_BURN]="source-over",t[o.BLEND_MODES.HARD_LIGHT]="source-over",t[o.BLEND_MODES.SOFT_LIGHT]="source-over",t[o.BLEND_MODES.DIFFERENCE]="source-over",t[o.BLEND_MODES.EXCLUSION]="source-over",t[o.BLEND_MODES.HUE]="source-over",t[o.BLEND_MODES.SATURATION]="source-over",t[o.BLEND_MODES.COLOR]="source-over",t[o.BLEND_MODES.LUMINOSITY]="source-over"),t}n.__esModule=!0,n.default=i;var o=t("../../../const"),a=t("./canUseNewCanvasBlendModes"),s=r(a)},{"../../../const":45,"./canUseNewCanvasBlendModes":79}],81:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=t("../../const"),a=t("../../settings"),s=r(a),u=function(){function t(e){i(this,t),this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=s.default.GC_MAX_IDLE,this.checkCountMax=s.default.GC_MAX_CHECK_COUNT,this.mode=s.default.GC_MODE}return t.prototype.update=function(){this.count++,this.mode!==o.GC_MODES.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run()))},t.prototype.run=function(){for(var t=this.renderer.textureManager,e=t._managedTextures,n=!1,r=0;rthis.maxIdle&&(t.destroyTexture(i,!0),e[r]=null,n=!0)}if(n){for(var o=0,a=0;a=0;n--)this.unload(t.children[n])},t}();n.default=u},{"../../const":45,"../../settings":100}],82:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=t("pixi-gl-core"),a=t("../../const"),s=t("./utils/RenderTarget"),u=r(s),h=t("../../utils"),l=function(){function t(e){i(this,t),this.renderer=e,this.gl=e.gl,this._managedTextures=[]}return t.prototype.bindTexture=function(){},t.prototype.getTexture=function(){},t.prototype.updateTexture=function(t,e){var n=this.gl,r=!!t._glRenderTargets;if(!t.hasLoaded)return null;var i=this.renderer.boundTextures;if(void 0===e){e=0;for(var s=0;s 0.5)"," {"," color = vec4(1.0, 0.0, 0.0, 1.0);"," }"," else"," {"," color = vec4(0.0, 1.0, 0.0, 1.0);"," }"," gl_FragColor = mix(sample, masky, 0.5);"," gl_FragColor *= sample.a;","}"].join("\n")}}]),t}();n.default=d},{"../../../const":45,"../../../settings":100,"../../../utils":123,"./extractUniformsFromSrc":86}],86:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n){var r=o(t,n),i=o(e,n);return Object.assign(r,i)}function o(t){for(var e=new RegExp("^(projectionMatrix|uSampler|filterArea|filterClamp)$"),n={},r=void 0,i=t.replace(/\s+/g," ").split(/\s*;\s*/),o=0;o-1){var s=a.split(" "),h=s[1],l=s[2],f=1;l.indexOf("[")>-1&&(r=l.split(/\[|]/),l=r[0],f*=Number(r[1])),l.match(e)||(n[l]={value:u(h,f),name:l,type:h})}}return n}n.__esModule=!0,n.default=i;var a=t("pixi-gl-core"),s=r(a),u=s.default.shader.defaultValue},{"pixi-gl-core":12}],87:[function(t,e,n){"use strict";function r(t,e,n){var r=t.identity();return r.translate(e.x/n.width,e.y/n.height),r.scale(n.width,n.height),r}function i(t,e,n){var r=t.identity();r.translate(e.x/n.width,e.y/n.height);var i=n.width/e.width,o=n.height/e.height;return r.scale(i,o),r}function o(t,e,n,r){var i=r.worldTransform.copy(a.Matrix.TEMP_MATRIX),o=r._texture.baseTexture,s=t.identity(),u=n.height/n.width;s.translate(e.x/n.width,e.y/n.height),s.scale(1,u);var h=n.width/o.width,l=n.height/o.height;return i.tx/=o.width*h,i.ty/=o.width*h,i.invert(),s.prepend(i),s.scale(1,1/u),s.scale(h,l),s.translate(r.anchor.x,r.anchor.y),s}n.__esModule=!0,n.calculateScreenSpaceMatrix=r,n.calculateNormalizedScreenSpaceMatrix=i,n.calculateSpriteMatrix=o;var a=t("../../../math")},{"../../../math":69}],88:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("../Filter"),u=r(s),h=t("../../../../math"),l=(t("path"),function(t){function e(n){i(this,e);var r=new h.Matrix,a=o(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n}\n","varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float alpha;\nuniform sampler2D mask;\n\nvoid main(void)\n{\n // check clip! this will stop the mask bleeding out from the edges\n vec2 text = abs( vMaskCoord - 0.5 );\n text = step(0.5, text);\n\n float clip = 1.0 - max(text.y, text.x);\n vec4 original = texture2D(uSampler, vTextureCoord);\n vec4 masky = texture2D(mask, vMaskCoord);\n\n original *= (masky.r * masky.a * alpha * clip);\n\n gl_FragColor = original;\n}\n"));return n.renderable=!1,a.maskSprite=n,a.maskMatrix=r,a}return a(e,t),e.prototype.apply=function(t,e,n){var r=this.maskSprite;this.uniforms.mask=r._texture,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,r),this.uniforms.alpha=r.worldAlpha,t.applyFilter(this,e,n)},e}(u.default));n.default=l},{"../../../../math":69,"../Filter":85,path:23}],89:[function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var u=t("./WebGLManager"),h=i(u),l=t("../utils/RenderTarget"),f=i(l),c=t("../utils/Quad"),d=i(c),p=t("../../../math"),y=t("../../../Shader"),v=i(y),g=t("../filters/filterTransforms"),x=r(g),m=t("bit-twiddle"),b=i(m),w=function t(){s(this,t),this.renderTarget=null,this.sourceFrame=new p.Rectangle,this.destinationFrame=new p.Rectangle,this.filters=[],this.target=null,this.resolution=1},A=function(t){function e(n){s(this,e);var r=o(this,t.call(this,n));return r.gl=r.renderer.gl,r.quad=new d.default(r.gl,n.state.attribState),r.shaderCache={},r.pool={},r.filterData=null,r}return a(e,t),e.prototype.pushFilter=function(t,e){var n=this.renderer,r=this.filterData;if(!r){r=this.renderer._activeRenderTarget.filterStack;var i=new w;i.sourceFrame=i.destinationFrame=this.renderer._activeRenderTarget.size,i.renderTarget=n._activeRenderTarget,this.renderer._activeRenderTarget.filterData=r={index:0,stack:[i]},this.filterData=r}var o=r.stack[++r.index];o||(o=r.stack[r.index]=new w);var a=e[0].resolution,s=0|e[0].padding,u=t.filterArea||t.getBounds(!0),h=o.sourceFrame,l=o.destinationFrame;h.x=(u.x*a|0)/a,h.y=(u.y*a|0)/a,h.width=(u.width*a|0)/a,h.height=(u.height*a|0)/a,r.stack[0].renderTarget.transform||e[0].autoFit&&h.fit(r.stack[0].destinationFrame),h.pad(s),l.width=h.width,l.height=h.height;var f=this.getPotRenderTarget(n.gl,h.width,h.height,a);o.target=t,o.filters=e,o.resolution=a,o.renderTarget=f,f.setFrame(l,h),n.bindRenderTarget(f),f.clear()},e.prototype.popFilter=function(){var t=this.filterData,e=t.stack[t.index-1],n=t.stack[t.index];this.quad.map(n.renderTarget.size,n.sourceFrame).upload();var r=n.filters;if(1===r.length)r[0].apply(this,n.renderTarget,e.renderTarget,!1,n),this.freePotRenderTarget(n.renderTarget);else{var i=n.renderTarget,o=this.getPotRenderTarget(this.renderer.gl,n.sourceFrame.width,n.sourceFrame.height,n.resolution);o.setFrame(n.destinationFrame,n.sourceFrame),o.clear();var a=0;for(a=0;a0&&(e+="\nelse "),n1&&void 0!==arguments[1]?arguments[1]:[];return e[i.BLEND_MODES.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.ADD]=[t.ONE,t.DST_ALPHA],e[i.BLEND_MODES.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR],e[i.BLEND_MODES.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e}n.__esModule=!0,n.default=r;var i=t("../../../const")},{"../../../const":45}],98:[function(t,e,n){"use strict";function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e[i.DRAW_MODES.POINTS]=t.POINTS,e[i.DRAW_MODES.LINES]=t.LINES,e[i.DRAW_MODES.LINE_LOOP]=t.LINE_LOOP,e[i.DRAW_MODES.LINE_STRIP]=t.LINE_STRIP,e[i.DRAW_MODES.TRIANGLES]=t.TRIANGLES,e[i.DRAW_MODES.TRIANGLE_STRIP]=t.TRIANGLE_STRIP,e[i.DRAW_MODES.TRIANGLE_FAN]=t.TRIANGLE_FAN,e}n.__esModule=!0,n.default=r;var i=t("../../../const")},{"../../../const":45}],99:[function(t,e,n){"use strict";function r(t){var e=t.getContextAttributes();e.stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")}n.__esModule=!0,n.default=r},{}],100:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=t("./utils/maxRecommendedTextures"),o=r(i),a=t("./utils/canUploadSameBuffer"),s=r(a);n.default={TARGET_FPMS:.06,MIPMAP_TEXTURES:!0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:(0,o.default)(32),SPRITE_BATCH_SIZE:4096,RETINA_PREFIX:/@([0-9\.]+)x/,RENDER_OPTIONS:{view:null,antialias:!1,forceFXAA:!1,autoResize:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,roundPixels:!1,width:800,height:600,legacy:!1},TRANSFORM_MODE:0,GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:0,SCALE_MODE:0,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:"mediump",CAN_UPLOAD_SAME_BUFFER:(0,s.default)()}},{"./utils/canUploadSameBuffer":120,"./utils/maxRecommendedTextures":124}],101:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=function(){function t(t,e){for(var n=0;nr&&y.xi&&y.y>16)+(65280&t)+((255&t)<<16)}},{key:"texture",get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture=t,this.cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.hasLoaded?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))}}]),e}(p.default);n.default=v},{"../const":45,"../display/Container":47,"../math":69,"../textures/Texture":114,"../utils":123}],102:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=t("../../renderers/canvas/CanvasRenderer"),a=r(o),s=t("../../const"),u=t("../../math"),h=t("./CanvasTinter"),l=r(h),f=new u.Matrix,c=function(){function t(e){i(this,t),this.renderer=e}return t.prototype.render=function(t){var e=t._texture,n=this.renderer,r=e._frame.width,i=e._frame.height,o=t.transform.worldTransform,a=0,h=0;if(!(e.orig.width<=0||e.orig.height<=0)&&e.baseTexture.source&&(n.setBlendMode(t.blendMode),e.valid)){n.context.globalAlpha=t.worldAlpha;var c=e.baseTexture.scaleMode===s.SCALE_MODES.LINEAR;n.smoothProperty&&n.context[n.smoothProperty]!==c&&(n.context[n.smoothProperty]=c),e.trim?(a=e.trim.width/2+e.trim.x-t.anchor.x*e.orig.width,h=e.trim.height/2+e.trim.y-t.anchor.y*e.orig.height):(a=(.5-t.anchor.x)*e.orig.width,h=(.5-t.anchor.y)*e.orig.height),e.rotate&&(o.copy(f),o=f,u.GroupD8.matrixAppendRotationInv(o,e.rotate,a,h),a=0,h=0),a-=r/2,h-=i/2,n.roundPixels?(n.context.setTransform(o.a,o.b,o.c,o.d,o.tx*n.resolution|0,o.ty*n.resolution|0),a|=0,h|=0):n.context.setTransform(o.a,o.b,o.c,o.d,o.tx*n.resolution,o.ty*n.resolution);var d=e.baseTexture.resolution;16777215!==t.tint?(t.cachedTint!==t.tint&&(t.cachedTint=t.tint,t.tintedTexture=l.default.getTintedTexture(t,t.tint)),n.context.drawImage(t.tintedTexture,0,0,r*d,i*d,a*n.resolution,h*n.resolution,r*n.resolution,i*n.resolution)):n.context.drawImage(e.baseTexture.source,e._frame.x*d,e._frame.y*d,r*d,i*d,a*n.resolution,h*n.resolution,r*n.resolution,i*n.resolution)}},t.prototype.destroy=function(){this.renderer=null},t}();n.default=c,a.default.registerPlugin("sprite",c)},{"../../const":45,"../../math":69,"../../renderers/canvas/CanvasRenderer":76,"./CanvasTinter":103}],103:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=t("../../utils"),o=t("../../renderers/canvas/utils/canUseNewCanvasBlendModes"),a=r(o),s={getTintedTexture:function(t,e){var n=t._texture;e=s.roundColor(e);var r="#"+("00000"+(0|e).toString(16)).substr(-6);if(n.tintCache=n.tintCache||{},n.tintCache[r])return n.tintCache[r];var i=s.canvas||document.createElement("canvas");if(s.tintMethod(n,e,i),s.convertTintToImage){var o=new Image;o.src=i.toDataURL(),n.tintCache[r]=o}else n.tintCache[r]=i,s.canvas=null;return i},tintWithMultiply:function(t,e,n){var r=n.getContext("2d"),i=t._frame.clone(),o=t.baseTexture.resolution;i.x*=o,i.y*=o,i.width*=o,i.height*=o,n.width=Math.ceil(i.width),n.height=Math.ceil(i.height),r.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),r.fillRect(0,0,i.width,i.height),r.globalCompositeOperation="multiply",r.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height),r.globalCompositeOperation="destination-atop",r.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height)},tintWithOverlay:function(t,e,n){var r=n.getContext("2d"),i=t._frame.clone(),o=t.baseTexture.resolution;i.x*=o,i.y*=o,i.width*=o,i.height*=o,n.width=Math.ceil(i.width),n.height=Math.ceil(i.height),r.globalCompositeOperation="copy",r.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),r.fillRect(0,0,i.width,i.height),r.globalCompositeOperation="destination-atop",r.drawImage(t.baseTexture.source,i.x,i.y,i.width,i.height,0,0,i.width,i.height)},tintWithPerPixel:function(t,e,n){var r=n.getContext("2d"),o=t._frame.clone(),a=t.baseTexture.resolution;o.x*=a,o.y*=a,o.width*=a,o.height*=a,n.width=Math.ceil(o.width),n.height=Math.ceil(o.height),r.globalCompositeOperation="copy",r.drawImage(t.baseTexture.source,o.x,o.y,o.width,o.height,0,0,o.width,o.height);for(var s=(0,i.hex2rgb)(e),u=s[0],h=s[1],l=s[2],f=r.getImageData(0,0,o.width,o.height),c=f.data,d=0;d=this.size&&this.flush(),t._texture._uvs&&(this.sprites[this.currentIndex++]=t)},e.prototype.flush=function(){if(0!==this.currentIndex){var t=this.renderer.gl,e=this.MAX_TEXTURES,n=E.default.nextPow2(this.currentIndex),r=E.default.log2(n),i=this.buffers[r],o=this.sprites,a=this.groups,s=i.float32View,u=i.uint32View,h=this.boundTextures,l=this.renderer.boundTextures,f=this.renderer.textureGC.count,c=0,d=void 0,p=void 0,y=1,v=0,g=a[0],x=void 0,m=void 0,w=o[0].blendMode;g.textureCount=0,g.start=0,g.blend=w,O++;var T=void 0;for(T=0;T0&&(e+="\nelse "),n0?this.context.shadowColor=e.dropShadowColor:this.context.fillStyle=e.dropShadowColor;for(var c=Math.cos(e.dropShadowAngle)*e.dropShadowDistance,d=Math.sin(e.dropShadowAngle)*e.dropShadowDistance,p=0;p3&&void 0!==arguments[3]&&arguments[3],i=this._style,o=i.letterSpacing;if(0===o)return void(r?this.context.strokeText(t,e,n):this.context.fillText(t,e,n));for(var a=String.prototype.split.call(t,""),s=e,u=0,h="";u3&&void 0!==arguments[3]?arguments[3]:t._canvas;r=r||n.wordWrap;var o=n.toFontString(),a=t.measureFont(o),s=i.getContext("2d");s.font=o;for(var u=r?t.wordWrap(e,n,i):e,h=u.split(/(?:\r\n|\r|\n)/),l=new Array(h.length),f=0,c=0;c2&&void 0!==arguments[2]?arguments[2]:t._canvas,i=r.getContext("2d"),o="",a=e.split("\n"),s=n.wordWrapWidth,u={},h=0;hs)for(var p=f[c].split(""),y=0;yl?(o+="\n"+v,l=s-g):(0===y&&(o+=" "),o+=v,l-=g)}else{var x=d+i.measureText(" ").width;0===c||x>l?(c>0&&(o+="\n"),o+=f[c],l=s-d):(l-=x,o+=" "+f[c])}}ha;--f){for(var y=0;y=0;n--){var r=e[n].trim();/([\"\'])[^\'\"]+\1/.test(r)||(r='"'+r+'"'),e[n]=r}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},s(t,[{key:"align",get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)}},{key:"breakWords",get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)}},{key:"dropShadow",get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)}},{key:"dropShadowAlpha",get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)}},{key:"dropShadowAngle",get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)}},{key:"dropShadowBlur",get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)}},{key:"dropShadowColor",get:function(){return this._dropShadowColor},set:function(t){var e=o(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)}},{key:"dropShadowDistance",get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)}},{key:"fill",get:function(){return this._fill},set:function(t){var e=o(t);this._fill!==e&&(this._fill=e,this.styleID++)}},{key:"fillGradientType",get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)}},{key:"fillGradientStops",get:function(){return this._fillGradientStops},set:function(t){a(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)}},{key:"fontFamily",get:function(){return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)}},{key:"fontSize",get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)}},{key:"fontStyle",get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)}},{key:"fontVariant",get:function(){return this._fontVariant},set:function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)}},{key:"fontWeight",get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)}},{key:"letterSpacing",get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)}},{key:"lineHeight",get:function(){return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)}},{key:"lineJoin",get:function(){return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)}},{key:"miterLimit",get:function(){return this._miterLimit},set:function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)}},{key:"padding",get:function(){return this._padding},set:function(t){this._padding!==t&&(this._padding=t,this.styleID++)}},{key:"stroke",get:function(){return this._stroke},set:function(t){var e=o(t);this._stroke!==e&&(this._stroke=e,this.styleID++)}},{key:"strokeThickness",get:function(){return this._strokeThickness},set:function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)}},{key:"textBaseline",get:function(){return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)}},{key:"trim",get:function(){return this._trim},set:function(t){this._trim!==t&&(this._trim=t,this.styleID++)}},{key:"wordWrap",get:function(){return this._wordWrap},set:function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)}},{key:"wordWrapWidth",get:function(){return this._wordWrapWidth},set:function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)}}]),t}();n.default=f},{"../const":45,"../utils":123}],110:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0 }}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("./BaseTexture"),u=r(s),h=t("../settings"),l=r(h),f=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,a=arguments[2],s=arguments[3];i(this,e);var u=o(this,t.call(this,null,a));return u.resolution=s||l.default.RESOLUTION,u.width=n,u.height=r,u.realWidth=u.width*u.resolution,u.realHeight=u.height*u.resolution,u.scaleMode=void 0!==a?a:l.default.SCALE_MODE,u.hasLoaded=!0,u._glRenderTargets={},u._canvasRenderTarget=null,u.valid=!1,u}return a(e,t),e.prototype.resize=function(t,e){t===this.width&&e===this.height||(this.valid=t>0&&e>0,this.width=t,this.height=e,this.realWidth=this.width*this.resolution,this.realHeight=this.height*this.resolution,this.valid&&this.emit("update",this))},e.prototype.destroy=function(){t.prototype.destroy.call(this,!0),this.renderer=null},e}(u.default);n.default=f},{"../settings":100,"./BaseTexture":111}],111:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("../utils"),u=t("../settings"),h=r(u),l=t("eventemitter3"),f=r(l),c=t("../utils/determineCrossOrigin"),d=r(c),p=t("bit-twiddle"),y=r(p),v=function(t){function e(n,r,a){i(this,e);var u=o(this,t.call(this));return u.uid=(0,s.uid)(),u.touched=0,u.resolution=a||h.default.RESOLUTION,u.width=100,u.height=100,u.realWidth=100,u.realHeight=100,u.scaleMode=void 0!==r?r:h.default.SCALE_MODE,u.hasLoaded=!1,u.isLoading=!1,u.source=null,u.origSource=null,u.imageType=null,u.sourceScale=1,u.premultipliedAlpha=!0,u.imageUrl=null,u.isPowerOfTwo=!1,u.mipmap=h.default.MIPMAP_TEXTURES,u.wrapMode=h.default.WRAP_MODE,u._glTextures={},u._enabled=0,u._virtalBoundId=-1,u._destroyed=!1,u.textureCacheIds=[],n&&u.loadSource(n),u}return a(e,t),e.prototype.update=function(){"svg"!==this.imageType&&(this.realWidth=this.source.naturalWidth||this.source.videoWidth||this.source.width,this.realHeight=this.source.naturalHeight||this.source.videoHeight||this.source.height,this._updateDimensions()),this.emit("update",this)},e.prototype._updateDimensions=function(){this.width=this.realWidth/this.resolution,this.height=this.realHeight/this.resolution,this.isPowerOfTwo=y.default.isPow2(this.realWidth)&&y.default.isPow2(this.realHeight)},e.prototype.loadSource=function(t){var e=this.isLoading;this.hasLoaded=!1,this.isLoading=!1,e&&this.source&&(this.source.onload=null,this.source.onerror=null);var n=!this.source;if(this.source=t,(t.src&&t.complete||t.getContext)&&t.width&&t.height)this._updateImageType(),"svg"===this.imageType?this._loadSvgSource():this._sourceLoaded(),n&&this.emit("loaded",this);else if(!t.getContext){this.isLoading=!0;var r=this;if(t.onload=function(){if(r._updateImageType(),t.onload=null,t.onerror=null,r.isLoading)return r.isLoading=!1,r._sourceLoaded(),"svg"===r.imageType?void r._loadSvgSource():void r.emit("loaded",r)},t.onerror=function(){t.onload=null,t.onerror=null,r.isLoading&&(r.isLoading=!1,r.emit("error",r))},t.complete&&t.src){if(t.onload=null,t.onerror=null,"svg"===r.imageType)return void r._loadSvgSource();this.isLoading=!1,t.width&&t.height?(this._sourceLoaded(),e&&this.emit("loaded",this)):e&&this.emit("error",this)}}},e.prototype._updateImageType=function(){if(this.imageUrl){var t=(0,s.decomposeDataUri)(this.imageUrl),e=void 0;if(t&&"image"===t.mediaType){var n=t.subType.split("+")[0];if(e=(0,s.getUrlFileExtension)("."+n),!e)throw new Error("Invalid image type in data URI.")}else e=(0,s.getUrlFileExtension)(this.imageUrl),e||(e="png");this.imageType=e}},e.prototype._loadSvgSource=function(){if("svg"===this.imageType){var t=(0,s.decomposeDataUri)(this.imageUrl);t?this._loadSvgSourceUsingDataUri(t):this._loadSvgSourceUsingXhr()}},e.prototype._loadSvgSourceUsingDataUri=function(t){var e=void 0;if("base64"===t.encoding){if(!atob)throw new Error("Your browser doesn't support base64 conversions.");e=atob(t.data)}else e=t.data;this._loadSvgSourceUsingString(e)},e.prototype._loadSvgSourceUsingXhr=function(){var t=this,e=new XMLHttpRequest;e.onload=function(){if(e.readyState!==e.DONE||200!==e.status)throw new Error("Failed to load SVG using XHR.");t._loadSvgSourceUsingString(e.response)},e.onerror=function(){return t.emit("error",t)},e.open("GET",this.imageUrl,!0),e.send()},e.prototype._loadSvgSourceUsingString=function(t){var n=(0,s.getSvgSize)(t),r=n.width,i=n.height;if(!r||!i)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");this.realWidth=Math.round(r*this.sourceScale),this.realHeight=Math.round(i*this.sourceScale),this._updateDimensions();var o=document.createElement("canvas");o.width=this.realWidth,o.height=this.realHeight,o._pixiId="canvas_"+(0,s.uid)(),o.getContext("2d").drawImage(this.source,0,0,r,i,0,0,this.realWidth,this.realHeight),this.origSource=this.source,this.source=o,e.addToCache(this,o._pixiId),this.isLoading=!1,this._sourceLoaded(),this.emit("loaded",this)},e.prototype._sourceLoaded=function(){this.hasLoaded=!0,this.update()},e.prototype.destroy=function(){this.imageUrl&&(delete s.TextureCache[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")),this.source=null,this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this._destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.updateSourceImage=function(t){this.source.src=t,this.loadSource(this.source)},e.fromImage=function(t,n,r,i){var o=s.BaseTextureCache[t];if(!o){var a=new Image;void 0===n&&0!==t.indexOf("data:")&&(a.crossOrigin=(0,d.default)(t)),o=new e(a,r),o.imageUrl=t,i&&(o.sourceScale=i),o.resolution=(0,s.getResolutionOfUrl)(t),a.src=t,e.addToCache(o,t)}return o},e.fromCanvas=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas";t._pixiId||(t._pixiId=r+"_"+(0,s.uid)());var i=s.BaseTextureCache[t._pixiId];return i||(i=new e(t,n),e.addToCache(i,t._pixiId)),i},e.from=function(t,n,r){if("string"==typeof t)return e.fromImage(t,void 0,n,r);if(t instanceof HTMLImageElement){var i=t.src,o=s.BaseTextureCache[i];return o||(o=new e(t,n),o.imageUrl=i,r&&(o.sourceScale=r),o.resolution=(0,s.getResolutionOfUrl)(i),e.addToCache(o,i)),o}return t instanceof HTMLCanvasElement?e.fromCanvas(t,n):t},e.addToCache=function(t,e){e&&(t.textureCacheIds.indexOf(e)===-1&&t.textureCacheIds.push(e),s.BaseTextureCache[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),s.BaseTextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=s.BaseTextureCache[t];if(e){var n=e.textureCacheIds.indexOf(t);return n>-1&&e.textureCacheIds.splice(n,1),delete s.BaseTextureCache[t],e}}else if(t&&t.textureCacheIds){for(var r=0;r0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,n||this.baseTexture.resize(t,e),this._updateUvs()},e.create=function(t,n,r,i){return new e(new u.default(t,n,r,i))},e}(l.default);n.default=f},{"./BaseRenderTexture":110,"./Texture":114}],113:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null;r(this,t),this.baseTexture=e,this.textures={},this.data=n,this.resolution=this._updateResolution(i||this.baseTexture.imageUrl),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return i(t,null,[{key:"BATCH_SIZE",get:function(){return 1e3}}]),t.prototype._updateResolution=function(t){var e=this.data.meta.scale,n=(0,a.getResolutionOfUrl)(t,null);return null===n&&(n=void 0!==e?parseFloat(e):1),1!==n&&(this.baseTexture.resolution=n,this.baseTexture.update()),n},t.prototype.parse=function(e){this._batchIndex=0,this._callback=e,this._frameKeys.length<=t.BATCH_SIZE?(this._processFrames(0),this._parseComplete()):this._nextBatch()},t.prototype._processFrames=function(e){for(var n=e,r=t.BATCH_SIZE;n-e0&&void 0!==arguments[0]&&arguments[0];for(var e in this.textures)this.textures[e].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&this.baseTexture.destroy(),this.baseTexture=null},t}();n.default=s},{"../":64,"../utils":123}],114:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(){var t=document.createElement("canvas");t.width=10,t.height=10;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,10,10),new A(new f.default(t))}function u(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}n.__esModule=!0;var h=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"canvas";return new e(f.default.fromCanvas(t,n,r))},e.fromVideo=function(t,n){return"string"==typeof t?e.fromVideoUrl(t,n):new e(d.default.fromVideo(t,n))},e.fromVideoUrl=function(t,n){return new e(d.default.fromUrl(t,n))},e.from=function(t){if("string"==typeof t){var n=m.TextureCache[t];if(!n){var r=null!==t.match(/\.(mp4|webm|ogg|h264|avi|mov)$/);return r?e.fromVideoUrl(t):e.fromImage(t)}return n}return t instanceof HTMLImageElement?new e(f.default.from(t)):t instanceof HTMLCanvasElement?e.fromCanvas(t,w.default.SCALE_MODE,"HTMLCanvasElement"):t instanceof HTMLVideoElement?e.fromVideo(t):t instanceof f.default?new e(t):t},e.fromLoader=function(t,n,r){var i=new f.default(t,void 0,(0,m.getResolutionOfUrl)(n)),o=new e(i);return i.imageUrl=n,r||(r=n),f.default.addToCache(o.baseTexture,r),e.addToCache(o,r),r!==n&&(f.default.addToCache(o.baseTexture,n),e.addToCache(o,n)),o},e.addToCache=function(t,e){e&&(t.textureCacheIds.indexOf(e)===-1&&t.textureCacheIds.push(e),m.TextureCache[e]&&console.warn("Texture added to the cache with an id ["+e+"] that already had an entry"),m.TextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=m.TextureCache[t];if(e){var n=e.textureCacheIds.indexOf(t);return n>-1&&e.textureCacheIds.splice(n,1),delete m.TextureCache[t],e}}else if(t&&t.textureCacheIds){for(var r=0;rthis.baseTexture.width||t.y+t.height>this.baseTexture.height)throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+("X: "+t.x+" + "+t.width+" > "+this.baseTexture.width+" ")+("Y: "+t.y+" + "+t.height+" > "+this.baseTexture.height));this.valid=t&&t.width&&t.height&&this.baseTexture.hasLoaded,this.trim||this.rotate||(this.orig=t),this.valid&&this._updateUvs()}},{key:"rotate",get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this._updateUvs()}},{key:"width",get:function(){return this.orig.width}},{key:"height",get:function(){return this.orig.height}}]),e}(g.default);n.default=A,A.EMPTY=new A(new f.default),u(A.EMPTY),u(A.EMPTY.baseTexture),A.WHITE=s(),u(A.WHITE),u(A.WHITE.baseTexture)},{"../math":69,"../settings":100,"../utils":123,"./BaseTexture":111,"./TextureUvs":115,"./VideoBaseTexture":116,eventemitter3:3}],115:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=t("../math/GroupD8"),a=r(o),s=function(){function t(){i(this,t),this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsUint32=new Uint32Array(4)}return t.prototype.set=function(t,e,n){var r=e.width,i=e.height;if(n){var o=t.width/2/r,s=t.height/2/i,u=t.x/r+o,h=t.y/i+s;n=a.default.add(n,a.default.NW),this.x0=u+o*a.default.uX(n),this.y0=h+s*a.default.uY(n),n=a.default.add(n,2),this.x1=u+o*a.default.uX(n),this.y1=h+s*a.default.uY(n),n=a.default.add(n,2),this.x2=u+o*a.default.uX(n),this.y2=h+s*a.default.uY(n),n=a.default.add(n,2),this.x3=u+o*a.default.uX(n),this.y3=h+s*a.default.uY(n)}else this.x0=t.x/r,this.y0=t.y/i,this.x1=(t.x+t.width)/r,this.y1=t.y/i,this.x2=(t.x+t.width)/r,this.y2=(t.y+t.height)/i,this.x3=t.x/r,this.y3=(t.y+t.height)/i;this.uvsUint32[0]=(65535*this.y0&65535)<<16|65535*this.x0&65535,this.uvsUint32[1]=(65535*this.y1&65535)<<16|65535*this.x1&65535,this.uvsUint32[2]=(65535*this.y2&65535)<<16|65535*this.x2&65535,this.uvsUint32[3]=(65535*this.y3&65535)<<16|65535*this.x3&65535},t}();n.default=s},{"../math/GroupD8":65}],116:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){e||(e="video/"+t.substr(t.lastIndexOf(".")+1));var n=document.createElement("source");return n.src=t,n.type=e,n}n.__esModule=!0;var u=function(){function t(t,e){for(var n=0;n0&&t.paused===!1&&t.ended===!1&&t.readyState>2},e.prototype._isSourceReady=function(){return 3===this.source.readyState||4===this.source.readyState},e.prototype._onPlayStart=function(){this.hasLoaded||this._onCanPlay(),!this._isAutoUpdating&&this.autoUpdate&&(c.shared.add(this.update,this,d.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0)},e.prototype._onPlayStop=function(){this._isAutoUpdating&&(c.shared.remove(this.update,this),this._isAutoUpdating=!1)},e.prototype._onCanPlay=function(){this.hasLoaded=!0,this.source&&(this.source.removeEventListener("canplay",this._onCanPlay),this.source.removeEventListener("canplaythrough",this._onCanPlay),this.width=this.source.videoWidth,this.height=this.source.videoHeight,this.__loaded||(this.__loaded=!0,this.emit("loaded",this)),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.source.play())},e.prototype.destroy=function(){this._isAutoUpdating&&c.shared.remove(this.update,this),this.source&&this.source._pixiId&&(l.default.removeFromCache(this.source._pixiId),delete this.source._pixiId),t.prototype.destroy.call(this)},e.fromVideo=function(t,n){t._pixiId||(t._pixiId="video_"+(0,f.uid)());var r=f.BaseTextureCache[t._pixiId];return r||(r=new e(t,n),l.default.addToCache(r,t._pixiId)),r},e.fromUrl=function(t,n){var r=document.createElement("video");if(r.setAttribute("webkit-playsinline",""),r.setAttribute("playsinline",""),Array.isArray(t))for(var i=0;i2&&void 0!==arguments[2]?arguments[2]:u.UPDATE_PRIORITY.NORMAL;return this._addListener(new l.default(t,e,n))},t.prototype.addOnce=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.UPDATE_PRIORITY.NORMAL;return this._addListener(new l.default(t,e,n,!0))},t.prototype._addListener=function(t){var e=this._head.next,n=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(n);break}n=e,e=e.next}t.previous||t.connect(n)}else t.connect(n);return this._startIfPossible(),this},t.prototype.remove=function(t,e){for(var n=this._head.next;n;)n=n.match(t,e)?n.destroy():n.next;return this._head.next||this._cancelIfNeeded(),this},t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.destroy=function(){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null},t.prototype.update=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:performance.now(),e=void 0;if(t>this.lastTime){e=this.elapsedMS=t-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*s.default.TARGET_FPMS*this.speed;for(var n=this._head,r=n.next;r;)r=r.emit(this.deltaTime);n.next||this._cancelIfNeeded()}else this.deltaTime=this.elapsedMS=0;this.lastTime=t},o(t,[{key:"FPS",get:function(){return 1e3/this.elapsedMS}},{key:"minFPS",get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(Math.max(0,t)/1e3,s.default.TARGET_FPMS);this._maxElapsedMS=1/e}}]),t}();n.default=f},{"../const":45,"../settings":100,"./TickerListener":118}],118:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];r(this,t),this.fn=e,this.context=n,this.priority=i,this.once=o,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return e=e||null,this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.previous;return this.next=t?null:e,this.previous=null,e},t}();n.default=i},{}],119:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0,n.Ticker=n.shared=void 0;var i=t("./Ticker"),o=r(i),a=new o.default;a.autoStart=!0,a.destroy=function(){},n.shared=a,n.Ticker=o.default},{"./Ticker":117}],120:[function(t,e,n){"use strict";function r(){var t=!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform);return!t}n.__esModule=!0,n.default=r},{}],121:[function(t,e,n){"use strict";function r(t){for(var e=6*t,n=new Uint16Array(e),r=0,i=0;r1&&void 0!==arguments[1]?arguments[1]:window.location;if(0===t.indexOf("data:"))return"";e=e||window.location,s||(s=document.createElement("a")),s.href=t,t=a.default.parse(s.href);var n=!t.port&&""===e.port||t.port===e.port;return t.hostname===e.hostname&&n&&t.protocol===e.protocol?"":"anonymous"}n.__esModule=!0,n.default=i;var o=t("url"),a=r(o),s=void 0},{url:29}],123:[function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function o(){return++I}function a(t,e){return e=e||[],e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function s(t){return t=t.toString(16),t="000000".substr(0,6-t.length)+t,"#"+t}function u(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)}function h(t,e){var n=A.default.RETINA_PREFIX.exec(t);return n?parseFloat(n[1]):void 0!==e?e:1}function l(t){var e=b.DATA_URI.exec(t);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,encoding:e[3]?e[3].toLowerCase():void 0,data:e[4]}}function f(t){var e=b.URL_FILE_EXTENSION.exec(t);if(e)return e[1].toLowerCase()}function c(t){var e=b.SVG_SIZE.exec(t),n={};return e&&(n[e[1]]=Math.round(parseFloat(e[3])),n[e[5]]=Math.round(parseFloat(e[7]))),n}function d(){k=!0}function p(t){if(!k){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c Pixi.js "+b.VERSION+" - ✰ "+t+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,e)}else window.console&&window.console.log("Pixi.js "+b.VERSION+" - "+t+" - http://www.pixijs.com/");k=!0}}function y(){var t={stencil:!0,failIfMajorPerformanceCaveat:!0};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),n=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),r=!(!n||!n.getContextAttributes().stencil);if(n){var i=n.getExtension("WEBGL_lose_context");i&&i.loseContext()}return n=null,r}catch(t){return!1}}function v(t){return 0===t?0:t<0?-1:1}function g(t,e,n){var r=t.length;if(!(e>=r||0===n)){n=e+n>r?r-e:n;for(var i=r-n,o=e;o1?this._fontStyle="italic":t.indexOf("oblique")>-1?this._fontStyle="oblique":this._fontStyle="normal",t.indexOf("small-caps")>-1?this._fontVariant="small-caps":this._fontVariant="normal";var e=t.split(" "),n=-1;this._fontSize=26;for(var i=0;i-1&&n=this._durations[this.currentFrame];)r-=this._durations[this.currentFrame]*i,this._currentTime+=i;this._currentTime+=r/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):n!==this.currentFrame&&this.updateTexture()},e.prototype.updateTexture=function(){this._texture=this._textures[this.currentFrame],this._textureID=-1,this.onFrameChange&&this.onFrameChange(this.currentFrame)},e.prototype.destroy=function(){this.stop(),t.prototype.destroy.call(this)},e.fromFrames=function(t){for(var n=[],r=0;r1&&void 0!==arguments[1]?arguments[1]:{};o(this,e);var i=a(this,t.call(this));return i._textWidth=0,i._textHeight=0,i._glyphs=[],i._font={tint:void 0!==r.tint?r.tint:16777215,align:r.align||"left",name:null,size:0},i.font=r.font,i._text=n,i.maxWidth=0,i.maxLineHeight=0,i._anchor=new c.default(function(){i.dirty=!0},i,0,0),i.dirty=!1,i.updateText(),i}return s(e,t),e.prototype.updateText=function(){for(var t=e.fonts[this._font.name],n=this._font.size/t.size,r=new l.Point,i=[],o=[],a=null,s=0,u=0,h=0,f=-1,c=0,d=0,p=0;p0&&r.x*n>this.maxWidth)l.utils.removeItems(i,f,p-f),p=f,f=-1,o.push(c),u=Math.max(u,c),h++,r.x=0,r.y+=t.lineHeight,a=null;else{var v=t.chars[y];v&&(a&&v.kerning[a]&&(r.x+=v.kerning[a]),i.push({texture:v.texture,line:h,charCode:y,position:new l.Point(r.x+v.xOffset,r.y+v.yOffset)}),s=r.x+(v.texture.width+v.xOffset),r.x+=v.xAdvance,d=Math.max(d,v.yOffset+v.texture.height),a=y)}}o.push(s),u=Math.max(u,s);for(var g=[],x=0;x<=h;x++){var m=0;"right"===this._font.align?m=u-o[x]:"center"===this._font.align&&(m=(u-o[x])/2),g.push(m)}for(var b=i.length,w=this.tint,A=0;A=0?t:16777215,this.dirty=!0}},{key:"align",get:function(){return this._font.align},set:function(t){this._font.align=t||"left",this.dirty=!0}},{key:"anchor",get:function(){return this._anchor},set:function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copy(t)}},{key:"font",get:function(){return this._font},set:function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):e.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)}},{key:"text",get:function(){return this._text},set:function(t){t=t.toString()||" ",this._text!==t&&(this._text=t,this.dirty=!0)}},{key:"textWidth",get:function(){return this.validate(),this._textWidth}},{key:"textHeight",get:function(){return this.validate(),this._textHeight}}]),e}(l.Container);n.default=d,d.fonts={}},{"../core":64,"../core/math/ObservablePoint":67}],134:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:100,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100;o(this,e);var s=a(this,t.call(this,n)); return s.tileTransform=new l.TransformStatic,s._width=r,s._height=i,s._canvasPattern=null,s.uvTransform=n.transform||new p.default(n),s.pluginName="tilingSprite",s.uvRespectAnchor=!1,s}return s(e,t),e.prototype._onTextureUpdate=function(){this.uvTransform&&(this.uvTransform.texture=this._texture)},e.prototype._renderWebGL=function(t){var e=this._texture;e&&e.valid&&(this.tileTransform.updateLocalTransform(),this.uvTransform.update(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},e.prototype._renderCanvas=function(t){var e=this._texture;if(e.baseTexture.hasLoaded){var n=t.context,r=this.worldTransform,i=t.resolution,o=e.baseTexture,a=o.resolution,s=this.tilePosition.x/this.tileScale.x%e._frame.width*a,u=this.tilePosition.y/this.tileScale.y%e._frame.height*a;if(!this._canvasPattern){var h=new l.CanvasRenderTarget(e._frame.width,e._frame.height,a);16777215!==this.tint?(this.cachedTint!==this.tint&&(this.cachedTint=this.tint,this.tintedTexture=c.default.getTintedTexture(this,this.tint)),h.context.drawImage(this.tintedTexture,0,0)):h.context.drawImage(o.source,-e._frame.x,-e._frame.y),this._canvasPattern=h.context.createPattern(h.canvas,"repeat")}n.globalAlpha=this.worldAlpha,n.setTransform(r.a*i,r.b*i,r.c*i,r.d*i,r.tx*i,r.ty*i),t.setBlendMode(this.blendMode),n.fillStyle=this._canvasPattern,n.scale(this.tileScale.x/a,this.tileScale.y/a);var f=this.anchor.x*-this._width,d=this.anchor.y*-this._height;this.uvRespectAnchor?(n.translate(s,u),n.fillRect(-s+f,-u+d,this._width/this.tileScale.x*a,this._height/this.tileScale.y*a)):(n.translate(s+f,u+d),n.fillRect(-s,-u,this._width/this.tileScale.x*a,this._height/this.tileScale.y*a))}},e.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,n=this._width*(1-this._anchor._x),r=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,n,r)},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._x),e||(this._localBoundsRect||(this._localBoundsRect=new l.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,y);var e=this._width,n=this._height,r=-e*this.anchor._x;if(y.x>r&&y.xi&&y.y0&&void 0!==arguments[0]?arguments[0]:new o.Point,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t}},{"../core":64}],139:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0,n.BitmapText=n.TilingSpriteRenderer=n.TilingSprite=n.AnimatedSprite=void 0;var i=t("./AnimatedSprite");Object.defineProperty(n,"AnimatedSprite",{enumerable:!0,get:function(){return r(i).default}});var o=t("./TilingSprite");Object.defineProperty(n,"TilingSprite",{enumerable:!0,get:function(){return r(o).default}});var a=t("./webgl/TilingSpriteRenderer");Object.defineProperty(n,"TilingSpriteRenderer",{enumerable:!0,get:function(){return r(a).default}});var s=t("./BitmapText");Object.defineProperty(n,"BitmapText",{enumerable:!0,get:function(){return r(s).default}}),t("./cacheAsBitmap"),t("./getChildByName"),t("./getGlobalPosition")},{"./AnimatedSprite":132,"./BitmapText":133,"./TilingSprite":135,"./cacheAsBitmap":136,"./getChildByName":137,"./getGlobalPosition":138,"./webgl/TilingSpriteRenderer":140}],140:[function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("../../core"),u=r(s),h=t("../../core/const"),l=(t("path"),new u.Matrix),f=new Float32Array(4),c=function(t){function e(n){i(this,e);var r=o(this,t.call(this,n));return r.shader=null,r.simpleShader=null,r.quad=null,r}return a(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.shader=new u.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = mod(vTextureCoord - uClampOffset, vec2(1.0, 1.0)) + uClampOffset;\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 sample = texture2D(uSampler, coord);\n vec4 color = vec4(uColor.rgb * uColor.a, uColor.a);\n\n gl_FragColor = sample * color ;\n}\n"),this.simpleShader=new u.Shader(t,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n vec4 sample = texture2D(uSampler, vTextureCoord);\n vec4 color = vec4(uColor.rgb * uColor.a, uColor.a);\n gl_FragColor = sample * color;\n}\n"),this.renderer.bindVao(null),this.quad=new u.Quad(t,this.renderer.state.attribState),this.quad.initVao(this.shader)},e.prototype.render=function(t){var e=this.renderer,n=this.quad;e.bindVao(n.vao);var r=n.vertices;r[0]=r[6]=t._width*-t.anchor.x,r[1]=r[3]=t._height*-t.anchor.y,r[2]=r[4]=t._width*(1-t.anchor.x),r[5]=r[7]=t._height*(1-t.anchor.y),t.uvRespectAnchor&&(r=n.uvs,r[0]=r[6]=-t.anchor.x,r[1]=r[3]=-t.anchor.y,r[2]=r[4]=1-t.anchor.x,r[5]=r[7]=1-t.anchor.y),n.upload();var i=t._texture,o=i.baseTexture,a=t.tileTransform.localTransform,s=t.uvTransform,c=o.isPowerOfTwo&&i.frame.width===o.width&&i.frame.height===o.height;c&&(o._glTextures[e.CONTEXT_UID]?c=o.wrapMode!==h.WRAP_MODES.CLAMP:o.wrapMode===h.WRAP_MODES.CLAMP&&(o.wrapMode=h.WRAP_MODES.REPEAT));var d=c?this.simpleShader:this.shader;e.bindShader(d);var p=i.width,y=i.height,v=t._width,g=t._height;l.set(a.a*p/v,a.b*p/g,a.c*y/v,a.d*y/g,a.tx/v,a.ty/g),l.invert(),c?l.prepend(s.mapCoord):(d.uniforms.uMapCoord=s.mapCoord.toArray(!0),d.uniforms.uClampFrame=s.uClampFrame,d.uniforms.uClampOffset=s.uClampOffset),d.uniforms.uTransform=l.toArray(!0);var x=f;u.utils.hex2rgb(t.tint,x),x[3]=t.worldAlpha,d.uniforms.uColor=x,d.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),d.uniforms.uSampler=e.bindTexture(i),e.setBlendMode(t.blendMode),n.vao.draw(this.renderer.gl.TRIANGLES,6,0)},e}(u.ObjectRenderer);n.default=c,u.WebGLRenderer.registerPlugin("tilingSprite",c)},{"../../core":64,"../../core/const":45,path:23}],141:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var u=function(){function t(t,e){for(var n=0;n=n&&(u=t-h-1),l=l.replace("%value%",e[u]),a+=l,a+="\n"}return r=r.replace("%blur%",a),r=r.replace("%size%",t)}n.__esModule=!0,n.default=r;var i={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},o=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join("\n")},{}],145:[function(t,e,n){"use strict";function r(t,e){var n=Math.ceil(t/2),r=i,o="",a=void 0;a=e?"vBlurTexCoords[%index%] = aTextureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] = aTextureCoord + vec2(0.0, %sampleIndex% * strength);";for(var s=0;se;)n-=2;return n}n.__esModule=!0,n.default=r},{}],147:[function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=function(){function t(t,e){for(var n=0;n 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n"));return n.uniforms.m=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],n.alpha=1,n}return a(e,t),e.prototype._loadMatrix=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t;e&&(this._multiply(n,this.uniforms.m,t),n=this._colorMatrix(n)),this.uniforms.m=n},e.prototype._multiply=function(t,e,n){return t[0]=e[0]*n[0]+e[1]*n[5]+e[2]*n[10]+e[3]*n[15],t[1]=e[0]*n[1]+e[1]*n[6]+e[2]*n[11]+e[3]*n[16],t[2]=e[0]*n[2]+e[1]*n[7]+e[2]*n[12]+e[3]*n[17],t[3]=e[0]*n[3]+e[1]*n[8]+e[2]*n[13]+e[3]*n[18],t[4]=e[0]*n[4]+e[1]*n[9]+e[2]*n[14]+e[3]*n[19]+e[4],t[5]=e[5]*n[0]+e[6]*n[5]+e[7]*n[10]+e[8]*n[15],t[6]=e[5]*n[1]+e[6]*n[6]+e[7]*n[11]+e[8]*n[16],t[7]=e[5]*n[2]+e[6]*n[7]+e[7]*n[12]+e[8]*n[17],t[8]=e[5]*n[3]+e[6]*n[8]+e[7]*n[13]+e[8]*n[18],t[9]=e[5]*n[4]+e[6]*n[9]+e[7]*n[14]+e[8]*n[19]+e[9],t[10]=e[10]*n[0]+e[11]*n[5]+e[12]*n[10]+e[13]*n[15],t[11]=e[10]*n[1]+e[11]*n[6]+e[12]*n[11]+e[13]*n[16],t[12]=e[10]*n[2]+e[11]*n[7]+e[12]*n[12]+e[13]*n[17],t[13]=e[10]*n[3]+e[11]*n[8]+e[12]*n[13]+e[13]*n[18],t[14]=e[10]*n[4]+e[11]*n[9]+e[12]*n[14]+e[13]*n[19]+e[14],t[15]=e[15]*n[0]+e[16]*n[5]+e[17]*n[10]+e[18]*n[15],t[16]=e[15]*n[1]+e[16]*n[6]+e[17]*n[11]+e[18]*n[16],t[17]=e[15]*n[2]+e[16]*n[7]+e[17]*n[12]+e[18]*n[17],t[18]=e[15]*n[3]+e[16]*n[8]+e[17]*n[13]+e[18]*n[18],t[19]=e[15]*n[4]+e[16]*n[9]+e[17]*n[14]+e[18]*n[19]+e[19],t},e.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},e.prototype.brightness=function(t,e){var n=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.greyscale=function(t,e){var n=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.blackAndWhite=function(t){var e=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var n=Math.cos(t),r=Math.sin(t),i=Math.sqrt,o=1/3,a=i(o),s=n+(1-n)*o,u=o*(1-n)-a*r,h=o*(1-n)+a*r,l=o*(1-n)+a*r,f=n+o*(1-n),c=o*(1-n)-a*r,d=o*(1-n)-a*r,p=o*(1-n)+a*r,y=n+o*(1-n),v=[s,u,h,0,0,l,f,c,0,0,d,p,y,0,0,0,0,0,1,0];this._loadMatrix(v,e)},e.prototype.contrast=function(t,e){var n=(t||0)+1,r=-128*(n-1),i=[n,0,0,0,r,0,n,0,0,r,0,0,n,0,r,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.saturate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],n=2*t/3+1,r=(n-1)*-.5,i=[n,r,r,0,0,r,n,r,0,0,r,r,n,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){var e=[0,1,1,0,0,1,0,1,0,0,1,1,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.sepia=function(t){var e=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.technicolor=function(t){var e=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.polaroid=function(t){var e=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.toBGR=function(t){var e=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.kodachrome=function(t){var e=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.browni=function(t){var e=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.vintage=function(t){var e=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.colorTone=function(t,e,n,r,i){t=t||.2,e=e||.15,n=n||16770432,r=r||3375104;var o=(n>>16&255)/255,a=(n>>8&255)/255,s=(255&n)/255,u=(r>>16&255)/255,h=(r>>8&255)/255,l=(255&r)/255,f=[.3,.59,.11,0,0,o,a,s,t,0,u,h,l,e,0,o-u,a-h,s-l,0,0];this._loadMatrix(f,i)},e.prototype.night=function(t,e){t=t||.1;var n=[t*-2,-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.predator=function(t,e){var n=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.lsd=function(t){var e=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(e,t)},e.prototype.reset=function(){var t=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(t,!1)},s(e,[{key:"matrix",get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t}},{key:"alpha",get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t}}]),e}(h.Filter));n.default=l,l.prototype.grayscale=l.prototype.greyscale},{"../../core":64,path:23}], 148:[function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=function(){function t(t,e){for(var n=0;n lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec2 fragCoord = vTextureCoord * filterArea.xy;\n\n vec4 color;\n\n color = fxaa(uSampler, fragCoord, filterArea.xy, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n'))}return a(e,t),e}(u.Filter));n.default=h},{"../../core":64,path:23}],150:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=t("./fxaa/FXAAFilter");Object.defineProperty(n,"FXAAFilter",{enumerable:!0,get:function(){return r(i).default}});var o=t("./noise/NoiseFilter");Object.defineProperty(n,"NoiseFilter",{enumerable:!0,get:function(){return r(o).default}});var a=t("./displacement/DisplacementFilter");Object.defineProperty(n,"DisplacementFilter",{enumerable:!0,get:function(){return r(a).default}});var s=t("./blur/BlurFilter");Object.defineProperty(n,"BlurFilter",{enumerable:!0,get:function(){return r(s).default}});var u=t("./blur/BlurXFilter");Object.defineProperty(n,"BlurXFilter",{enumerable:!0,get:function(){return r(u).default}});var h=t("./blur/BlurYFilter");Object.defineProperty(n,"BlurYFilter",{enumerable:!0,get:function(){return r(h).default}});var l=t("./colormatrix/ColorMatrixFilter");Object.defineProperty(n,"ColorMatrixFilter",{enumerable:!0,get:function(){return r(l).default}});var f=t("./void/VoidFilter");Object.defineProperty(n,"VoidFilter",{enumerable:!0,get:function(){return r(f).default}})},{"./blur/BlurFilter":141,"./blur/BlurXFilter":142,"./blur/BlurYFilter":143,"./colormatrix/ColorMatrixFilter":147,"./displacement/DisplacementFilter":148,"./fxaa/FXAAFilter":149,"./noise/NoiseFilter":151,"./void/VoidFilter":152}],151:[function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:.5,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.random();i(this,e);var a=o(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n"));return a.noise=n,a.seed=r,a}return a(e,t),s(e,[{key:"noise",get:function(){return this.uniforms.uNoise},set:function(t){this.uniforms.uNoise=t}},{key:"seed",get:function(){return this.uniforms.uSeed},set:function(t){this.uniforms.uSeed=t}}]),e}(h.Filter));n.default=l},{"../../core":64,path:23}],152:[function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var s=t("../../core"),u=r(s),h=(t("path"),function(t){function e(){i(this,e);var n=o(this,t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n"));return n.glShaderKey="void",n}return a(e,t),e}(u.Filter));n.default=h},{"../../core":64,path:23}],153:[function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var o=t("../core"),a=r(o),s=function(){function t(){i(this,t),this.global=new a.Point,this.target=null,this.originalEvent=null,this.identifier=null}return t.prototype.getLocalPosition=function(t,e,n){return t.worldTransform.applyInverse(n||this.global,e)},t}();n.default=s},{"../core":64}],154:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function(){function t(){r(this,t),this.stopped=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return t.prototype.stopPropagation=function(){this.stopped=!0},t.prototype._reset=function(){this.stopped=!1,this.currentTarget=null,this.target=null},t}();n.default=i},{}],155:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}n.__esModule=!0;var u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h=t("../core"),l=i(h),f=t("./InteractionData"),c=r(f),d=t("./InteractionEvent"),p=r(d),y=t("./InteractionTrackingData"),v=r(y),g=t("eventemitter3"),x=r(g),m=t("./interactiveTarget"),b=r(m);l.utils.mixins.delayMixin(l.DisplayObject.prototype,b.default);var w="MOUSE",A={target:null,data:{global:null}},T=function(t){function e(n,r){o(this,e);var i=a(this,t.call(this));return r=r||{},i.renderer=n,i.autoPreventDefault=void 0===r.autoPreventDefault||r.autoPreventDefault,i.interactionFrequency=r.interactionFrequency||10,i.mouse=new c.default,i.mouse.identifier=w,i.mouse.global.set(-999999),i.activeInteractionData={},i.activeInteractionData[w]=i.mouse,i.interactionDataPool=[],i.eventData=new p.default,i.interactionDOMElement=null,i.moveWhenInside=!1,i.eventsAdded=!1,i.mouseOverRenderer=!1,i.supportsTouchEvents="ontouchstart"in window,i.supportsPointerEvents=!!window.PointerEvent,i.onPointerUp=i.onPointerUp.bind(i),i.processPointerUp=i.processPointerUp.bind(i),i.onPointerCancel=i.onPointerCancel.bind(i),i.processPointerCancel=i.processPointerCancel.bind(i),i.onPointerDown=i.onPointerDown.bind(i),i.processPointerDown=i.processPointerDown.bind(i),i.onPointerMove=i.onPointerMove.bind(i),i.processPointerMove=i.processPointerMove.bind(i),i.onPointerOut=i.onPointerOut.bind(i),i.processPointerOverOut=i.processPointerOverOut.bind(i),i.onPointerOver=i.onPointerOver.bind(i),i.cursorStyles={default:"inherit",pointer:"pointer"},i.currentCursorMode=null,i.cursor=null,i._tempPoint=new l.Point,i.resolution=1,i.setTargetElement(i.renderer.view,i.renderer.resolution),i}return s(e,t),e.prototype.hitTest=function(t,e){return A.target=null,A.data.global=t,e||(e=this.renderer._lastObjectRendered),this.processInteractive(A,e,null,!0),A.target},e.prototype.setTargetElement=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents()},e.prototype.addEvents=function(){this.interactionDOMElement&&(l.ticker.shared.add(this.update,this,l.UPDATE_PRIORITY.INTERACTION),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0))),this.eventsAdded=!0)},e.prototype.removeEvents=function(){this.interactionDOMElement&&(l.ticker.shared.remove(this.update,this),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0))),this.interactionDOMElement=null,this.eventsAdded=!1)},e.prototype.update=function(t){if(this._deltaTime+=t,!(this._deltaTime=0;h--){var l=u[h],f=this.processInteractive(t,l,n,r,s);if(f){if(!l.parent)continue;s=!1,f&&(t.target&&(r=!1),a=!0)}}return i&&(r&&!t.target&&(e.hitArea?(e.worldTransform.applyInverse(o,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)&&(a=!0)):e.containsPoint&&e.containsPoint(o)&&(a=!0)),e.interactive&&(a&&!t.target&&(t.target=e),n&&n(t,e,!!a))),a},e.prototype.onPointerDown=function(t){var e=this.normalizeToPointerData(t);this.autoPreventDefault&&e[0].isNormalized&&t.preventDefault();for(var n=e.length,r=0;r1&&(l=1);var f=Math.sqrt(r*r+i*i),c=this._texture.height/2;r/=f,i/=f,r*=c,i*=c,o[h]=u.x+r,o[h+1]=u.y+i,o[h+2]=u.x-r,o[h+3]=u.y-i,e=u}},e.prototype.updateTransform=function(){this.autoUpdate&&this.refreshVertices(),this.containerUpdateTransform()},e}(u.default);n.default=h},{"./Mesh":164}],168:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var a=t("../../core"),s=i(a),u=t("../Mesh"),h=r(u),l=function(){function t(e){o(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,n=e.context,r=t.worldTransform,i=e.resolution;e.roundPixels?n.setTransform(r.a*i,r.b*i,r.c*i,r.d*i,r.tx*i|0,r.ty*i|0):n.setTransform(r.a*i,r.b*i,r.c*i,r.d*i,r.tx*i,r.ty*i),e.setBlendMode(t.blendMode),t.drawMode===h.default.DRAW_MODES.TRIANGLE_MESH?this._renderTriangleMesh(t):this._renderTriangles(t)},t.prototype._renderTriangleMesh=function(t){for(var e=t.vertices.length/2,n=0;n0){var O=t.canvasPadding/t.worldTransform.a,S=t.canvasPadding/t.worldTransform.d,M=(m+b+w)/3,P=(A+T+E)/3,C=m-M,R=A-P,I=Math.sqrt(C*C+R*R);m=M+C/I*(I+O),A=P+R/I*(I+S),C=b-M,R=T-P,I=Math.sqrt(C*C+R*R),b=M+C/I*(I+O),T=P+R/I*(I+S),C=w-M,R=E-P,I=Math.sqrt(C*C+R*R),w=M+C/I*(I+O),E=P+R/I*(I+S)}i.save(),i.beginPath(),i.moveTo(m,A),i.lineTo(b,T),i.lineTo(w,E),i.closePath(),i.clip();var k=c*v+y*p+d*g-v*p-y*d-c*g,_=m*v+y*w+b*g-v*w-y*b-m*g,L=c*b+m*p+d*w-b*p-m*d-c*w,j=c*v*w+y*b*p+m*d*g-m*v*p-y*d*w-c*b*g,D=A*v+y*E+T*g-v*E-y*T-A*g,N=c*T+A*p+d*E-T*p-A*d-c*E,F=c*v*E+y*T*p+A*d*g-A*v*p-y*d*E-c*T*g;i.transform(_/k,D/k,L/k,N/k,j/k,F/k),i.drawImage(h,0,0,l*u.resolution,f*u.resolution,0,0,l,f),i.restore()}},t.prototype.renderMeshFlat=function(t){var e=this.renderer.context,n=t.vertices,r=n.length/2;e.beginPath();for(var i=1;i0&&void 0!==arguments[0]?arguments[0]:1500,r=arguments[1],a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16384;i(this,e);var s=o(this,t.call(this)),h=16384;return a>h&&(a=h),a>n&&(a=n),s._properties=[!1,!0,!1,!1,!1],s._maxSize=n,s._batchSize=a,s._glBuffers={},s._bufferToUpdate=0,s.interactiveChildren=!1,s.blendMode=u.BLEND_MODES.NORMAL,s.roundPixels=!0,s.baseTexture=null,s.setProperties(r),s}return a(e,t),e.prototype.setProperties=function(t){t&&(this._properties[0]="scale"in t?!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="alpha"in t?!!t.alpha:this._properties[4])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},e.prototype.renderWebGL=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.hasLoaded||this.baseTexture.once("update",function(){return e.onChildrenChange(0)})),t.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},e.prototype.onChildrenChange=function(t){var e=Math.floor(t/this._batchSize);en&&(o=n);var a=t._glBuffers[i.CONTEXT_UID];a||(a=t._glBuffers[i.CONTEXT_UID]=this.generateBuffers(t)),this.renderer.setBlendMode(t.blendMode);var s=i.gl,u=t.worldTransform.copy(this.tempMatrix);u.prepend(i._activeRenderTarget.projectionMatrix),this.shader.uniforms.projectionMatrix=u.toArray(!0),this.shader.uniforms.uAlpha=t.worldAlpha;var h=e[0]._texture.baseTexture;this.shader.uniforms.uSampler=i.bindTexture(h);for(var l=0,f=0;lr&&(c=r);var d=a[f];d.uploadDynamic(e,l,c),t._bufferToUpdate===f&&(d.uploadStatic(e,l,c),t._bufferToUpdate=f+1),i.bindVao(d.vao),d.vao.draw(s.TRIANGLES,6*c)}}},e.prototype.generateBuffers=function(t){for(var e=this.renderer.gl,n=[],r=t._maxSize,i=t._batchSize,o=t._properties,a=0;a0?1:-1})},{}],177:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var i=t("object-assign"),o=r(i);Object.assign||(Object.assign=o.default)},{"object-assign":5}],178:[function(t,e,n){"use strict";t("./Object.assign"),t("./requestAnimationFrame"),t("./Math.sign"),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array)},{"./Math.sign":176,"./Object.assign":177,"./requestAnimationFrame":179}],179:[function(t,e,n){(function(t){"use strict";var e=16;if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!t.performance||!t.performance.now){var n=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-n}}for(var r=Date.now(),i=["ms","moz","webkit","o"],o=0;o=0;r--)this.add(t.children[r]);return this},t.prototype.destroy=function(){this.ticking&&g.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}();n.default=x},{"../core":64,"./limiters/CountLimiter":183}],181:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t,e){if(e instanceof l.BaseTexture){var n=e.source,r=0===n.width?t.canvas.width:Math.min(t.canvas.width,n.width),i=0===n.height?t.canvas.height:Math.min(t.canvas.height,n.height);return t.ctx.drawImage(n,0,0,r,i,0,0,t.canvas.width,t.canvas.height),!0}return!1}n.__esModule=!0;var h=t("../../core"),l=i(h),f=t("../BasePrepare"),c=r(f),d=16,p=function(t){function e(n){o(this,e);var r=a(this,t.call(this,n));return r.uploadHookHelper=r,r.canvas=document.createElement("canvas"),r.canvas.width=d,r.canvas.height=d,r.ctx=r.canvas.getContext("2d"),r.registerUploadHook(u),r}return s(e,t),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.ctx=null,this.canvas=null},e}(c.default);n.default=p,l.CanvasRenderer.registerPlugin("prepare",p)},{"../../core":64,"../BasePrepare":180}],182:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}n.__esModule=!0;var i=t("./webgl/WebGLPrepare");Object.defineProperty(n,"webgl",{enumerable:!0,get:function(){return r(i).default}});var o=t("./canvas/CanvasPrepare");Object.defineProperty(n,"canvas",{enumerable:!0,get:function(){return r(o).default}});var a=t("./BasePrepare");Object.defineProperty(n,"BasePrepare",{enumerable:!0,get:function(){return r(a).default}});var s=t("./limiters/CountLimiter");Object.defineProperty(n,"CountLimiter",{enumerable:!0,get:function(){return r(s).default}});var u=t("./limiters/TimeLimiter");Object.defineProperty(n,"TimeLimiter",{enumerable:!0,get:function(){return r(u).default}})},{"./BasePrepare":180,"./canvas/CanvasPrepare":181,"./limiters/CountLimiter":183,"./limiters/TimeLimiter":184,"./webgl/WebGLPrepare":185}],183:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function(){function t(e){r(this,t),this.maxItemsPerFrame=e,this.itemsLeft=0}return t.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},t.prototype.allowedToUpload=function(){return this.itemsLeft-- >0},t}();n.default=i},{}],184:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.__esModule=!0;var i=function(){function t(e){r(this,t),this.maxMilliseconds=e,this.frameStart=0}return t.prototype.beginFrame=function(){this.frameStart=Date.now()},t.prototype.allowedToUpload=function(){return Date.now()-this.frameStart0&&(e%=this.duration));for(var u=this.timelines,h=0,l=u.length;h>>1;;){if(t[(o+1)*n]<=e?r=o+1:i=o,r==i)return(r+1)*n;o=r+i>>>1}},t.linearSearch=function(t,e,n){for(var r=0,i=t.length-n;r<=i;r+=n)if(t[r]>e)return r;return-1},t}();t.Animation=e,function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix"}(t.TimelineType||(t.TimelineType={}));var r=t.TimelineType,i=function(){function e(n){if(n<=0)throw new Error("frameCount must be > 0: "+n);this.curves=t.Utils.newFloatArray((n-1)*e.BEZIER_SIZE)}return e.prototype.getFrameCount=function(){return this.curves.length/e.BEZIER_SIZE+1},e.prototype.setLinear=function(t){this.curves[t*e.BEZIER_SIZE]=e.LINEAR},e.prototype.setStepped=function(t){this.curves[t*e.BEZIER_SIZE]=e.STEPPED},e.prototype.getCurveType=function(t){var n=t*e.BEZIER_SIZE;if(n==this.curves.length)return e.LINEAR;var r=this.curves[n];return r==e.LINEAR?e.LINEAR:r==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,n,r,i,o){var a=.03*(2*-n+i),s=.03*(2*-r+o),u=.006*(3*(n-i)+1),h=.006*(3*(r-o)+1),l=2*a+u,f=2*s+h,c=.3*n+a+.16666667*u,d=.3*r+s+.16666667*h,p=t*e.BEZIER_SIZE,y=this.curves;y[p++]=e.BEZIER;for(var v=c,g=d,x=p+e.BEZIER_SIZE-1;p=r){var l=void 0,f=void 0;return o==u?(l=0,f=0):(l=i[o-2],f=i[o-1]),f+(i[o+1]-f)*(r-l)/(s-l)}var c=i[o-1];return c+(1-c)*(r-s)/(1-s)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e}();t.CurveTimeline=i;var o=function(i){function o(e){i.call(this,e),this.frames=t.Utils.newFloatArray(e<<1)}return n(o,i),o.prototype.getPropertyId=function(){return(r.rotate<<24)+this.boneIndex},o.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+o.ROTATION]=n},o.prototype.apply=function(t,n,r,i,a,s,u){var h=this.frames,l=t.bones[this.boneIndex];if(r=h[h.length-o.ENTRIES])if(s)l.rotation=l.data.rotation+h[h.length+o.PREV_ROTATION]*a;else{var f=l.data.rotation+h[h.length+o.PREV_ROTATION]-l.rotation;f-=360*(16384-(16384.499999999996-f/360|0)),l.rotation+=f*a}else{var c=e.binarySearch(h,r,o.ENTRIES),d=h[c+o.PREV_ROTATION],p=h[c],y=this.getCurvePercent((c>>1)-1,1-(r-p)/(h[c+o.PREV_TIME]-p)),v=h[c+o.ROTATION]-d;v-=360*(16384-(16384.499999999996-v/360|0)),v=d+v*y,s?(v-=360*(16384-(16384.499999999996-v/360|0)),l.rotation=l.data.rotation+v*a):(v=l.data.rotation+v-l.rotation,v-=360*(16384-(16384.499999999996-v/360|0)),l.rotation+=v*a)}},o.ENTRIES=2,o.PREV_TIME=-2,o.PREV_ROTATION=-1,o.ROTATION=1,o}(i);t.RotateTimeline=o;var a=function(i){function o(e){i.call(this,e),this.frames=t.Utils.newFloatArray(e*o.ENTRIES)}return n(o,i),o.prototype.getPropertyId=function(){return(r.translate<<24)+this.boneIndex},o.prototype.setFrame=function(t,e,n,r){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.X]=n,this.frames[t+o.Y]=r},o.prototype.apply=function(t,n,r,i,a,s,u){var h=this.frames,l=t.bones[this.boneIndex];if(r=h[h.length-o.ENTRIES])f=h[h.length+o.PREV_X],c=h[h.length+o.PREV_Y];else{var d=e.binarySearch(h,r,o.ENTRIES);f=h[d+o.PREV_X],c=h[d+o.PREV_Y];var p=h[d],y=this.getCurvePercent(d/o.ENTRIES-1,1-(r-p)/(h[d+o.PREV_TIME]-p));f+=(h[d+o.X]-f)*y,c+=(h[d+o.Y]-c)*y}s?(l.x=l.data.x+f*a,l.y=l.data.y+c*a):(l.x+=(l.data.x+f-l.x)*a,l.y+=(l.data.y+c-l.y)*a)},o.ENTRIES=3,o.PREV_TIME=-3,o.PREV_X=-2,o.PREV_Y=-1,o.X=1,o.Y=2,o}(i);t.TranslateTimeline=a;var s=function(i){function o(t){i.call(this,t)}return n(o,i),o.prototype.getPropertyId=function(){return(r.scale<<24)+this.boneIndex},o.prototype.apply=function(n,r,i,a,s,u,h){var l=this.frames,f=n.bones[this.boneIndex];if(i=l[l.length-o.ENTRIES])c=l[l.length+o.PREV_X]*f.data.scaleX,d=l[l.length+o.PREV_Y]*f.data.scaleY;else{var p=e.binarySearch(l,i,o.ENTRIES);c=l[p+o.PREV_X],d=l[p+o.PREV_Y];var y=l[p],v=this.getCurvePercent(p/o.ENTRIES-1,1-(i-y)/(l[p+o.PREV_TIME]-y));c=(c+(l[p+o.X]-c)*v)*f.data.scaleX,d=(d+(l[p+o.Y]-d)*v)*f.data.scaleY}if(1==s)f.scaleX=c,f.scaleY=d;else{var g=0,x=0;u?(g=f.data.scaleX,x=f.data.scaleY):(g=f.scaleX,x=f.scaleY),h?(c=Math.abs(c)*t.MathUtils.signum(g),d=Math.abs(d)*t.MathUtils.signum(x)):(g=Math.abs(g)*t.MathUtils.signum(c),x=Math.abs(x)*t.MathUtils.signum(d)),f.scaleX=g+(c-g)*s,f.scaleY=x+(d-x)*s}},o}(a);t.ScaleTimeline=s;var u=function(t){function i(e){t.call(this,e)}return n(i,t),i.prototype.getPropertyId=function(){return(r.shear<<24)+this.boneIndex},i.prototype.apply=function(t,n,r,o,a,s,u){var h=this.frames,l=t.bones[this.boneIndex];if(r=h[h.length-i.ENTRIES])f=h[h.length+i.PREV_X],c=h[h.length+i.PREV_Y];else{var d=e.binarySearch(h,r,i.ENTRIES);f=h[d+i.PREV_X],c=h[d+i.PREV_Y];var p=h[d],y=this.getCurvePercent(d/i.ENTRIES-1,1-(r-p)/(h[d+i.PREV_TIME]-p));f+=(h[d+i.X]-f)*y,c+=(h[d+i.Y]-c)*y}s?(l.shearX=l.data.shearX+f*a,l.shearY=l.data.shearY+c*a):(l.shearX+=(l.data.shearX+f-l.shearX)*a,l.shearY+=(l.data.shearY+c-l.shearY)*a)},i}(a);t.ShearTimeline=u;var h=function(i){function o(e){i.call(this,e),this.frames=t.Utils.newFloatArray(e*o.ENTRIES)}return n(o,i),o.prototype.getPropertyId=function(){return(r.color<<24)+this.slotIndex},o.prototype.setFrame=function(t,e,n,r,i,a){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.R]=n,this.frames[t+o.G]=r,this.frames[t+o.B]=i,this.frames[t+o.A]=a},o.prototype.apply=function(t,n,r,i,a,s,u){var h=t.slots[this.slotIndex],l=this.frames;if(r=l[l.length-o.ENTRIES]){var y=l.length;f=l[y+o.PREV_R],c=l[y+o.PREV_G],d=l[y+o.PREV_B],p=l[y+o.PREV_A]}else{var v=e.binarySearch(l,r,o.ENTRIES);f=l[v+o.PREV_R],c=l[v+o.PREV_G],d=l[v+o.PREV_B],p=l[v+o.PREV_A];var g=l[v],x=this.getCurvePercent(v/o.ENTRIES-1,1-(r-g)/(l[v+o.PREV_TIME]-g));f+=(l[v+o.R]-f)*x,c+=(l[v+o.G]-c)*x,d+=(l[v+o.B]-d)*x,p+=(l[v+o.A]-p)*x}if(1==a)h.color.set(f,c,d,p);else{var m=h.color;s&&m.setFromColor(h.data.color),m.add((f-m.r)*a,(c-m.g)*a,(d-m.b)*a,(p-m.a)*a)}},o.ENTRIES=5,o.PREV_TIME=-5,o.PREV_R=-4,o.PREV_G=-3,o.PREV_B=-2,o.PREV_A=-1,o.R=1,o.G=2,o.B=3,o.A=4,o}(i);t.ColorTimeline=h;var l=function(){function n(e){this.frames=t.Utils.newFloatArray(e),this.attachmentNames=new Array(e)}return n.prototype.getPropertyId=function(){return(r.attachment<<24)+this.slotIndex},n.prototype.getFrameCount=function(){return this.frames.length},n.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},n.prototype.apply=function(t,n,r,i,o,a,s){var u=t.slots[this.slotIndex];if(s&&a){var h=u.data.attachmentName;return void u.setAttachment(null==h?null:t.getAttachment(this.slotIndex,h))}var l=this.frames;if(r=l[l.length-1]?l.length-1:e.binarySearch(l,r,1)-1;var d=this.attachmentNames[c];t.slots[this.slotIndex].setAttachment(null==d?null:t.getAttachment(this.slotIndex,d))}},n}();t.AttachmentTimeline=l;var f=function(i){function o(e){i.call(this,e),this.frames=t.Utils.newFloatArray(e),this.frameVertices=new Array(e)}return n(o,i),o.prototype.getPropertyId=function(){return(r.deform<<24)+this.slotIndex},o.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},o.prototype.apply=function(n,r,i,o,a,s,u){var h=n.slots[this.slotIndex],l=h.getAttachment();if(l instanceof t.VertexAttachment&&l.applyDeform(this.attachment)){var f=this.frames,c=h.attachmentVertices;if(i=f[f.length-1]){var v=d[f.length-1];if(1==a)t.Utils.arrayCopy(v,0,y,0,p);else if(s){var g=l;if(null==g.bones)for(var x=g.vertices,m=0;mr)this.apply(t,n,Number.MAX_VALUE,i,o,a,s),n=-1;else if(n>=u[h-1])return;if(!(r0&&u[l-1]==f;)l--}for(;l=u[l];l++)i.push(this.events[l])}}},n}();t.EventTimeline=c;var d=function(){function n(e){this.frames=t.Utils.newFloatArray(e),this.drawOrders=new Array(e)}return n.prototype.getPropertyId=function(){return r.drawOrder<<24},n.prototype.getFrameCount=function(){return this.frames.length},n.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},n.prototype.apply=function(n,r,i,o,a,s,u){var h=n.drawOrder,l=n.slots;if(u&&s)return void t.Utils.arrayCopy(n.slots,0,n.drawOrder,0,n.slots.length);var f=this.frames;if(i=f[f.length-1]?f.length-1:e.binarySearch(f,i)-1;var d=this.drawOrders[c];if(null==d)t.Utils.arrayCopy(l,0,h,0,l.length);else for(var p=0,y=d.length;p=h[h.length-o.ENTRIES])return void(s?(l.mix=l.data.mix+(h[h.length+o.PREV_MIX]-l.data.mix)*a,l.bendDirection=u?l.data.bendDirection:h[h.length+o.PREV_BEND_DIRECTION]):(l.mix+=(h[h.length+o.PREV_MIX]-l.mix)*a,u||(l.bendDirection=h[h.length+o.PREV_BEND_DIRECTION])));var f=e.binarySearch(h,r,o.ENTRIES),c=h[f+o.PREV_MIX],d=h[f],p=this.getCurvePercent(f/o.ENTRIES-1,1-(r-d)/(h[f+o.PREV_TIME]-d));s?(l.mix=l.data.mix+(c+(h[f+o.MIX]-c)*p-l.data.mix)*a,l.bendDirection=u?l.data.bendDirection:h[f+o.PREV_BEND_DIRECTION]):(l.mix+=(c+(h[f+o.MIX]-c)*p-l.mix)*a,u||(l.bendDirection=h[f+o.PREV_BEND_DIRECTION]))},o.ENTRIES=3,o.PREV_TIME=-3,o.PREV_MIX=-2,o.PREV_BEND_DIRECTION=-1,o.MIX=1,o.BEND_DIRECTION=2,o}(i);t.IkConstraintTimeline=p;var y=function(i){function o(e){i.call(this,e),this.frames=t.Utils.newFloatArray(e*o.ENTRIES)}return n(o,i),o.prototype.getPropertyId=function(){return(r.transformConstraint<<24)+this.transformConstraintIndex},o.prototype.setFrame=function(t,e,n,r,i,a){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.ROTATE]=n,this.frames[t+o.TRANSLATE]=r,this.frames[t+o.SCALE]=i,this.frames[t+o.SHEAR]=a},o.prototype.apply=function(t,n,r,i,a,s,u){var h=this.frames,l=t.transformConstraints[this.transformConstraintIndex];if(r=h[h.length-o.ENTRIES]){var v=h.length;c=h[v+o.PREV_ROTATE],d=h[v+o.PREV_TRANSLATE],p=h[v+o.PREV_SCALE],y=h[v+o.PREV_SHEAR]}else{var g=e.binarySearch(h,r,o.ENTRIES);c=h[g+o.PREV_ROTATE],d=h[g+o.PREV_TRANSLATE],p=h[g+o.PREV_SCALE],y=h[g+o.PREV_SHEAR];var x=h[g],m=this.getCurvePercent(g/o.ENTRIES-1,1-(r-x)/(h[g+o.PREV_TIME]-x)); c+=(h[g+o.ROTATE]-c)*m,d+=(h[g+o.TRANSLATE]-d)*m,p+=(h[g+o.SCALE]-p)*m,y+=(h[g+o.SHEAR]-y)*m}if(s){var f=l.data;l.rotateMix=f.rotateMix+(c-f.rotateMix)*a,l.translateMix=f.translateMix+(d-f.translateMix)*a,l.scaleMix=f.scaleMix+(p-f.scaleMix)*a,l.shearMix=f.shearMix+(y-f.shearMix)*a}else l.rotateMix+=(c-l.rotateMix)*a,l.translateMix+=(d-l.translateMix)*a,l.scaleMix+=(p-l.scaleMix)*a,l.shearMix+=(y-l.shearMix)*a}},o.ENTRIES=5,o.PREV_TIME=-5,o.PREV_ROTATE=-4,o.PREV_TRANSLATE=-3,o.PREV_SCALE=-2,o.PREV_SHEAR=-1,o.ROTATE=1,o.TRANSLATE=2,o.SCALE=3,o.SHEAR=4,o}(i);t.TransformConstraintTimeline=y;var v=function(i){function o(e){i.call(this,e),this.frames=t.Utils.newFloatArray(e*o.ENTRIES)}return n(o,i),o.prototype.getPropertyId=function(){return(r.pathConstraintPosition<<24)+this.pathConstraintIndex},o.prototype.setFrame=function(t,e,n){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.VALUE]=n},o.prototype.apply=function(t,n,r,i,a,s,u){var h=this.frames,l=t.pathConstraints[this.pathConstraintIndex];if(r=h[h.length-o.ENTRIES])f=h[h.length+o.PREV_VALUE];else{var c=e.binarySearch(h,r,o.ENTRIES);f=h[c+o.PREV_VALUE];var d=h[c],p=this.getCurvePercent(c/o.ENTRIES-1,1-(r-d)/(h[c+o.PREV_TIME]-d));f+=(h[c+o.VALUE]-f)*p}s?l.position=l.data.position+(f-l.data.position)*a:l.position+=(f-l.position)*a},o.ENTRIES=2,o.PREV_TIME=-2,o.PREV_VALUE=-1,o.VALUE=1,o}(i);t.PathConstraintPositionTimeline=v;var g=function(t){function i(e){t.call(this,e)}return n(i,t),i.prototype.getPropertyId=function(){return(r.pathConstraintSpacing<<24)+this.pathConstraintIndex},i.prototype.apply=function(t,n,r,o,a,s,u){var h=this.frames,l=t.pathConstraints[this.pathConstraintIndex];if(r=h[h.length-i.ENTRIES])f=h[h.length+i.PREV_VALUE];else{var c=e.binarySearch(h,r,i.ENTRIES);f=h[c+i.PREV_VALUE];var d=h[c],p=this.getCurvePercent(c/i.ENTRIES-1,1-(r-d)/(h[c+i.PREV_TIME]-d));f+=(h[c+i.VALUE]-f)*p}s?l.spacing=l.data.spacing+(f-l.data.spacing)*a:l.spacing+=(f-l.spacing)*a},i}(v);t.PathConstraintSpacingTimeline=g;var x=function(i){function o(e){i.call(this,e),this.frames=t.Utils.newFloatArray(e*o.ENTRIES)}return n(o,i),o.prototype.getPropertyId=function(){return(r.pathConstraintMix<<24)+this.pathConstraintIndex},o.prototype.setFrame=function(t,e,n,r){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.ROTATE]=n,this.frames[t+o.TRANSLATE]=r},o.prototype.apply=function(t,n,r,i,a,s,u){var h=this.frames,l=t.pathConstraints[this.pathConstraintIndex];if(r=h[h.length-o.ENTRIES])f=h[h.length+o.PREV_ROTATE],c=h[h.length+o.PREV_TRANSLATE];else{var d=e.binarySearch(h,r,o.ENTRIES);f=h[d+o.PREV_ROTATE],c=h[d+o.PREV_TRANSLATE];var p=h[d],y=this.getCurvePercent(d/o.ENTRIES-1,1-(r-p)/(h[d+o.PREV_TIME]-p));f+=(h[d+o.ROTATE]-f)*y,c+=(h[d+o.TRANSLATE]-c)*y}s?(l.rotateMix=l.data.rotateMix+(f-l.data.rotateMix)*a,l.translateMix=l.data.translateMix+(c-l.data.translateMix)*a):(l.rotateMix+=(f-l.rotateMix)*a,l.translateMix+=(c-l.translateMix)*a)},o.ENTRIES=3,o.PREV_TIME=-3,o.PREV_ROTATE=-2,o.PREV_TRANSLATE=-1,o.ROTATE=1,o.TRANSLATE=2,o}(i);t.PathConstraintMixTimeline=x}(e=t.core||(t.core={}))}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(t){var e;!function(t){var e=function(){function e(e){this.tracks=new Array,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new t.IntSet,this.animationsChanged=!1,this.timeScale=1,this.trackEntryPool=new t.Pool(function(){return new n}),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,r=e.length;n0){if(i.delay-=o,i.delay>0)continue;o=-i.delay,i.delay=0}var a=i.next;if(null!=a){var s=i.trackLast-a.delay;if(s>=0){for(a.delay=0,a.trackTime=s+t*a.timeScale,i.trackTime+=o,this.setCurrent(n,a);null!=a.mixingFrom;)a.mixTime+=o,a=a.mixingFrom;continue}this.updateMixingFrom(i,t,!0)}else if(this.updateMixingFrom(i,t,!0),i.trackLast>=i.trackEnd&&null==i.mixingFrom){e[n]=null,this.queue.end(i),this.disposeNext(i);continue}i.trackTime+=o}}this.queue.drain()},e.prototype.updateMixingFrom=function(t,e,n){var r=t.mixingFrom;if(null!=r){if(n&&t.mixTime>=t.mixDuration&&t.mixTime>0){this.queue.end(r);var i=r.mixingFrom;if(t.mixingFrom=i,null==i)return;t.mixTime=r.mixTime,t.mixDuration=r.mixDuration,r=i}r.animationLast=r.nextAnimationLast,r.trackLast=r.nextTrackLast;var o=e*r.timeScale;r.trackTime+=o,t.mixTime+=o,this.updateMixingFrom(r,e,n&&1==r.alpha)}},e.prototype.apply=function(e){if(null==e)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var n=this.events,r=this.tracks,i=0,o=r.length;i0)){var s=a.alpha;null!=a.mixingFrom&&(s*=this.applyMixingFrom(a,e));var u=a.animationLast,h=a.getAnimationTime(),l=a.animation.timelines.length,f=a.animation.timelines;if(1==s)for(var c=0;c1&&(i=1));var o=i=l[l.length-t.RotateTimeline.ENTRIES])c=f.data.rotation+l[l.length+t.RotateTimeline.PREV_ROTATION];else{var d=t.Animation.binarySearch(l,r,t.RotateTimeline.ENTRIES),p=l[d+t.RotateTimeline.PREV_ROTATION],y=l[d],v=h.getCurvePercent((d>>1)-1,1-(r-y)/(l[d+t.RotateTimeline.PREV_TIME]-y));c=l[d+t.RotateTimeline.ROTATION]-p,c-=360*(16384-(16384.499999999996-c/360|0)),c=p+c*v+f.data.rotation,c-=360*(16384-(16384.499999999996-c/360|0))}var g=o?f.data.rotation:f.rotation,x=0,m=c-g;if(0==m)u?(a[s]=0,x=0):x=a[s];else{m-=360*(16384-(16384.499999999996-m/360|0));var b=0,w=0;u?(b=0,w=m):(b=a[s],w=a[s+1]);var A=m>0,T=b>=0;t.MathUtils.signum(w)!=t.MathUtils.signum(m)&&Math.abs(w)<=90&&(Math.abs(b)>180&&(b+=360*t.MathUtils.signum(b)),T=A),x=m+b-b%360,T!=A&&(x+=360*t.MathUtils.signum(b)),a[s]=x}a[s+1]=m,g+=x*i,f.rotation=g-360*(16384-(16384.499999999996-g/360|0))},e.prototype.queueEvents=function(t,e){for(var n=t.animationStart,r=t.animationEnd,i=r-n,o=t.trackLast%i,a=this.events,s=0,u=a.length;sr||this.queue.event(t,h)}for((t.loop?o>t.trackTime%i:e>=r&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var r=n.mixingFrom;if(null==r)break;this.queue.end(r),n.mixingFrom=null,n=r}this.tracks[e.trackIndex]=null,this.queue.drain()}}},e.prototype.setCurrent=function(t,e){var n=this.expandToIndex(t);this.tracks[t]=e,null!=n&&(this.queue.interrupt(n),e.mixingFrom=n,e.mixTime=0,null!=n.mixingFrom&&(e.mixAlpha*=Math.min(n.mixTime/n.mixDuration,1))),this.queue.start(e)},e.prototype.setAnimation=function(t,e,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,r,n)},e.prototype.setAnimationWith=function(t,e,n){if(null==e)throw new Error("animation cannot be null.");var r=this.expandToIndex(t);null!=r&&(r.nextTrackLast==-1?(this.tracks[t]=null,this.queue.interrupt(r),this.queue.end(r),this.disposeNext(r),r=null):this.disposeNext(r));var i=this.trackEntry(t,e,n,r);return this.setCurrent(t,i),this.queue.drain(),i},e.prototype.addAnimation=function(t,e,n,r){var i=this.data.skeletonData.findAnimation(e);if(null==i)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,i,n,r)},e.prototype.addAnimationWith=function(t,e,n,r){if(null==e)throw new Error("animation cannot be null.");var i=this.expandToIndex(t);if(null!=i)for(;null!=i.next;)i=i.next;var o=this.trackEntry(t,e,n,i);if(null==i)this.setCurrent(t,o),this.queue.drain();else if(i.next=o,r<=0){var a=i.animationEnd-i.animationStart;0!=a?r+=a*(1+(i.trackTime/a|0))-this.data.getMix(i.animation,e):r=0}return o.delay=r,o},e.prototype.setEmptyAnimation=function(t,n){var r=this.setAnimationWith(t,e.emptyAnimation,!1);return r.mixDuration=n,r.trackEnd=n,r},e.prototype.addEmptyAnimation=function(t,n,r){r<=0&&(r-=n);var i=this.addAnimationWith(t,e.emptyAnimation,!1,r);return i.mixDuration=n,i.trackEnd=n,i},e.prototype.setEmptyAnimations=function(t){this.queue.drainDisabled=!0;for(var e=0,n=this.tracks.length;e=this.tracks.length?null:this.tracks[t]},e.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},e.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)},e.prototype.clearListeners=function(){this.listeners.length=0},e.prototype.clearListenerNotifications=function(){this.queue.clear()},e.prototype.setAnimationByName=function(t,n,r){e.deprecatedWarning1||(e.deprecatedWarning1=!0,console.warn("Deprecation Warning: AnimationState.setAnimationByName is deprecated, please use setAnimation from now on.")),this.setAnimation(t,n,r)},e.prototype.addAnimationByName=function(t,n,r,i){e.deprecatedWarning2||(e.deprecatedWarning2=!0,console.warn("Deprecation Warning: AnimationState.addAnimationByName is deprecated, please use addAnimation from now on.")),this.addAnimation(t,n,r,i)},e.prototype.hasAnimationByName=function(t){e.deprecatedWarning3||(e.deprecatedWarning3=!0,console.warn("Deprecation Warning: AnimationState.hasAnimationByName is deprecated, please use hasAnimation from now on."));var n=this.data.skeletonData.findAnimation(t);return null!==n},e.emptyAnimation=new t.Animation("",[],0),e.deprecatedWarning1=!1,e.deprecatedWarning2=!1,e.deprecatedWarning3=!1,e}();t.AnimationState=e;var n=function(){function t(){this.timelinesFirst=new Array,this.timelinesRotation=new Array}return t.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.animation=null,this.listener=null,this.timelinesFirst.length=0,this.timelinesRotation.length=0},t.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},t.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},t.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},t.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},Object.defineProperty(t.prototype,"time",{get:function(){return t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime},set:function(e){t.deprecatedWarning1||(t.deprecatedWarning1=!0,console.warn("Deprecation Warning: TrackEntry.time is deprecated, please use trackTime from now on.")),this.trackTime=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"endTime",{get:function(){return t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime},set:function(e){t.deprecatedWarning2||(t.deprecatedWarning2=!0,console.warn("Deprecation Warning: TrackEntry.endTime is deprecated, please use trackEnd from now on.")),this.trackTime=e},enumerable:!0,configurable:!0}),t.prototype.loopsCount=function(){return Math.floor(this.trackTime/this.trackEnd)},t.deprecatedWarning1=!1,t.deprecatedWarning2=!1,t}();t.TrackEntry=n;var r=function(){function e(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return e.prototype.start=function(t){this.objects.push(i.start),this.objects.push(t),this.animState.animationsChanged=!0},e.prototype.interrupt=function(t){this.objects.push(i.interrupt),this.objects.push(t)},e.prototype.end=function(t){this.objects.push(i.end),this.objects.push(t),this.animState.animationsChanged=!0},e.prototype.dispose=function(t){this.objects.push(i.dispose),this.objects.push(t)},e.prototype.complete=function(t){this.objects.push(i.complete),this.objects.push(t)},e.prototype.event=function(t,e){this.objects.push(i.event),this.objects.push(t),this.objects.push(e)},e.prototype.deprecateStuff=function(){return e.deprecatedWarning1||(e.deprecatedWarning1=!0,console.warn("Deprecation Warning: onComplete, onStart, onEnd, onEvent art deprecated, please use listeners from now on. 'state.addListener({ complete: function(track, event) { } })'")),!0},e.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var e=this.objects,n=this.animState.listeners,r=0;r0&&(s=a);for(var x=t.bone,m=x.matrix,O=m.tx,S=m.ty,M=m.a,y=m.c,P=m.b,C=m.d,R=e,p=i;p1e-4?(w=Math.abs(g*b-x*m)/w,x=m*w,b=g*w,A=Math.atan2(m,g)*e.MathUtils.radDeg):(g=0,m=0,A=90-Math.atan2(b,x)*e.MathUtils.radDeg);var T=i+s-A,E=i+u-A+90,c=e.MathUtils.cosDeg(T)*o,d=e.MathUtils.cosDeg(E)*a,p=e.MathUtils.sinDeg(T)*o,y=e.MathUtils.sinDeg(E)*a;l.a=g*c-x*p,l.c=g*d-x*y,l.b=m*c+b*p,l.d=m*d+b*y;break;case e.TransformMode.NoScale:case e.TransformMode.NoScaleOrReflection:var O=e.MathUtils.cosDeg(i),S=e.MathUtils.sinDeg(i),M=g*O+x*S,P=m*O+b*S,w=Math.sqrt(M*M+P*P);w>1e-5&&(w=1/w),M*=w,P*=w,w=Math.sqrt(M*M+P*P);var C=Math.PI/2+Math.atan2(P,M),R=Math.cos(C)*w,I=Math.sin(C)*w,c=e.MathUtils.cosDeg(s)*o,d=e.MathUtils.cosDeg(90+u)*a,p=e.MathUtils.sinDeg(s)*o,y=e.MathUtils.sinDeg(90+u)*a;return l.a=M*c+R*p,l.c=M*d+R*y,l.b=P*c+I*p,l.d=P*d+I*y,void((this.data.transformMode!=e.TransformMode.NoScaleOrReflection?g*b-x*m<0:this.skeleton.flipX!=this.skeleton.flipY!=n.yDown)&&(l.c=-l.c,l.d=-l.d))}this.skeleton.flipX&&(l.a=-l.a,l.c=-l.c),this.skeleton.flipY!=n.yDown&&(l.b=-l.b,l.d=-l.d)},n.prototype.setToSetupPose=function(){var 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},n.prototype.getWorldRotationX=function(){return Math.atan2(this.matrix.b,this.matrix.a)*e.MathUtils.radDeg},n.prototype.getWorldRotationY=function(){return Math.atan2(this.matrix.d,this.matrix.c)*e.MathUtils.radDeg},n.prototype.getWorldScaleX=function(){var t=this.matrix;return Math.sqrt(t.a*t.a+t.c*t.c)},n.prototype.getWorldScaleY=function(){var t=this.matrix;return Math.sqrt(t.b*t.b+t.d*t.d)},n.prototype.worldToLocalRotationX=function(){var t=this.parent;if(null==t)return this.arotation;var n=t.matrix,r=this.matrix;return Math.atan2(n.a*r.b-n.b*r.a,n.d*r.a-n.c*r.b)*e.MathUtils.radDeg},n.prototype.worldToLocalRotationY=function(){var t=this.parent;if(null==t)return this.arotation;var n=t.matrix,r=this.matrix;return Math.atan2(n.a*r.d-n.b*r.c,n.d*r.c-n.c*r.d)*e.MathUtils.radDeg},n.prototype.rotateWorld=function(t){var n=this.matrix,r=this.matrix.a,i=n.c,o=n.b,a=n.d,s=e.MathUtils.cosDeg(t),u=e.MathUtils.sinDeg(t);n.a=s*r-u*o,n.c=s*i-u*a,n.b=u*r+s*o,n.d=u*i+s*a,this.appliedValid=!1},n.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var t=this.parent,n=this.matrix;if(null==t)return this.ax=n.tx,this.ay=n.ty,this.arotation=Math.atan2(n.b,n.a)*e.MathUtils.radDeg,this.ascaleX=Math.sqrt(n.a*n.a+n.b*n.b),this.ascaleY=Math.sqrt(n.c*n.c+n.d*n.d),this.ashearX=0,void(this.ashearY=Math.atan2(n.a*n.c+n.b*n.d,n.a*n.d-n.b*n.c)*e.MathUtils.radDeg);var r=t.matrix,i=1/(r.a*r.d-r.b*r.c),o=n.tx-r.tx,a=n.ty-r.ty;this.ax=o*r.d*i-a*r.c*i,this.ay=a*r.a*i-o*r.b*i;var s=i*r.d,u=i*r.a,h=i*r.c,l=i*r.b,f=s*n.a-h*n.b,c=s*n.c-h*n.d,d=u*n.b-l*n.a,p=u*n.d-l*n.c;if(this.ashearX=0,this.ascaleX=Math.sqrt(f*f+d*d),this.ascaleX>1e-4){var y=f*p-c*d;this.ascaleY=y/this.ascaleX,this.ashearY=Math.atan2(f*c+d*p,y)*e.MathUtils.radDeg,this.arotation=Math.atan2(d,f)*e.MathUtils.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(c*c+p*p),this.ashearY=0,this.arotation=90-Math.atan2(p,c)*e.MathUtils.radDeg},n.prototype.worldToLocal=function(t){var e=this.matrix,n=e.a,r=e.c,i=e.b,o=e.d,a=1/(n*o-r*i),s=t.x-e.tx,u=t.y-e.ty;return t.x=s*o*a-u*r*a,t.y=u*n*a-s*i*a,t},n.prototype.localToWorld=function(t){var e=this.matrix,n=t.x,r=t.y;return t.x=n*e.a+r*e.c+e.tx,t.y=n*e.b+r*e.d+e.ty,t},n.yDown=!1,n}();e.Bone=n}(n=e.core||(e.core={}))}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(t){var e;!function(t){var e=function(){function t(t,e,r){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=n.Normal,t<0)throw new Error("index must be >= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=r}return t}();t.BoneData=e,function(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.TransformMode||(t.TransformMode={}));var n=t.TransformMode}(e=t.core||(t.core={}))}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(t){var e;!function(t){var e=function(){function t(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e}return t}();t.Event=e}(e=t.core||(t.core={}))}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(t){var e;!function(t){var e=function(){function t(t){this.name=t}return t}();t.EventData=e}(e=t.core||(t.core={}))}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(t){var e;!function(t){var e=function(){function e(t,e){if(this.mix=1,this.bendDirection=0,this.level=0,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.bendDirection=t.bendDirection,this.bones=new Array;for(var n=0;n180?f-=360:f<-180&&(f+=360),e.updateWorldTransformWith(e.ax,e.ay,e.arotation+f*i,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,n,r,i,o,a){if(0==a)return void n.updateWorldTransform();e.appliedValid||e.updateAppliedTransform(),n.appliedValid||n.updateAppliedTransform();var s=e.ax,u=e.ay,h=e.ascaleX,l=e.ascaleY,f=n.ascaleX,c=0,d=0,p=0;h<0?(h=-h,c=180,p=-1):(c=0,p=1),l<0&&(l=-l,p=-p),f<0?(f=-f,d=180):d=0;var y=e.matrix,v=n.ax,g=0,x=0,m=0,b=y.a,w=y.c,A=y.b,T=y.d,E=Math.abs(h-l)<=1e-4;E?(g=n.ay,x=b*v+w*g+y.tx,m=A*v+T*g+y.ty):(g=0,x=b*v+y.tx,m=A*v+y.ty);var O=(e.parent,e.parent.matrix);b=O.a,w=O.c,A=O.b,T=O.d;var S=1/(b*T-w*A),M=r-O.tx,P=i-O.ty,C=(M*T-P*w)*S-s,R=(P*b-M*A)*S-u;M=x-O.tx,P=m-O.ty;var I=(M*T-P*w)*S-s,k=(P*b-M*A)*S-u,_=Math.sqrt(I*I+k*k),L=n.data.length*f,j=0,D=0;t:if(E){L*=h;var N=(C*C+R*R-_*_-L*L)/(2*_*L);N<-1?N=-1:N>1&&(N=1),D=Math.acos(N)*o,b=_+L*N,w=L*Math.sin(D),j=Math.atan2(R*b-C*w,C*b+R*w)}else{b=h*L,w=l*L;var F=b*b,U=w*w,B=C*C+R*R,V=Math.atan2(R,C);A=U*_*_+F*B-F*U;var X=-2*U*_,W=U-F;if(T=X*X-4*W*A,T>=0){var q=Math.sqrt(T);X<0&&(q=-q),q=-(X+q)/2;var G=q/W,H=A/q,Y=Math.abs(G)$&&(J=0,$=T,tt=M),M=_-b,T=M*M,T$&&(J=nt,$=T,tt=M,et=P),B<=(Q+$)/2?(j=V-Math.atan2(Z*o,K),D=z*o):(j=V-Math.atan2(et*o,tt),D=J*o)}var rt=Math.atan2(g,v)*p,it=e.arotation;j=(j-rt)*t.MathUtils.radDeg+c-it,j>180?j-=360:j<-180&&(j+=360),e.updateWorldTransformWith(s,u,it+j*a,e.ascaleX,e.ascaleY,0,0),it=n.arotation,D=((D+rt)*t.MathUtils.radDeg-n.ashearX)*p+d-it,D>180?D-=360:D<-180&&(D+=360),n.updateWorldTransformWith(v,g,it+D*a,n.ascaleX,n.ascaleY,n.ashearX,n.ashearY)},e}();t.IkConstraint=e}(e=t.core||(t.core={}))}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(t){var e;!function(t){var e=function(){function t(t){this.order=0,this.bones=new Array,this.bendDirection=1,this.mix=1,this.name=t}return t}();t.IkConstraintData=e}(e=t.core||(t.core={}))}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(t){var e;!function(t){var e=function(){function e(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=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,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var n=0,r=t.bones.length;n0,o=n>0;if(i||o){var a=this.data,s=a.spacingMode,u=s==t.SpacingMode.Length,h=a.rotateMode,l=h==t.RotateMode.Tangent,f=h==t.RotateMode.ChainScale,c=this.bones.length,d=l?c:c+1,p=this.bones,y=t.Utils.setArraySize(this.spaces,d),v=null,g=this.spacing;if(f||u){f&&(v=t.Utils.setArraySize(this.lengths,c));for(var x=0,m=d-1;x0?t.MathUtils.degRad:-t.MathUtils.degRad}for(var x=0,I=3;xt.MathUtils.PI?B-=t.MathUtils.PI2:B<-t.MathUtils.PI&&(B+=t.MathUtils.PI2),B*=n,V=Math.cos(B),X=Math.sin(B),w.a=V*D-X*F,w.c=V*N-X*U,w.b=X*D+V*F,w.d=X*N+V*U}b.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(n,r,i,o,a){var s=this.target,u=this.position,h=this.spaces,l=t.Utils.setArraySize(this.positions,3*r+2),f=null,c=n.closed,d=n.worldVerticesLength,p=d/6,y=e.NONE;if(!n.constantSpeed){var v=n.lengths;p-=c?1:2;var g=v[p];if(o&&(u*=g),a)for(var x=0;xg){y!=e.AFTER&&(y=e.AFTER,n.computeWorldVerticesWith(s,d-6,4,f,0)),this.addAfterPosition(A-g,f,0,l,m);continue}}for(;;b++){var T=v[b];if(!(A>T)){if(0==b)A/=T;else{var E=v[b-1];A=(A-E)/(T-E)}break}}b!=y&&(y=b,c&&b==p?(n.computeWorldVerticesWith(s,d-4,4,f,0),n.computeWorldVerticesWith(s,0,4,f,4)):n.computeWorldVerticesWith(s,6*b+2,8,f,0)),this.addCurvePosition(A,f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],l,m,i||x>0&&0==w)}return l}c?(d+=2,f=t.Utils.setArraySize(this.world,d),n.computeWorldVerticesWith(s,2,d-4,f,0),n.computeWorldVerticesWith(s,0,2,f,d-4),f[d-2]=f[0],f[d-1]=f[1]):(p--,d-=4,f=t.Utils.setArraySize(this.world,d),n.computeWorldVerticesWith(s,2,d,f,0));for(var O=t.Utils.setArraySize(this.curves,p),S=0,M=f[0],P=f[1],C=0,R=0,I=0,k=0,_=0,L=0,j=0,D=0,N=0,F=0,U=0,B=0,V=0,X=0,x=0,W=2;xS){this.addAfterPosition(A-S,f,d-4,l,m);continue}}for(;;b++){var Y=O[b];if(!(A>Y)){if(0==b)A/=Y;else{var E=O[b-1];A=(A-E)/(Y-E)}break}}if(b!=y){y=b;var z=6*b;for(M=f[z],P=f[z+1],C=f[z+2],R=f[z+3],I=f[z+4],k=f[z+5],_=f[z+6],L=f[z+7],j=.03*(M-2*C+I),D=.03*(P-2*R+k),N=.006*(3*(C-I)-M+_),F=.006*(3*(R-k)-P+L),U=2*j+N,B=2*D+F,V=.3*(C-M)+j+.16666667*N,X=.3*(R-P)+D+.16666667*F,G=Math.sqrt(V*V+X*X),q[0]=G,z=1;z<8;z++)V+=U,X+=B,U+=N,B+=F,G+=Math.sqrt(V*V+X*X),q[z]=G;V+=U,X+=B,G+=Math.sqrt(V*V+X*X),q[8]=G,V+=U+N,X+=B+F,G+=Math.sqrt(V*V+X*X),q[9]=G,H=0}for(A*=G;;H++){var Q=q[H];if(!(A>Q)){if(0==H)A/=Q;else{var E=q[H-1];A=H+(A-E)/(Q-E)}break}}this.addCurvePosition(.1*A,M,P,C,R,I,k,_,L,l,m,i||x>0&&0==w)}return l},e.prototype.addBeforePosition=function(t,e,n,r,i){var o=e[n],a=e[n+1],s=e[n+2]-o,u=e[n+3]-a,h=Math.atan2(u,s);r[i]=o+t*Math.cos(h),r[i+1]=a+t*Math.sin(h),r[i+2]=h},e.prototype.addAfterPosition=function(t,e,n,r,i){var o=e[n+2],a=e[n+3],s=o-e[n],u=a-e[n+1],h=Math.atan2(u,s);r[i]=o+t*Math.cos(h),r[i+1]=a+t*Math.sin(h),r[i+2]=h},e.prototype.addCurvePosition=function(t,e,n,r,i,o,a,s,u,h,l,f){(0==t||isNaN(t))&&(t=1e-4);var c=t*t,d=c*t,p=1-t,y=p*p,v=y*p,g=p*t,x=3*g,m=p*x,b=x*t,w=e*v+r*m+o*b+s*d,A=n*v+i*m+a*b+u*d;h[l]=w,h[l+1]=A,f&&(h[l+2]=Math.atan2(A-(n*y+i*g*2+a*c),w-(e*y+r*g*2+o*c)))},e.prototype.getOrder=function(){return this.data.order},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e}();t.PathConstraint=e}(e=t.core||(t.core={}))}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(t){var e;!function(t){var e=function(){function t(t){this.order=0,this.bones=new Array,this.name=t}return t}();t.PathConstraintData=e,function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"}(t.PositionMode||(t.PositionMode={}));t.PositionMode;!function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"}(t.SpacingMode||(t.SpacingMode={}));t.SpacingMode;!function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"}(t.RotateMode||(t.RotateMode={}));t.RotateMode}(e=t.core||(t.core={}))}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(t){var e;!function(t){var e=function(){function e(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.flipX=!1,this.flipY=!1,this.x=0,this.y=0,null==e)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var n=0;n1){var i=n[n.length-1];this._updateCache.indexOf(i)>-1||this.updateCacheReset.push(i)}this._updateCache.push(t),this.sortReset(r.children),n[n.length-1].sorted=!0},e.prototype.sortPathConstraint=function(e){var n=e.target,r=n.data.index,i=n.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,r,i),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,r,i);for(var o=0,a=this.data.skins.length;o=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},e.prototype.aabbIntersectsSegment=function(t,e,n,r){var i=this.minX,o=this.minY,a=this.maxX,s=this.maxY;if(t<=i&&n<=i||e<=o&&r<=o||t>=a&&n>=a||e>=s&&r>=s)return!1;var u=(r-e)/(n-t),h=u*(i-t)+e;if(h>o&&ho&&hi&&li&&lt.minX&&this.minYt.minY},e.prototype.containsPoint=function(t,e){for(var n=this.polygons,r=0,i=n.length;r=n||h=n){var l=r[s];l+(n-u)/(h-u)*(r[o]-l)=l&&m<=d||m>=d&&m<=l)&&(m>=e&&m<=r||m>=r&&m<=e)){var b=(h*g-u*y)/x;if((b>=f&&b<=p||b>=p&&b<=f)&&(b>=n&&b<=i||b>=i&&b<=n))return!0}l=d,f=p}return!1},e.prototype.getPolygon=function(t){if(null==t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return e==-1?null:this.polygons[e]},e.prototype.getWidth=function(){return this.maxX-this.minX},e.prototype.getHeight=function(){return this.maxY-this.minY},e}();t.SkeletonBounds=e}(e=t.core||(t.core={}))}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(t){var e;!function(t){var e=function(){function t(){this.bones=new Array,this.slots=new Array,this.skins=new Array,this.events=new Array,this.animations=new Array,this.ikConstraints=new Array,this.transformConstraints=new Array,this.pathConstraints=new Array,this.fps=0}return t.prototype.findBone=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,r=e.length;n=0;p--)W[p]==-1&&(W[p]=G[--Y])}c.setFrame(d++,X.time,W)}o.push(c),a=Math.max(a,c.frames[c.getFrameCount()-1])}if(t.events){for(var c=new e.EventTimeline(t.events.length),d=0,p=0;p=r.length&&(r.length=t+1),r[t]||(r[t]={}),r[t][e]=n},t.prototype.getAttachment=function(t,e){var n=this.attachments[t];return n?n[e]:null},t.prototype.attachAll=function(t,e){for(var n=0,r=0;r= 0.");if(null==n)throw new Error("name cannot be null.");if(null==r)throw new Error("boneData cannot be null.");this.index=e,this.name=n,this.boneData=r}return e}();t.SlotData=e}(e=t.core||(t.core={}))}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(e){var n;!function(e){var n=function(){function t(t){this._image=t}return t.prototype.getImage=function(){return this._image},t.filterFromString=function(t){switch(t.toLowerCase()){case"nearest":return r.Nearest;case"linear":return r.Linear;case"mipmap":return r.MipMap;case"mipmapnearestnearest":return r.MipMapNearestNearest;case"mipmaplinearnearest":return r.MipMapLinearNearest;case"mipmapnearestlinear":return r.MipMapNearestLinear;case"mipmaplinearlinear":return r.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return i.MirroredRepeat;case"clamptoedge":return i.ClampToEdge;case"repeat":return i.Repeat;default:throw new Error("Unknown texture wrap "+t)}},t}();e.Texture=n,function(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"}(e.TextureFilter||(e.TextureFilter={}));var r=e.TextureFilter;!function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"}(e.TextureWrap||(e.TextureWrap={}));var i=e.TextureWrap,o=function(){function e(){this.size=null}return Object.defineProperty(e.prototype,"width",{get:function(){var e=this.texture;return"3"==t.VERSION[0]?e.crop.width:e.trim?e.trim.width:e.orig.width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){var e=this.texture;return"3"==t.VERSION[0]?e.crop.height:e.trim?e.trim.height:e.orig.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"u",{get:function(){return this.texture._uvs.x0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"v",{get:function(){return this.texture._uvs.y0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"u2",{get:function(){return this.texture._uvs.x2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"v2",{get:function(){return this.texture._uvs.y2},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offsetX",{get:function(){var t=this.texture;return t.trim?t.trim.x:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offsetY",{get:function(){return console.warn("Deprecation Warning: @Hackerham: I guess, if you are using PIXI-SPINE ATLAS region.offsetY, you want a texture, right? Use region.texture from now on."),this.spineOffsetY},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pixiOffsetY",{get:function(){var t=this.texture;return t.trim?t.trim.y:0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"spineOffsetY",{get:function(){var t=this.texture;return this.originalHeight-this.height-(t.trim?t.trim.y:0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"originalWidth",{get:function(){var e=this.texture;return"3"==t.VERSION[0]?e.trim?e.trim.width:e.crop.width:e.orig.width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"originalHeight",{get:function(){var e=this.texture;return"3"==t.VERSION[0]?e.trim?e.trim.height:e.crop.height:e.orig.height},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"x",{get:function(){return this.texture.frame.x},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.texture.frame.y},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return 0!==this.texture.rotate},enumerable:!0,configurable:!0}),e}();e.TextureRegion=o}(n=e.core||(e.core={}))}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(e){var r;!function(e){var r=function(){function n(t,e,n){this.pages=new Array,this.regions=new Array,t&&this.addSpineAtlas(t,e,n)}return n.prototype.addTexture=function(t,n){for(var r=this.pages,i=null,s=0;s=this.lines.length?null:this.lines[this.index++]},t.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(e==-1)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},t.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(n==-1)throw new Error("Invalid line: "+e);for(var r=0,i=n+1;r<3;r++){var o=e.indexOf(",",i);if(o==-1)break;t[r]=e.substr(i,o-i).trim(),i=o+1}return t[r]=e.substring(i).trim(),r+1},t}(),o=function(){function n(){}return n.prototype.setFilters=function(){var n=this.baseTexture,r=this.minFilter;r==e.TextureFilter.Linear?n.scaleMode=t.SCALE_MODES.LINEAR:this.minFilter==e.TextureFilter.Nearest?n.scaleMode=t.SCALE_MODES.NEAREST:(n.mipmap=!0,r==e.TextureFilter.MipMapNearestNearest?n.scaleMode=t.SCALE_MODES.NEAREST:n.scaleMode=t.SCALE_MODES.LINEAR)},n}();e.TextureAtlasPage=o;var a=function(t){function e(){t.apply(this,arguments)}return n(e,t),e}(e.TextureRegion);e.TextureAtlasRegion=a}(r=e.core||(e.core={}))}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(t){var e;!function(t){var e=function(){function e(e,n){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new t.Vector2,null==e)throw new Error("data cannot be null.");if(null==n)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var r=0;rt.MathUtils.PI?b-=t.MathUtils.PI2:b<-t.MathUtils.PI&&(b+=t.MathUtils.PI2),b*=e;var w=Math.cos(b),A=Math.sin(b);p.a=w*v-A*x,p.c=w*g-A*m,p.b=A*v+w*x,p.d=A*g+w*m,y=!0}if(0!=n){var T=this.temp;o.localToWorld(T.set(this.data.offsetX,this.data.offsetY)),p.tx+=(T.x-p.tx)*n,p.ty+=(T.y-p.ty)*n,y=!0}if(r>0){var E=Math.sqrt(p.a*p.a+p.b*p.b),O=Math.sqrt(a*a+u*u);E>1e-5&&(E=(E+(O-E+this.data.offsetScaleX)*r)/E),p.a*=E,p.b*=E,E=Math.sqrt(p.c*p.c+p.d*p.d),O=Math.sqrt(s*s+h*h),E>1e-5&&(E=(E+(O-E+this.data.offsetScaleY)*r)/E),p.c*=E,p.d*=E,y=!0}if(i>0){var g=p.c,m=p.d,S=Math.atan2(m,g),b=Math.atan2(h,s)-Math.atan2(u,a)-(S-Math.atan2(p.b,p.a));b>t.MathUtils.PI?b-=t.MathUtils.PI2:b<-t.MathUtils.PI&&(b+=t.MathUtils.PI2),b=S+(b+this.data.offsetShearY*t.MathUtils.degRad)*i;var E=Math.sqrt(g*g+m*m);p.c=Math.cos(b)*E,p.d=Math.sin(b)*E,y=!0}y&&(d.appliedValid=!1)}},e.prototype.getOrder=function(){return this.data.order},e}();t.TransformConstraint=e}(e=t.core||(t.core={}))}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(t){var e;!function(t){var e=function(){function t(t){if(this.order=0,this.bones=new Array,this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,null==t)throw new Error("name cannot be null.");this.name=t}return t}();t.TransformConstraintData=e}(e=t.core||(t.core={}))}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(t){var e;!function(t){var e=function(){function t(){this.array=new Array}return t.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},t.prototype.contains=function(t){return void 0!=this.array[0|t]},t.prototype.remove=function(t){this.array[0|t]=void 0},t.prototype.clear=function(){this.array.length=0},t}();t.IntSet=e;var n=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.r=t,this.g=e,this.b=n,this.a=r}return t.prototype.set=function(t,e,n,r){return this.r=t,this.g=e,this.b=n,this.a=r,this.clamp(),this},t.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},t.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},t.prototype.add=function(t,e,n,r){return this.r+=t,this.g+=e,this.b+=n,this.a+=r,this.clamp(),this},t.prototype.clamp=function(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this},t.WHITE=new t(1,1,1,1),t.RED=new t(1,0,0,1),t.GREEN=new t(0,1,0,1),t.BLUE=new t(0,0,1,1),t.MAGENTA=new t(1,0,1,1),t}();t.Color=n;var r=function(){function t(){}return t.clamp=function(t,e,n){return tn?n:t},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(t){return t>0?1:t<0?-1:0},t.toInt=function(t){return t>0?Math.floor(t):Math.ceil(t)},t.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},t.PI=3.1415927,t.PI2=2*t.PI,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t}();t.MathUtils=r;var i=function(){function t(){}return t.arrayCopy=function(t,e,n,r,i){for(var o=e,a=r;o=n?e:t.setArraySize(e,n,r)},t.newArray=function(t,e){for(var n=new Array(t),r=0;r0?this.items.pop():this.instantiator()},t.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},t.prototype.freeAll=function(t){for(var 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)},t}();t.TimeKeeper=u}(e=t.core||(t.core={}))}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(e){function n(){return function(n,i){if(!n.data||!n.isJson||!n.data.bones)return i();var o=n.metadata?n.metadata.spineAtlas:null;if(o===!1)return i();if(o&&o.pages){var a=new e.core.SkeletonJson(new e.core.AtlasAttachmentLoader(o)),s=a.readSkeletonData(n.data);return n.spineData=s,n.spineAtlas=o,i()}var u=".atlas";n.metadata&&n.metadata.spineAtlasSuffix&&(u=n.metadata.spineAtlasSuffix);var h=n.url.substr(0,n.url.lastIndexOf("."))+u;h=h.replace(this.baseUrl,"");var l={crossOrigin:n.crossOrigin,xhrType:t.loaders.Resource.XHR_RESPONSE_TYPE.TEXT,metadata:n.metadata?n.metadata.spineMetadata:null},f={crossOrigin:n.crossOrigin,metadata:n.metadata?n.metadata.imageMetadata:null},c=n.url.substr(0,n.url.lastIndexOf("/")+1);c=c.replace(this.baseUrl,"");var d=r(this,n.name+"_atlas_page_",c,f);this.add(n.name+"_atlas",h,l,function(){new e.core.TextureAtlas(this.xhr.responseText,d,function(t){var r=new e.core.SkeletonJson(new e.core.AtlasAttachmentLoader(t)),o=r.readSkeletonData(n.data);n.spineData=o,n.spineAtlas=t,i()})})}}function r(t,e,n,r){return n&&n.lastIndexOf("/")!==n.length-1&&(n+="/"),function(i,o){var a=e+i,s=n+i;t.add(a,s,r,function(t){o(t.texture.baseTexture)})}}function i(e,n){return e&&e.lastIndexOf("/")!==e.length-1&&(e+="/"),function(e,r){r(t.BaseTexture.fromImage(e,n))}}e.atlasParser=n,e.imageLoaderAdapter=r,e.syncImageLoaderAdapter=i,t.loaders.Loader.addPixiMiddleware(n),t.loader.use(n())}(e=t.spine||(t.spine={}))}(r||(r={}));var r;!function(t){var e;!function(e){function r(){var t=this.parent.worldTransform,e=this.worldTransform,n=this.localTransform;e.a=n.a*t.a+n.b*t.c,e.b=n.a*t.b+n.b*t.d,e.c=n.c*t.a+n.d*t.c,e.d=n.c*t.b+n.d*t.d,e.tx=n.tx*t.a+n.ty*t.c+t.tx,e.ty=n.tx*t.b+n.ty*t.d+t.ty,this.worldAlpha=this.alpha*this.parent.worldAlpha,this._currentBounds=null}e.core.Bone.yDown=!0;var i=[0,0,0],o=function(t){function e(e){t.call(this,e)}return n(e,t),e}(t.Sprite);e.SpineSprite=o;var a=function(t){function e(e,n,r,i,o){t.call(this,e,n,r,i,o)}return n(e,t),e}(t.mesh.Mesh);e.SpineMesh=a;var s=function(s){function u(n){if(s.call(this),this.hackTextureBySlotName=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=this.skeleton.findSlotIndex(t);return r!=-1&&this.hackTextureBySlotIndex(r,e,n)},!n)throw new Error("The spineData param is required.");if("string"==typeof n)throw new Error('spineData param cant be string. Please use PIXI.spine.Spine.fromAtlas("YOUR_RESOURCE_NAME") from now on.');this.spineData=n,this.skeleton=new e.core.Skeleton(n),this.skeleton.updateWorldTransform(),this.stateData=new e.core.AnimationStateData(n),this.state=new e.core.AnimationState(this.stateData),this.slotContainers=[];for(var r=0,i=this.skeleton.slots.length;r1?e-1:0),r=1;r1?n-1:0),i=1;i1&&e.pop()||"";e=e.join("/");var o=i.length&&i.indexOf(".")&&i.split(".").pop(),a=r(s.search);return{href:s.href,protocol:s.protocol,username:s.username,password:s.password,host:s.host,hostname:s.hostname,port:s.port,pathname:s.pathname,search:s.search,hash:s.hash,path:e,basename:i,extension:o,params:a}}Object.defineProperty(e,"__esModule",{ value:!0});var a=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=document.createElement("a");e.normalizeURL=n,e.parseURL=o,e.parseQueryString=r,e.createQueryString=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.key;return f.CACHE.get(t)}},{key:"cache",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.key;this.data?f.CACHE.put(t,this.data,this.name):f.CACHE.remove(t)}},{key:"load",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(t){var e=this.cached();e&&(this.data=e,this.completeLoad(t))}}},{key:"completeLoad",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.parseData(),t&&this.cache(),this._status=this._status||"success",this._statusMessage=this._statusMessage||("success"==this._status?"OK":"Unknown error"),this.complete=!0}},{key:"reload",value:function(){this._complete=!1,this._status=null,this._statusMessage=null,this.load(!1)}},{key:"progressInfo",get:function(){var t=this._complete?1:0;return{total:1,complete:t,progress:t}}},{key:"complete",get:function(){return!!this._complete},set:function(t){this._complete||(this._complete=!!t,this._complete&&(this.emit("progress",this.progressInfo),"error"==this._status&&this._dispatchError(),"success"==this._status&&this._dispatchSuccess(),this._dispatchComplete()))}}]),e}(l.default);e.default=c},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n0}}]),e}(u);e.default=h},function(t,e,n){"use strict";function r(){}function i(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function o(){this._events=new r,this._eventsCount=0}var a=Object.prototype.hasOwnProperty,s="~";Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(s=!1)),o.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)a.call(t,e)&&n.push(s?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},o.prototype.listeners=function(t,e){var n=s?s+t:t,r=this._events[n];if(e)return!!r;if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i=22),u=!!navigator.userAgent.match(/PlayFreeBrowser/i),h=navigator.userAgent.match(/Firefox/i),l=!!navigator.userAgent.match(/MSIE/i)||"Microsoft Internet Explorer"==navigator.appName,f=n||r||i||o||a||"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0,c=n||r||i||o||a;c||(window.addEventListener("mousemove",function(){return e.TOUCH_SCREEN=f=!1},!0),window.addEventListener("touchstart",function(){return e.TOUCH_SCREEN=f=!0},!0));var d={START:r?"MSPointerDown":"touchstart",MOVE:r?"MSPointerMove":"touchmove",END:r?"MSPointerUp":"touchend"},p=""!=document.createElement("audio").canPlayType("audio/mpeg"),y=!(!window.AudioContext&&!window.webkitAudioContext||c&&h),v=c&&navigator.userAgent.indexOf("iPhone")>=0&&2==window.devicePixelRatio,g=c&&n&&!s&&!h,x=g&&navigator.userAgent.toLowerCase().indexOf("sm-t310")>=0||c&&n&&h&&navigator.userAgent.toLowerCase().indexOf("sm-t310")>=0;e.ANDROID=n,e.IOS=i,e.WINDOWS_PHONE=r,e.BLACKBERRY=o,e.WEBOS=a,e.CHROME=s,e.PLAY_FREE_BROWSER=u,e.FIREFOX=h,e.IE=l,e.TOUCH_SCREEN=f,e.TOUCH_EVENTS=d,e.MP3_SUPPORT=p,e.WEBAUDIO_SUPPORT=y,e.MOBILE=c,e.IPHONE4=v,e.BROKEN_ANDROID=g,e.SLOW_DEVICE=x},function(t,e,n){"use strict";function r(t){var e=(0,l.parseURL)(t),n=e.pathname;return 0==e.extension.length?n:(n=n.replace(f,""),n=n.replace(new RegExp("."+e.extension+"$","i"),""))}function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return c.has(t)?(null===e&&(e=r(t)),d.has(e)&&d.get(e)!==t&&console.warn('CACHE: Name "'+e+'" remapped to "'+t+'". Old value is "'+d.get(e)+'")'),void d.set(e,t)):void console.warn('CACHE: Cannot map "'+e+'" to "'+t+'". Item not cached.')}function o(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;c.set(t,e),i(t,n)}function a(t){return t=d.has(t)?d.get(t):t,c.get(t)}function s(t){var e=d.has(t)?d.get(t):t;c.delete(e);var n=!0,r=!1,i=void 0;try{for(var o,a=d[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=h(o.value,2),u=s[0],l=s[1];e==l&&d.delete(u)}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}function u(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(t){"string"==typeof t&&(t=new RegExp(t));var e=!0,n=!1,r=void 0;try{for(var i,o=c.keys()[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;t.test(a)&&s(a)}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}var u=!0,h=!1,l=void 0;try{for(var f,p=d.keys()[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var y=f.value;t.test(y)&&s(y)}}catch(t){h=!0,l=t}finally{try{!u&&p.return&&p.return()}finally{if(h)throw l}}}else c.clear(),d.clear()}Object.defineProperty(e,"__esModule",{value:!0}),e.clear=e.remove=e.get=e.put=e.map=e.NAME_MAP=e.DATA=void 0;var h=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=n(334),f=new RegExp("^/?(sounds|images/([0-9.]+))/","i"),c=new Map,d=new Map;e.DATA=c,e.NAME_MAP=d,e.map=i,e.put=o,e.get=a,e.remove=s,e.clear=u},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){d.href=t;var e=(d.pathname||"").split("/").pop();return e=e.indexOf(".")<0?"":e.split(".").pop().toLowerCase(),d.href=null,"xml"==e?"xml":"json"==e?"json":"text"}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0])||arguments[0];if(h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"load",this).call(this,t),!this.complete){var n=this;(0,l.GET)(this.key,null,function(e,r,i,o){n._status=r,"error"==r&&(n._statusMessage=o||i&&i.statusText||"Uknown AJAX error"),n.data=e,n.completeLoad(t)},this.dataType)}}}]),e}(c.default);e.default=p},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){var e=t||"";if(e&&"string"!=typeof e){e=[];var n=!0,r=!1,i=void 0;try{for(var o,a=Object.keys(t)[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;e.push(encodeURIComponent(s)+"="+encodeURIComponent(t[s]))}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}e=e.join("&")}return e}function a(t,e){var n=document.createElement("a"),r="";return n.src=t,r=n.hostname,n.src=e,n.hostname==r}function s(t){return d.IE&&window.XDomainRequest&&!document.addEventListener&&!a(t,window.location.href)}function u(t,e,n){var r=s(t),i=r&&new XDomainRequest||window.XMLHttpRequest&&new XMLHttpRequest||window.ActiveXObject&&new ActiveXObject("Microsoft.XMLHTTP")||null;return i&&e instanceof Function&&(r?(i.onload=function(){var r="success",o=null;try{(0,y.default)(i.responseText,n)}catch(e){r="error",o=t+"\n\tParse error: "+e.message}e(data,r,i,o)},i.onerror=function(){e(null,"error",i,t+"\n\tHTTP Error "+i.status+": "+i.statusText)},i.ontimeout=function(){console.dir(args),e(null,"error",i,t+"\n\tRequest timeout")}):i.onreadystatechange=function(){if(4==i.readyState){var r=null,o="success",a=null;i.status<400?("arraybuffer"==n&&(r=i.response),"xml"==n&&(r=i.responseXML),!r&&i.responseText&&(r=(0,y.default)(i.responseText,n))):(o="error",a=t+"\n\tHTTP Error "+i.status+": "+i.statusText),e(r,o,i,a)}}),i}function h(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GET",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"text",a=u(t,r,i);if(a){var h=o(n);"GET"==e&&h&&(t+="?"+h),a.open(e,t,!0),"arraybuffer"==i&&(a.responseType="arraybuffer"),"POST"!=e||s(t)||a.setRequestHeader("Content-type","application/x-www-form-urlencoded"),a.send("GET"==e?null:h)}else r&&r(null,"error",null,"Cannot create XHR instance")}function l(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"text";return h(t,"GET",e,n,r)}function f(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"text";return h(t,"POST",e,n,r)}Object.defineProperty(e,"__esModule",{value:!0}),e.POST=e.GET=void 0;var c=n(339),d=i(c),p=n(343),y=r(p);e.GET=l,e.POST=f,e.default=h},function(t,e){"use strict";function n(t){return JSON.parse(t)}function r(t){var e=null;if("undefined"!=typeof window.DOMParser)e=(new window.DOMParser).parseFromString(t,"text/xml");else{if("undefined"==typeof window.ActiveXObject||!new window.ActiveXObject("Microsoft.XMLDOM"))throw new Error("No XML parser found");e=new window.ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(t)}return e}function i(t,e){return e instanceof Function?e(t):"json"==e?n(t):"xml"==e?r(t):t}Object.defineProperty(e,"__esModule",{value:!0}),e.json=n,e.xml=r,e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=n(341),u=r(s),h=function(t){function e(t){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,"json"))}return a(e,t),e}(u.default);e.default=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=n(341),u=r(s),h=function(t){function e(t){return i(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,"xml"))}return a(e,t),e}(u.default);e.default=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0])||arguments[0],e=PIXI.Texture.fromImage(this.data.src);if(!this.complete||!e.baseTexture.hasLoaded){var n=this,r=null,i=function i(){n.data.complete&&e.baseTexture.hasLoaded?(n.data.onerror=null,n._status="success",e=null,n.completeLoad(t)):r=setTimeout(i,100)};this.data.onerror=function(){r=clearTimeout(r),n.data.onerror=null,n._status="error",n.completeLoad(t)},i()}}}]),e}(l.default);e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){return t instanceof Array?(t.sort(function(t,e){var n=g.exec(t)||[],r=l(n,2);t=r[1];var i=g.exec(e)||[],o=l(i,2);return e=o[1],t&&e?y.MP3_SUPPORT?"mp3"==t.toLowerCase()?-1:1:"mp3"==t.toLowerCase()?1:-1:0}),t):t?[t]:[]}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null;i(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return r.context=n,r}return a(e,t),u(e,[{key:"destructor",value:function(){h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destructor",this).call(this),this.context=null}},{key:"prepareData",value:function(t){if(this._sources=s(t),x){var e=document.createElement("audio");e.autoplay=!1,e.controls=!1,e.preload="auto",e.src=this._sources[0];var n=!0,r=!1,i=void 0;try{for(var o,a=this._sources[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var u=o.value,h=e.appendChild(document.createElement("source"));h.src=u}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return e}}},{key:"prepareKey",value:function(t){return s(t)}},{key:"cached",value:function(){var t=null,n=!0,r=!1,i=void 0;try{for(var o,a=this._sources[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(t=h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"cached",this).call(this,s))return t}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}},{key:"cache",value:function(){var t=(this.data,!0),n=!1,r=void 0;try{for(var i,o=this._sources[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value;h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"cache",this).call(this,a)}}catch(t){n=!0,r=t}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}},{key:"_legacyLoad",value:function(t){var e=this,n=function n(r){e.complete||(e.data.removeEventListener("canplay",n),e.data.removeEventListener("canplaythrough",n),e.data.removeEventListener("error",n),e.data.removeEventListener("stalled",n),"error"!=r.type&&"stalled"!=r.type||(e._status="error",e._statusMessage="Error loading audio"),e.completeLoad(t))};this.data.addEventListener("canplay",n),this.data.addEventListener("canplaythrough",n),this.data.addEventListener("error",n),this.data.addEventListener("stalled",n),this.data.load()}},{key:"load",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"load",this).call(this,t),!this.complete){if(x)return this._legacyLoad(t);if(this._sources.length){var n=this._sources.shift(),r=this,i=new p.default(n,"arraybuffer");i.once("success",function(e){return e.target.data?void r.context.decodeAudioData(e.target.data,function(n){r.data=n,r.key=e.target.key,r._sources=[e.target.key],r._statusMessage="OK",r.completeLoad(t)},function(){r._statusMessage=r._statusMessage||"",r._statusMessage+="Error decoding "+n+"\n",r.load(t)}):r.load(t)}),i.once("error",function(t){r._statusMessage=r._statusMessage||"",r._statusMessage+=t.message+"\n"}),i.load(t)}else this._status="error",this._statusMessage="All provided sources are invalid!",this.completeLoad(t)}}}]),e}(c.default);e.default=m},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0])||arguments[0];if(u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"load",this).call(this,n),!this.complete){var r=new v.default,i=null,o=null,a=new c.default(this.name+".json");a.once("complete",function(t){i=t.target.data});var s=new l.default(this.name+".atlas");s.once("complete",function(t){o=t.target.data}),r.add(a,s),r.once("complete",function(e){t.data={config:i,atlas:o},t.completeLoad(n)}),r.load()}}}]),e}(p.default);e.default=g},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e1&&void 0!==arguments[1])||arguments[1];this.items=new Set([].concat(i(this.items),i(t.items))),this.data=new Set([].concat(i(this.data),i(t.data))),e&&t.clear()}},{key:"clear",value:function(){this.items.clear(),this.data.clear(),this._complete=!1}},{key:"load",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=!0,n=!1,r=void 0;try{for(var i,o=this.items[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;a.load(t)}}catch(t){ n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}this._handleProgress()}},{key:"_dispatchProgress",value:function(){this.emit("progress",this.progressInfo)}},{key:"_dispatchFileLoad",value:function(t){this.emit("fileload",{item:t})}},{key:"_dispatchComplete",value:function(){this.emit("complete")}},{key:"_flushLoadedItems",value:function(){var t=!0,n=!1,r=void 0;try{for(var i,o=this.items[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){var a=i.value;a.complete&&(this.items.delete(a),this.data.add(a),a instanceof e||this._dispatchFileLoad(a))}}catch(t){n=!0,r=t}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}}},{key:"_handleProgress",value:function(){this._flushLoadedItems(),this._dispatchProgress(),0==this.items.size&&(this.complete=!0)}},{key:"progressInfo",get:function(){var t={total:0,complete:0,progress:0},e=!0,n=!1,r=void 0;try{for(var i,o=this.items[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value,s=a.progressInfo,u=s.total,h=s.complete;s.progress;t.total+=u,t.complete+=h}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}var l=!0,f=!1,c=void 0;try{for(var d,p=this.data[Symbol.iterator]();!(l=(d=p.next()).done);l=!0){var y=d.value,v=y.progressInfo,u=v.total,h=v.complete;v.progress;t.total+=u,t.complete+=h}}catch(t){f=!0,c=t}finally{try{!l&&p.return&&p.return()}finally{if(f)throw c}}return t.progress=0==t.total?1:t.complete/t.total,t}},{key:"complete",get:function(){return this._complete},set:function(t){this._complete||(this._complete=!!t,this._complete&&this._dispatchComplete())}}]),e}(l.default);e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0])||arguments[0];this.loadNextItem()}}]),e}(h.default);e.default=l},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(352),o=r(i);e.default=o.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n1?e-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:0;this.progressBar.querySelector("div").style.width=~~t+"%"}},{key:"showComplete",value:function(){var t=this;return this.showProgress(100),this.button.src=d.PLAY_BUTTON_ENABLED,this.button.style.cursor="pointer",this.skipPlayButton?void this.dispatchComplete():void(0,c.bindEvent)(this.button,"click",function(){t.dispatchComplete()})}}]),e}(f.default);e.default=p},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;if(!this.available)return u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"load",this).call(this,t);var n=window.localStorage.getItem(this.key);return t instanceof Function&&t(n),n}},{key:"save",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.available?(window.localStorage.setItem(this.key,t),void(n instanceof Function&&n())):u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"save",this).call(this,t,n)}},{key:"available",get:function(){return!(!window||!window.localStorage)}},{key:"async",get:function(){return!1}}]),e}(l.default);e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.cookie,e=new Map;t=(t||"").split(";");var n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;s=s.split("="),e.set(s.shift(),decodeURIComponent(s.join("=")))}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return e}function u(t){var e=[],n=!0,r=!1,i=void 0;try{for(var o,a=t[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=l(o.value,2),u=s[0],h=s[1];e.push(u+"="+encodeURIComponent(h))}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return e.join(";")}Object.defineProperty(e,"__esModule",{value:!0});var h=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null,e=s(document.cookie);return t instanceof Function&&t(e.get(this.key)),e.get(this.key)}},{key:"save",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=s(document.cookie);n.set(this.key,t),document.cookie=u(n),e instanceof Function&&e()}},{key:"available",get:function(){return!!document}},{key:"async",get:function(){return!1}}]),e}(c.default);e.default=d},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null,e=i.get(this.key);return t instanceof Function&&t(e),e}},{key:"save",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;i.set(this.key,t),e instanceof Function&&e()}},{key:"available",get:function(){return!0}},{key:"async",get:function(){return!1}}]),t}();e.default=o},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null,n=window.navigator.userLanguage||window.navigator.language||"";e||(e=n.substr(0,2)),t.supportedLanguages.indexOf(e)<0&&(e=t.supportedLanguages[0]),t.currentLocale=e}},{key:"parse",value:function(e){var n={};if(t.parser)n=t.parser(e);else{var r=e.split("\n"),i=void 0,o=!0,a=!1,s=void 0;try{for(var u,h=r[Symbol.iterator]();!(o=(u=h.next()).done);o=!0){var l=u.value;i=l.split(t.iniSeparator),i[0].trim()&&(n[i[0].trim()]=i[1].trim())}}catch(t){a=!0,s=t}finally{try{!o&&h.return&&h.return()}finally{if(a)throw s}}}return n}},{key:"createLoaderQueue",value:function(){var e=new o.Queue,n=(0,o.createLoader)(t.path+"/"+t.iniPrefix+t.currentLocale+"."+t.iniExt+"?v="+(new Date).getTime(),this.context);return e.add(n),e.on("fileload",function(e){t.setup(t.parse(e.item.data))}),e}},{key:"load",value:function(e){var n=t.createLoaderQueue();n.on("fileload",e),n.load()}},{key:"setup",value:function(e){t.strings=e}},{key:"trim",value:function(t){return t.trim()}},{key:"arrayAntidot",value:function(t){if(t)return t.length>0&&Array.isArray(t[0])?t[0]:t}},{key:"getString",value:function(e,n){"undefined"==typeof n&&(n=null);var r=t.getStringOrNull(e,n);return null==r?"{"+e+"}":r}},{key:"getStringOrNull",value:function(e,n){"undefined"==typeof n&&(n=null);var r=t.strings[e];return"undefined"==typeof r&&(r=null),null==n||null==r?r:(n=[r].concat(t.arrayAntidot(n)),t.sprintf.apply(t,n))}},{key:"f",value:function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i=e?"":new Array(1+e-t.length>>>0).join(n);return r?t+i:i+t},u=function(t,e,n,r,i,o){var a=r-t.length;return a>0&&(t=n||!i?s(t,r,o,n):t.slice(0,e.length)+s("",a,"0",!0)+t.slice(e.length)),t},h=function(t,e,n,r,i,o,a){var h=t>>>0;return n=n&&h&&{2:"0b",8:"0",16:"0x"}[e]||"",t=n+s(h.toString(e),o||0,"0",!1),u(t,n,r,i,a)},l=function(t,e,n,r,i,o){return null!=r&&(t=t.slice(0,r)),u(t,"",e,n,i,o)},f=function(t,e,n,r,a,f,c){var d,p,y,v,g;if("%%"===t)return"%";for(var x=!1,m="",b=!1,w=!1,A=" ",T=n.length,E=0;n&&E-1?6:"d"===c?0:void 0,g=e?i[e.slice(0,-1)]:i[o++],c){case"s":return l(String(g),x,r,f,b,A);case"c":return l(String.fromCharCode(+g),x,r,f,b);case"b":return h(g,2,w,x,r,f,b);case"o":return h(g,8,w,x,r,f,b);case"x":return h(g,16,w,x,r,f,b);case"X":return h(g,16,w,x,r,f,b).toUpperCase();case"u":return h(g,10,w,x,r,f,b);case"i":case"d":return d=+g||0,d=Math.round(d-d%1),p=d<0?"-":m,g=p+s(String(Math.abs(d)),f,"0",!1),u(g,p,x,r,b);case"e":case"E":case"f":case"F":case"g":case"G":return d=+g,p=d<0?"-":m,y=["toExponential","toFixed","toPrecision"]["efg".indexOf(c.toLowerCase())],v=["toString","toUpperCase"]["eEfFgG".indexOf(c)%2],g=p+Math.abs(d)[y](f),u(g,p,x,r,b)[v]();default:return t}};return a.replace(t,f)}},{key:"currentLocale",get:function(){return a},set:function(t){a=t}},{key:"supportedLanguages",get:function(){return s},set:function(t){s=t}},{key:"strings",get:function(){return u},set:function(t){u=t}},{key:"path",get:function(){return h},set:function(t){h=t}},{key:"iniPrefix",get:function(){return l},set:function(t){l=t}},{key:"iniExt",get:function(){return f},set:function(t){f=t}},{key:"iniSeparator",get:function(){return c},set:function(t){c=t}},{key:"parser",get:function(){return d},set:function(t){d=t}}]),t}();e.default=p},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;nt&&(t=s)}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}return t}},{key:"getWidthOfLine",value:function(t){for(var e=0,n=void 0,r=0;re&&(e=n.height+n.yoffset);return 0==this.lines[t].length&&(n=this.getChar(" "),e=n.height+n.yoffset),e}},{key:"setScaleToFitWidth",value:function(t,e,n){var r=t/this.getWidth();e&&rn&&(r=n),this.scale.set(r)}},{key:"write",value:function(t){var n=void 0,r=void 0,i=void 0,o=void 0,a=void 0,s=void 0,h=void 0,l=void 0,f=void 0,c=void 0;if(this.removeChildren(),t+="",this.maxWidth>0){for(var d,p=t.split(e.LINES_DELIMITER),y=[],v=[],g=0;gthis.maxWidth?(y.push(v.join(" ")),v=[d[x]]):v.push(d[x]);y.push(v.join(" "))}this.lines=y,h=this.maxWidth}else this.lines=t.split(e.LINES_DELIMITER),h=this.getWidth();this._text=t,o=0,a=0,s=this.getHeight(),this.valign==u.VALIGN.MIDDLE&&(a=-s/2),this.valign==u.VALIGN.BOTTOM&&(a=-s);for(var m=0;m0&&(c=(h-l)/(b-1))}for(var w=0;w=0&&(i=new PIXI.Sprite(this.frames[r]),i.position.set(o+n.xoffset,a+n.yoffset),this.addChild(i),o+=n.xadvance+this.charSpacing,32==n.id&&(o+=c));a+=(this.lineHeight?this.lineHeight:this.getHeightOfLine(m))+this.lineSpacing}}},{key:"refresh",value:function(){this.write(this.text)}},{key:"align",get:function(){return this._align},set:function(t){this._align=t,this.refresh()}},{key:"valign",get:function(){return this._valign},set:function(t){this._valign=t,this.refresh()}},{key:"charSpacing",get:function(){return this._charSpacing},set:function(t){this._charSpacing=t,this.refresh()}},{key:"lineSpacing",get:function(){return this._lineSpacing},set:function(t){this._lineSpacing=t,this.refresh()}},{key:"lineHeight",get:function(){return this._lineHeight},set:function(t){this._lineHeight=t,this.refresh()}},{key:"maxWidth",get:function(){return this._maxWidth},set:function(t){this._maxWidth=t,this.refresh()}},{key:"text",get:function(){return this._text},set:function(t){this.write(t)}}],[{key:"getFrames",value:function(t,e){var n=PIXI.utils.TextureCache[e.bitmap.src].baseTexture;if(!n)throw Error("Texture "+e.bitmap.src+" not found");var r=[],i=!0,o=!1,a=void 0;try{for(var s,u=t[Symbol.iterator]();!(i=(s=u.next()).done);i=!0){var h=s.value,l=n.imageUrl+"_"+h.id;if(f[l])r.push(f[l]);else{var c=new PIXI.Texture(n);c.frame=new PIXI.Rectangle(h.x,h.y,h.width,h.height),r.push(c),f[l]=c}}}catch(t){o=!0,a=t}finally{try{!i&&u.return&&u.return()}finally{if(o)throw a}}return r}},{key:"LINES_DELIMITER",get:function(){return c},set:function(t){c=t}}]),e}(l.default);e.default=d},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;i(this,e);var n=t?e.getFrames(t):[PIXI.Texture.EMPTY],r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,n));return r.asset=t,r.anchor.set(.5),r.animationSpeed=.4,r._zIndex=0,r._dragPoint=null,r.totalFrames>1?r.gotoAndPlay(0):r.gotoAndStop(0),r}return a(e,t),u(e,[{key:"gotoAndStop",value:function(){for(var t,n=arguments.length,r=Array(n),i=0;i=0&&(this.interactive=!0),h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"on",this).call(this,t,n,r)}},{key:"once",value:function(t,n,r){"pointerdown"==t&&(h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"once",this).call(this,"mousedown",n,r),h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"once",this).call(this,"touchstart",n,r)),"pointerup"==t&&(h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"once",this).call(this,"mouseup",n,r),h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"once",this).call(this,"touchend",n,r)),"pointermove"==t&&(h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"once",this).call(this,"mousemove",n,r),h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"once",this).call(this,"touchmove",n,r)),"pointerclick"==t&&(h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"once",this).call(this,"click",n,r),h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"once",this).call(this,"tap",n,r)),"pointerupoutside"==t&&(h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"once",this).call(this,"mouseupoutside",n,r),h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"once",this).call(this,"touchendoutside",n,r)),v.indexOf(t)>=0&&(this.interactive=!0),h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"once",this).call(this,t,n,r)}},{key:"removeListener",value:function(t,n,r,i){if("pointerdown"==t&&(h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeListener",this).call(this,"mousedown",n,r,i),h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeListener",this).call(this,"touchstart",n,r,i)),"pointerup"==t&&(h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeListener",this).call(this,"mouseup",n,r,i),h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeListener",this).call(this,"touchend",n,r,i)),"pointermove"==t&&(h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeListener",this).call(this,"mousemove",n,r,i),h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeListener",this).call(this,"touchmove",n,r,i)),"pointerclick"==t&&(h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeListener",this).call(this,"click",n,r,i),h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeListener",this).call(this,"tap",n,r,i)),"pointerupoutside"==t&&(h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeListener",this).call(this,"mouseupoutside",n,r),h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeListener",this).call(this,"touchendoutside",n,r)),h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeListener",this).call(this,t,n,r,i),v.indexOf(t)>=0){var o=!1,a=!0,s=!1,u=void 0;try{for(var l,f=v[Symbol.iterator]();!(a=(l=f.next()).done);a=!0){var c=l.value;if(this.listeners(c).length>0){o=!0;break}}}catch(t){s=!0,u=t}finally{try{!a&&f.return&&f.return()}finally{if(s)throw u}}this.interactive=o}}},{key:"off",value:function(t,e,n,r){this.removeListener(t,e,n,r)}},{key:"emit",value:function(t){var n=arguments[1];if(n||(n={}),v.indexOf(t)>=0){if(l.TOUCH_SCREEN&&x.indexOf(t)<0)return;if(!l.TOUCH_SCREEN&&g.indexOf(t)<0)return;n.data||(n.data={}),n.data.local=n.data.getLocalPosition(this)}n.type||(n.type=t),n.target=this,arguments.length<3&&h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).call(this,t,n),3==arguments.length&&h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).call(this,t,n,arguments[2]),4==arguments.length&&h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).call(this,t,n,arguments[2],arguments[3]),arguments.length>=5&&h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"emit",this).call(this,t,n,arguments[2],arguments[3],arguments[4])}},{key:"removeTweens",value:function(){f.Tween.destroy(f.Tween.findByTarget(this)),f.Tween.destroy(f.Tween.findByTarget(this.scale)),f.Tween.destroy(f.Tween.findByTarget(this.skew))}},{key:"addTween",value:function(t,e,n,r,i,o,a){a||(a=this);var s=new f.Tween(a,t,a[t],e,n,r);return o&&s.on("change",o),i&&s.on("finish",i),s}},{key:"moveTo",value:function(t,e,n,r,i,o){return this.addTween("x",t,n,r,null,null).play(),this.addTween("y",e,n,r,i,o).play(),this}},{key:"moveBy",value:function(t,e,n,r,i,o){return this.moveTo(this.x+t,this.y+e,n,r,i,o)}},{key:"fadeTo",value:function(t,e,n,r,i){return this.addTween("alpha",t,e,n,r,i).play(),this}},{key:"fadeBy",value:function(t,e,n,r,i){var o=Math.max(0,Math.min(1,this.alpha+t));return this.fadeTo(o,e,n,r,i)}},{key:"rotateTo",value:function(t,e,n,r,i){return this.addTween("rotation",t,e,n,r,i).play(),this}},{key:"rotateBy",value:function(t,e,n,r,i){return this.rotateTo(this.rotation+t,e,n,r,i)}},{key:"skewXTo",value:function(t,e,n,r,i){return this.addTween("x",t,e,n,r,i,this.skew).play(),this}},{key:"skewXBy",value:function(t,e,n,r,i){return this.skewXTo(this.skew.x+t,e,n,r,i)}},{key:"skewYTo",value:function(t,e,n,r,i){return this.addTween("y",t,e,n,r,i,this.skew).play(),this}},{key:"skewYBy",value:function(t,e,n,r,i){return this.skewYTo(this.skew.y+t,e,n,r,i)}},{key:"scaleXTo",value:function(t,e,n,r,i){return this.addTween("x",t,e,n,r,i,this.scale).play(),this}},{key:"scaleXBy",value:function(t,e,n,r,i){return this.addTween("x",this.scale.x+t,e,n,r,i,this.scale).play(),this}},{key:"scaleYTo",value:function(t,e,n,r,i){return this.addTween("y",t,e,n,r,i,this.scale).play(),this}},{key:"scaleYBy",value:function(t,e,n,r,i){return this.addTween("y",this.scale.y+t,e,n,r,i,this.scale).play(),this}},{key:"scaleTo",value:function(t,e,n,r,i){return this.scaleXTo(t,e,n,null,null),this.scaleYTo(t,e,n,r,i),this}},{key:"scaleBy",value:function(t,e,n,r,i){return this.scaleXBy(t,e,n,null,null),this.scaleYBy(t,e,n,r,i),this}},{key:"hitTestPoint",value:function(t,e){var n=void 0;return n=void 0===e?t:new PIXI.Point(t,e),this.containsPoint(n)}},{key:"getAbsoluteRotation",value:function(){for(var t=this.rotation,e=this.parent;e;)t+=e.rotation,e=e.parent;return t}},{key:"getAbsoluteScaleX",value:function(){for(var t=this.scale.x,e=this.parent;e;)t*=e.scale.x,e=e.parent;return t}},{key:"getAbsoluteScaleY",value:function(){for(var t=this.scale.y,e=this.parent;e;)t*=e.scale.y,e=e.parent;return t}},{key:"getGlobalCenter",value:function(){if(.5==this.anchor.x&&.5==this.anchor.y)return this.getGlobalPosition();var t=.5-this.anchor.x,e=.5-this.anchor.y,n=Math.atan2(e,t)+this.getAbsoluteRotation(),r=this.width*Math.abs(this.getAbsoluteScaleX())*Math.abs(t),i=this.height*Math.abs(this.getAbsoluteScaleY())*Math.abs(e),o=Math.sqrt(r*r+i*i),a=this.getGlobalPosition();return a.x+=Math.cos(n)*o,a.y+=Math.sin(n)*o,a}},{key:"hitTest",value:function(t){var e=this.getAbsoluteRotation(),n=t.getAbsoluteRotation();if(0==e&&0==n){var r=this.getGlobalCenter(),i=t.getGlobalCenter(),o=this.width*Math.abs(this.getAbsoluteScaleX()),a=this.height*Math.abs(this.getAbsoluteScaleY()),s=t.width*Math.abs(t.getAbsoluteScaleX()),u=t.height*Math.abs(t.getAbsoluteScaleY()),h=r.x-o/2,l=r.y-a/2,f=i.x-s/2,c=i.y-u/2,d=Math.max(l,c),p=Math.max(h,f),y=Math.min(h+o,f+s),v=Math.min(l+a,c+u),g=y-p,x=v-d;return g>0&&x>0}var m=this.getDrawRectangle(),b=t.getDrawRectangle();return m.hitTestRectangle(b)}},{key:"getDrawRectangle",value:function(){var t=this.getGlobalCenter(),e=new c.Rectangle(0,0,this.width*Math.abs(this.getAbsoluteScaleX()),this.height*Math.abs(this.getAbsoluteScaleY()),this.getAbsoluteRotation());return e.move(t.x,t.y),e}},{key:"contains",value:function(t){return this.children.indexOf(t)>=0}},{key:"clone",value:function(){var t=new e(this.asset);return Object.assign(t,this),t.parent=null,t}},{key:"applyZIndex",value:function(){for(var t=!1;!t;){t=!0;for(var e=0;er.zIndex)&&(this.parent.children[e]=r,this.parent.children[e+1]=n,t=!1)}}}},{key:"doDrag",value:function(t){if(this._dragPoint&&(!t.data.originalEvent.touches||1==t.data.originalEvent.touches.length)){var e=t.data.global.x-this._dragPoint.x*this.scale.x,n=t.data.global.y-this._dragPoint.y*this.scale.y,r=this.parent.globalToLocal(e,n);this.position.set(r.x,r.y),this.emit("dragged")}}},{key:"startDrag",value:function(t,e){this._dragPoint=new PIXI.Point(t,e),this.on("pointermove",this.doDrag)}},{key:"stopDrag",value:function(){this._dragPoint=null,this.off("pointermove",this.doDrag)}},{key:"localToGlobal",value:function(t,e){var n="object"==("undefined"==typeof t?"undefined":s(t))&&"undefined"!=typeof t.x&&"undefined"!=typeof t.y?new c.Vector(t.x+0,t.y+0):new c.Vector(t,e);return n.rotate(-this.getAbsoluteRotation()).add(this.getGlobalPosition()),n}},{key:"globalToLocal",value:function(t,e){var n="object"==("undefined"==typeof t?"undefined":s(t))&&"undefined"!=typeof t.x&&"undefined"!=typeof t.y?new c.Vector(t.x+0,t.y+0):new c.Vector(t,e);return n.subtract(this.getGlobalPosition()).rotate(this.getAbsoluteRotation()),n}},{key:"localToLocal",value:function(t,e,n){return n.globalToLocal(this.localToGlobal(t,e))}},{key:"update",value:function(t){var n=this.currentFrame;if(h(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"update",this).call(this,t),this.playing&&n!=this.currentFrame){var r=0;r=this.currentFrame>n?this.currentFrame-n:this.currentFrame+this.totalFrames-n;for(var i=n,o=0;o=this.totalFrames&&(i=0,this.emit("animationend"))}}},{key:"clear",value:function(){this.removeTweens(),this.removeAllListeners(),this.stop()}},{key:"safeRemoveChild",value:function(){for(var t,n=arguments.length,r=Array(n),i=0;i=s.frames&&(l=0,f++)}}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return e}}]),e}(b);e.default=w},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}Object.defineProperty(e,"__esModule",{value:!0}),e.PathTween=e.Sequence=e.Tween=e.easing=void 0;var o=n(366),a=i(o),s=n(379),u=r(s),h=n(381),l=r(h),f=n(383),c=r(f);e.easing=a,e.Tween=u.default,e.Sequence=l.default,e.PathTween=c.default},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]); return e.default=t,e}Object.defineProperty(e,"__esModule",{value:!0}),e.smoothstep=e.sine=e.quintic=e.quartic=e.quadratic=e.linear=e.exponential=e.elastic=e.cubic=e.circular=e.bounce=e.back=void 0;var i=n(367),o=r(i),a=n(368),s=r(a),u=n(369),h=r(u),l=n(370),f=r(l),c=n(371),d=r(c),p=n(372),y=r(p),v=n(373),g=r(v),x=n(374),m=r(x),b=n(375),w=r(b),A=n(376),T=r(A),E=n(377),O=r(E),S=n(378),M=r(S);e.back=o,e.bounce=s,e.circular=h,e.cubic=f,e.elastic=d,e.exponential=y,e.linear=g,e.quadratic=m,e.quartic=w,e.quintic=T,e.sine=O,e.smoothstep=M},function(t,e){"use strict";function n(t,e,n,r){var i=1.70158;return n*(t/=r)*t*((i+1)*t-i)+e}function r(t,e,n,r){var i=1.70158;return n*((t=t/r-1)*t*((i+1)*t+i)+1)+e}function i(t,e,n,r){var i=1.70158;return(t/=r/2)<1?n/2*(t*t*(((i*=1.525)+1)*t-i))+e:n/2*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)+e}Object.defineProperty(e,"__esModule",{value:!0}),e.easeIn=n,e.easeOut=r,e.easeInOut=i},function(t,e){"use strict";function n(t,e,n,i){return n-r(i-t,0,n,i)+e}function r(t,e,n,r){return(t/=r)<1/2.75?n*(7.5625*t*t)+e:t<2/2.75?n*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?n*(7.5625*(t-=2.25/2.75)*t+.9375)+e:n*(7.5625*(t-=2.625/2.75)*t+.984375)+e}function i(t,e,i,o){return t5&&void 0!==arguments[5]?arguments[5]:d.easeIn;o(this,e);var l=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if("object"!=("undefined"==typeof t?"undefined":u(t))&&(t=null),t){if("undefined"==typeof t[n])throw new Error('Trying to tween undefined property "'+n+'"');if(isNaN(t[n]))throw new Error("Tweened value can not be "+u(t[n]))}else if(isNaN(n))throw new Error("Tweened value can not be "+("undefined"==typeof n?"undefined":u(n)));return"function"!=typeof h&&(h=d.easeIn),l.obj=t,l.prop=n,l.start=r,l.end=i,l.duration=~~s,l.callback=h,l.playing=!1,l._pos=-1,l.autoRewind=!1,l.destroy=!1,g.add(l),l}return s(e,t),h(e,[{key:"destructor",value:function(){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destructor",this).call(this),v.delete(this),g.delete(this),this.obj=null,this.callback=null}},{key:"play",value:function(){return this.playing=!0,this.tick(0),this}},{key:"pause",value:function(){return this.playing=!1,this}},{key:"rewind",value:function(){return this._pos=-1,this}},{key:"forward",value:function(){return this._pos=this.duration,this}},{key:"stop",value:function(){return this.pause(),this.rewind(),this}},{key:"updateValue",value:function(t){return this.obj?this.obj[this.prop]=t:this.prop=t,this.emit("change",{value:t,position:(t-this.start)/(this.end-this.start)}),this}},{key:"reverse",value:function(){var t=[this.end,this.start];this.start=t[0],this.end=t[1],this.rewind(),this.play()}},{key:"tick",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(!this.playing)return!1;if(this._pos+=t,this._pos<0)return!1;if(this._pos>this.duration){if(!this.autoRewind)return this.finish();this._pos-=this.duration}var e=this.start==this.end?1*this.start:this.callback(this._pos,this.start,this.end-this.start,this.duration);return this.updateValue(e),!1}},{key:"finish",value:function(){this.stop(),this.updateValue(this.end);var t={position:1,value:this.end,cancelDestroy:!1};this.emit("finish",t),t.cancelDestroy||(this.destroy=!0)}}],[{key:"tick",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;this.cleanup(),this.flush();var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;s.tick(t)}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}},{key:"flush",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=g[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var o=r.value;v.add(o)}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}g.clear()}},{key:"cleanup",value:function(){var t=this.filter("destroy",!0);this.destroy(t)}},{key:"destroy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[].concat(i(v),i(g)),e=!0,n=!1,r=void 0;try{for(var o,a=t[Symbol.iterator]();!(e=(o=a.next()).done);e=!0){var s=o.value;s.destructor()}}catch(t){n=!0,r=t}finally{try{!e&&a.return&&a.return()}finally{if(n)throw r}}}},{key:"softDestroy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[].concat(i(v),i(g)),e=!0,n=!1,r=void 0;try{for(var o,a=t[Symbol.iterator]();!(e=(o=a.next()).done);e=!0){var s=o.value;s.destroy=!0}}catch(t){n=!0,r=t}finally{try{!e&&a.return&&a.return()}finally{if(n)throw r}}}},{key:"filter",value:function(t){for(var e=[].concat(i(v),i(g)),n=arguments.length,r=Array(n>1?n-1:0),o=1;o=0){var e=this.sequence[this.currentAnimation];e.onfinish instanceof Function&&e.onfinish({target:this}),"undefined"!=typeof e.loop&&e.loop>=0&&(this.currentAnimation=e.loop-1)}if(this.currentAnimation++,this.currentAnimation>=this.sequence.length)return this.ended=!0,void this.emit("finish");var n,r,i,o,a,s,u,h,l=this.sequence[this.currentAnimation];i=l.tweens,Array.isArray(i)||(i=[i]),n=l.duration||0,this.currentTweens=[];for(var c=null,p=0;p1;)y=y[g.shift()];v=g[0],r=o.duration,"undefined"==typeof r&&(r=n),a=o.from,"undefined"==typeof a&&(a=y[v]),s=o.to,"undefined"==typeof s&&(s=y[v]),h=o.ease||l.ease||null,u=new d.default(y,v,a,s,r,h),"undefined"!=typeof o.onchange&&u.on("change",o.onchange),"undefined"!=typeof o.onfinish&&u.on("finish",o.onfinish),u.play(),this.currentTweens.push(u),r==n&&(c=u)}this.endTimer=new f.default(function(){return t.playNext()},n)}},{key:"executeTweensMethod",value:function(t){for(var e=0;e2&&void 0!==arguments[2]&&arguments[2];_classCallCheck(this,Timer);var _this=_possibleConstructorReturn(this,(Timer.__proto__||Object.getPrototypeOf(Timer)).call(this));return _this.repeat=repeat,_this.initialTimeout=timeout,_this.timeout=timeout,_this.destroy=!1,_this.paused=!1,"string"==typeof _onend&&(_onend=function onend(){return eval(_onend)}),_onend instanceof Function&&(_this.repeat?_this.on("end",_onend):_this.on("end",_onend)),NEW_TIMERS.add(_this),_this}return _inherits(Timer,_EventDispatcher),_createClass(Timer,[{key:"destructor",value:function(){_get(Timer.prototype.__proto__||Object.getPrototypeOf(Timer.prototype),"destructor",this).call(this),TIMERS.delete(this),NEW_TIMERS.delete(this)}},{key:"tick",value:function(t){if(!this.destroy&&!this.paused&&(this.timeout-=t,this.emit("tick",{delta:t,left:this.timeout}),this.timeout<=0)){var e=-this.timeout;this.emit("end",{overtime:e}),this.repeat?(this.rewind(),this.timeout-=e):this.destroy=!0}}},{key:"rewind",value:function(){this.timeout=this.initialTimeout}},{key:"resume",value:function(){this.paused=!1}},{key:"pause",value:function(){this.paused=!0}},{key:"finish",value:function(){this.paused=!1,this.tick(this.timeout)}}],[{key:"tick",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:TIMERS;this.flush();var n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;s.tick(t)}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}this.cleanup()}},{key:"flush",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=NEW_TIMERS[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var o=r.value;TIMERS.add(o)}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}NEW_TIMERS.clear()}},{key:"cleanup",value:function(){var t=this.filter("destroy",!0);this.destroy(t)}},{key:"destroy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[].concat(_toConsumableArray(TIMERS),_toConsumableArray(NEW_TIMERS)),e=!0,n=!1,r=void 0;try{for(var i,o=t[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;a.destructor()}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}},{key:"softDestroy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[].concat(_toConsumableArray(TIMERS),_toConsumableArray(NEW_TIMERS)),e=!0,n=!1,r=void 0;try{for(var i,o=t[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;a.destroy=!0}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}},{key:"filter",value:function(t){for(var e=[].concat(_toConsumableArray(TIMERS),_toConsumableArray(NEW_TIMERS)),n=arguments.length,r=Array(n>1?n-1:0),i=1;i2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];i(this,t),this.obj=e,this.path=n,this.loop=o,r&&(this.path=a.Bezier.getCurve(n)),this.pathLen=this.getPathLen(),this.position=0,this.tween=null,this.startTimer=null}return o(t,[{key:"getPathLen",value:function(){for(var t=0,e=1,n=this.path.length;e=this.path.length)return[this.path[this.path.length-2],this.path[this.path.length-1]];if(e=s-this.path[a].x,n=u-this.path[a].y,r=Math.sqrt(e*e+n*n),i+r>=t)return[this.path[a-1],this.path[a]];i+=r,s=this.path[a].x,u=this.path[a].y}}},{key:"getCurrentPoint",value:function(){return this.getPoint(this.position)}},{key:"getPoint",value:function(t){for(var e,n,r=0,i=0,o=!0,a=0,s=this.path[0].x,u=this.path[0].y;o;){if(a++,a>=this.path.length)return{x:this.path[this.path.length-1].x,y:this.path[this.path.length-1].y};if(e=s-this.path[a].x,n=u-this.path[a].y,r=Math.sqrt(e*e+n*n),i+r>=t){var h=Math.atan2(this.path[a].y-u,this.path[a].x-s);return r=t-i,s+=Math.cos(h)*r,u+=Math.sin(h)*r,{x:s,y:u}}i+=r,s=this.path[a].x,u=this.path[a].y}}},{key:"start",value:function(t,e,n,r,i){function o(){a.position=0,a.tween&&(a.tween.stop(),a.tween.destroy=!0),a.tween=new u.default(a,"position",0,a.pathLen,t,e),a.tween.on("finish",a.updateOnFinish),a.tween.on("change",a.updateOnTween),n&&a.tween.on("finish",n),r&&a.tween.on("change",r),a.tween.play(),a.startTimer=null}var a=this;i?this.startTimer=new l.default(o,i):o()}},{key:"pause",value:function(){this.tween&&this.tween.pause(),this.startTimer&&this.startTimer.pause()}},{key:"play",value:function(){this.tween&&this.tween.play(),this.startTimer&&this.startTimer.pause()}},{key:"rewind",value:function(){this.tween&&this.tween.rewind(),this.startTimer&&this.startTimer.rewind()}},{key:"forward",value:function(){this.tween&&this.tween.forward(),this.startTimer&&(this.startTimer.pause(),this.startTimer.destroy=!0)}},{key:"stop",value:function(){this.tween&&this.tween.stop(),this.startTimer&&(this.startTimer.pause(),this.startTimer.destroy=!0)}},{key:"updateOnFinish",value:function(t){var e=t.target.obj,n=e.path[e.path.length-1];if(e.obj.x=n.x,e.obj.y=n.y,e.loop)return e.rewind(),e.play(),t.cancelDestroy=!0,!1}},{key:"updateOnTween",value:function(t){var e=t.target.obj,n=e.getCurrentPoint();e.obj.x=n.x,e.obj.y=n.y}}]),t}();e.default=f},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:.1,r=[];n/=e.length;for(var i=0;i<1+n;i+=n){i>1&&(i=1);var o=r.length;r[o]={x:0,y:0};for(var a=0;a0?1:-1}function i(t){return t/(180/Math.PI)}function o(t){return t*(180/Math.PI)}Object.defineProperty(e,"__esModule",{value:!0});var a=n(386);Object.defineProperty(e,"Vector",{enumerable:!0,get:function(){return a.Vector}});var s=n(387);Object.defineProperty(e,"Rectangle",{enumerable:!0,get:function(){return s.Rectangle}});var u=n(384);Object.defineProperty(e,"Bezier",{enumerable:!0,get:function(){return u.Bezier}}),e.sign=r,e.grad2radian=i,e.radian2grad=o},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;n(this,t),this.x=e,this.y=r}return r(t,[{key:"isZero",value:function(){return 0==this.x&&0==this.y}},{key:"clone",value:function(){return new t(this.x,this.y)}},{key:"add",value:function(t){return this.x+=t.x,this.y+=t.y,this}},{key:"subtract",value:function(t){return this.x-=t.x,this.y-=t.y,this}},{key:"mult",value:function(t){return this.x*=t,this.y*=t,this}},{key:"invert",value:function(){return this.mult(-1),this}},{key:"rotate",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new t(0,0),r=this.clone();return r.subtract(n),r.x=this.x*Math.cos(e)+this.y*Math.sin(e),r.y=this.x*-Math.sin(e)+this.y*Math.cos(e),r.add(n),this.x=r.x,this.y=r.y,this}},{key:"normalize",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new t(0,0);return this.subtract(n),this.rotate(-e),this}},{key:"getLength",value:function(){return Math.sqrt(this.x*this.x+this.y*this.y)}},{key:"distanceTo",value:function(t){var e=this.clone();return e.subtract(t),e.getLength()}}]),t}();e.Vector=i},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0}),e.Rectangle=void 0;var i=function(){function t(t,e){for(var n=0;nthis.AABB[1].x&&(this.AABB[1].x=this.vertices[n].x),this.vertices[n].ythis.AABB[1].y&&(this.AABB[1].y=this.vertices[n].y)}},{key:"move",value:function(t,e){this.center.add(new o.Vector(t,e)),this.refreshVertices()}},{key:"rotate",value:function(t){this.angle+=t,this.refreshVertices()}},{key:"hitTestPoint",value:function(t){var e=t.clone();return e.normalize(-this.angle,this.center),Math.abs(e.x)<=this.width/2&&Math.abs(e.y)<=this.height/2}},{key:"hitTestRectangle",value:function(t){var e,n,r,i=this.clone(),o=t.clone();return i.move(-this.center.x,-this.center.y),o.move(-this.center.x,-this.center.y),o.center.rotate(this.angle),i.rotate(-this.angle),o.rotate(-this.angle),e=Math.max(i.AABB[0].x,i.AABB[1].x,o.AABB[0].x,o.AABB[1].x)-Math.min(i.AABB[0].x,i.AABB[1].x,o.AABB[0].x,o.AABB[1].x),n=i.AABB[1].x-i.AABB[0].x,r=o.AABB[1].x-o.AABB[0].x,!(e>n+r)&&(e=Math.max(i.AABB[0].y,i.AABB[1].y,o.AABB[0].y,o.AABB[1].y)-Math.min(i.AABB[0].y,i.AABB[1].y,o.AABB[0].y,o.AABB[1].y),n=i.AABB[1].y-i.AABB[0].y,r=o.AABB[1].y-o.AABB[0].y,!(e>n+r)&&(i.move(-o.center.x,-o.center.y),o.move(-o.center.x,-o.center.y),i.center.rotate(o.angle),i.refreshVertices(),i.rotate(-o.angle),o.rotate(-o.angle),e=Math.max(i.AABB[0].x,i.AABB[1].x,o.AABB[0].x,o.AABB[1].x)-Math.min(i.AABB[0].x,i.AABB[1].x,o.AABB[0].x,o.AABB[1].x),n=i.AABB[1].x-i.AABB[0].x,r=o.AABB[1].x-o.AABB[0].x,!(e>n+r)&&(e=Math.max(i.AABB[0].y,i.AABB[1].y,o.AABB[0].y,o.AABB[1].y)-Math.min(i.AABB[0].y,i.AABB[1].y,o.AABB[0].y,o.AABB[1].y),n=i.AABB[1].y-i.AABB[0].y,r=o.AABB[1].y-o.AABB[0].y,e<=n+r)))}}]),t}();e.Rectangle=a},function(t,e){"use strict";function n(t){return Array.isArray(t)?t:Array.from(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n in t)if(t.hasOwnProperty(n))if(Array.isArray(t[n])){e[n]=[];for(var r=0;r2?n-2:0),i=2;i0;){var n=Math.floor(Math.random()*e);e--;var r=t[e];t[e]=t[n],t[n]=r}return t}},{key:"preventInteractiveEvent",value:function(t){return t&&t.stopPropagation&&t.stopPropagation(),!1}}]),t}()},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n=0&&this.areas.splice(e,1)}},{key:"clear",value:function(){ this.areas=[]}},{key:"contains",value:function(t,e){var n=!0,r=!1,i=void 0;try{for(var o,a=this.areas[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(s.contains(t,e))return!0}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return!1}}]),t}();e.default=i},function(t,e,n){"use strict";function r(){var t=document.getElementsByClassName("p2m-layer-screens")[0],e=document.createElement("div");t.appendChild(e),e.id="fb-root",e.style.display="inline-block",e.style.zIndex=1e3;var n=document.createElement("div");e.appendChild(n),n.className="fb-like",n.setAttribute("data-href","https://www.facebook.com/BubbleShooterWT/"),n.setAttribute("data-layout","button_count"),n.setAttribute("data-action","like"),n.setAttribute("data-size","small"),n.setAttribute("data-show-faces","false"),n.setAttribute("data-share","false"),e.style.position="relative",e.style.display="inline-block";var r=window.getComputedStyle(e).width,a=window.getComputedStyle(e).height;i(e,r,a),o.APP.layout.on("fitlayout",function(){i(e,r,a)}),"portrait"==o.APP.layout.orientation&&(e.style.display="none"),o.APP.layout.on("orientationchange",function(t){"landscape"==t.orientation?e.style.display="inline-block":e.style.display="none"})}function i(t){var e=1.0046875,n=document.getElementsByTagName("canvas")[0],r=parseInt(window.getComputedStyle(n).left),i=parseInt(window.getComputedStyle(n).width),a=.488,s=a*i,u=e-o.APP.layout.scale;t.style.left=r+s-30*u+"px";var h=parseInt(window.getComputedStyle(n).top),l=parseInt(window.getComputedStyle(n).height),f=.968,c=f*l;t.style.top=h+c-10*u+"px",t.style.transform="scale("+.8*o.APP.layout.scale+")"}Object.defineProperty(e,"__esModule",{value:!0}),e.createFbButton=void 0;var o=n(338);e.createFbButton=r},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];i(this,e);var a=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,r));return a.storage=new f.default("playtomax_"+a.id+"_data"),a.settings=new y.default,d.default.atlasScale=2,a.spineLibrary=new d.default,a.currentWindow=null,a.score=0,a.external.exec("setMixer",a.audio),a}return a(e,t),s(e,[{key:"run",value:function(){var t=this;u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"run",this).call(this),this.showFPS=!1,window.onfocus=function(){return t.resumeGame()},window.onblur=function(){return t.pauseGame()},this.timeInterval=60*this.configClient.adsInterval*1e3,this.startLevel(),document.hasFocus()?m.default.playMusic("back"):window.addEventListener("focus",this.musicOn,this),this.adTime=!1,this.changeTime=this.changeTime.bind(this),new A.default(this.changeTime,this.timeInterval)}},{key:"musicOn",value:function(){m.default.playMusic("back"),window.removeEventListener("focus",this.musicOn,this)}},{key:"closeCurrentWindow",value:function(){this.currentWindow&&(this.currentWindow.safeRemove?this.currentWindow.safeRemove():this.stage.view.removeChild(this.currentWindow),this.currentWindow=null)}},{key:"showWindow",value:function(t){this.closeCurrentWindow(),this.stage.view.addChild(t),this.currentWindow=t}},{key:"startLevel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e="StartLevel",n=this.googleActionTag(e,t);console.log("GA"+n),ga("send","event",e,n),this.showWindow(new g.default(t))}},{key:"googleActionTag",value:function(t,e){var n=e+1,r=t+"00"+n;return n>=10&&(r=t+"0"+n),r}},{key:"pauseGame",value:function(){this.pauseSounds(),PIXI.ticker.shared.stop()}},{key:"pauseSounds",value:function(){this.audio.pause()}},{key:"resumeGame",value:function(){PIXI.ticker.shared.start(),this.resumeSounds()}},{key:"resumeSounds",value:function(){!this.settings.musicEnabled||this.external.exec("setPause")?this.audio.pause():this.audio.resume()}},{key:"showAds",value:function(){this.adTime&&(this.adTime=!1,this.external.exec("showAds"),new A.default(this.changeTime,this.timeInterval))}},{key:"changeTime",value:function(){this.adTime=!0}}]),e}(h.Application);e.default=T},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.Ticker=e.Timer=e.Application=e.globals=void 0;var o=n(338),a=i(o),s=n(393),u=r(s),h=n(382),l=r(h),f=n(380),c=r(f),d=n(406),p=r(d);e.globals=a,e.Application=u.default,e.Timer=l.default,e.Ticker=c.default,e.Stage=p.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(o(this,e),l.APP){var i;return i=l.APP,a(s,i)}var s=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return s.id=t,s.config=n,s.ticker=m.default,s.library=null,s.audio=new p.AudioMixer(n.audio),s.layout=null,s.external=r||new w.default,s.storage=null,s.stages=[],s._fps=0,s._lastFPS=0,s._fpsClearTime=0,s._showFPS=!1,l.setApplication(s),s}return s(e,t),u(e,null,[{key:"getInstance",value:function(){if(!l.APP)throw new Error("You must create application instance first.");return l.APP}}]),u(e,[{key:"init",value:function(t){var e=this;this.createLayout(t),this.detectBitmapScale(),this.library=new d.AssetsLibrary("assets/images",this.layout.bitmapScale),this.addStage(),this.layout.autoFit&&this.layout.fitLayout(!0),this.layout.showPreloader(),this.layout.on("hidewindow",this.pauseAllSounds,this),this.layout.on("showwindow",this.resumeAllSounds,this),this.external.init(function(){return e.emit("ready")})}},{key:"pauseAllSounds",value:function(){this.audio.pause()}},{key:"resumeAllSounds",value:function(){this.audio.resume()}},{key:"detectBitmapScale",value:function(){this.layout.detectBitmapScale(this.config.scales)}},{key:"createLayout",value:function(t){return this.layout=new y.DOMLayout(t,this.config.size,this.config.noCheckOrientation),this.layout.on("orientationchange",this.handleOrientationChange,this),this.layout.addMobileListeners(),this.layout.autoFit=!0,this.layout}},{key:"handleOrientationChange",value:function(t){this.stage&&(t.locked?this.ticker.stop():this.ticker.start())}},{key:"resize",value:function(t,e){this.config.size.width=t,this.config.size.height=e;var n=!0,r=!1,i=void 0;try{for(var o,a=this.stages[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;s.resize(t,e)}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}this.layout.size.width=t,this.layout.size.height=e,this.layout.fitLayout(!0)}},{key:"addStage",value:function(){var t=new g.default(this.layout,this.config,this.layout.bitmapScale);this.stages.push(t)}},{key:"getStage",value:function(t){return this.stages[t]||null}},{key:"run",value:function(){this.layout.showScreens(),this.ticker.on("tick",this.tick,this)}},{key:"tick",value:function(t){this._fpsClearTime+=t.delta,this._fpsClearTime>=1e3&&(this._fpsClearTime-=1e3,this._lastFPS=this._fps,this._fps=0,this.displayFPS()),this._fps++;var e=!0,n=!1,r=void 0;try{for(var i,o=this.stages[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;a.tick(this.delta)}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}},{key:"displayFPS",value:function(){if(this.showFPS){var t=document.getElementById(A);t&&(t.innerHTML="[x"+this.layout.bitmapScale+"] FPS: "+this._lastFPS)}}},{key:"stage",get:function(){return this.stages[this.stages.length-1]||null},set:function(t){}},{key:"showFPS",get:function(){return this._showFPS},set:function(t){this._showFPS=!!t;var e=document.getElementById(A);!this._showFPS&&e&&document.body.removeChild(e),this._showFPS&&!e&&(e=document.createElement("div"),e.id=A,e.style.position="absolute",e.style.left="0",e.style.top="0",e.style.zIndex=100500,e.style.background="#000",e.style.color="#fff",e.style.padding="3px",e.innerHTML="FPS: 0",document.body.appendChild(e))}}]),e}(c.default);e.default=T},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}Object.defineProperty(e,"__esModule",{value:!0}),e.AssetsLibrary=e.loaders=void 0;var o=n(333),a=i(o),s=n(395),u=r(s);e.loaders=a,e.AssetsLibrary=u.default},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function src2name(t){var e=t.split("/");return e=e.pop(),e=e.split("."),e=e.shift()+""}Object.defineProperty(exports,"__esModule",{value:!0});var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_slicedToArray=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_createClass=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"assets/images",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:_globals.APP.layout.bitmapScale,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];_classCallCheck(this,AssetsLibrary),this.path=t,this.scale=e,this.items=new Map,this.loaded=!1,this.spriteClass=_display.Sprite,this.addAssets(n)}return _createClass(AssetsLibrary,[{key:"createLoaderQueue",value:function(t){var e=this;this.addAssets(t);var n=new _loaders.Queue,r=!0,i=!1,o=void 0;try{for(var a,s=this.items[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=_slicedToArray(a.value,2),h=(u[0],u[1]),l=new _loaders.ImageLoader(h.src);l.name=h.name||null,n.add(l)}}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n.on("fileload",function(t){var n=e.items.get(t.item.name);n.bitmap=t.item.data}),n}},{key:"addAssets",value:function(t){if("undefined"!=typeof t&&"object"==("undefined"==typeof t?"undefined":_typeof(t))){var e=!0,n=!1,r=void 0;try{for(var i,o=t[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;a.noscale="undefined"!=typeof a.noscale&&a.noscale,a.noscale||(a.src="%APP.layout.bitmapScale%/"+a.src),this.addAsset(a)}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}}},{key:"addAsset",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;if(t){var a=null,s=null;"object"==("undefined"==typeof t?"undefined":_typeof(t))&&1==arguments.length&&(e=t.name||src2name(t.src),n=~~t.width||0,r=~~t.height||0,i=~~t.frames||1,o=~~t.layers||1,a=t.spriteClass||null,s=t.properties||null,t=t.src),t=t.replace("%APP.layout.bitmapScale%","%PATH%/"+this.scale),t=t.replace("%PATH%",this.path);var u=new _Asset2.default(e,t,n,r,i,o);if(u.spriteClass=a,u.scale=this.scale,s)for(var h in s)"undefined"==typeof u[h]&&(u[h]=s[h]);return this.items.set(e,u),u}}},{key:"addObject",value:function(t){var e=this.addAsset("%APP.layout.bitmapScale%/"+t.image,t.name,t.width*this.scale,t.height*this.scale,t.frames,t.layers);return e&&(e.object=t),e}},{key:"getAsset",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.items.get(t);if(!n||!n.bitmap)throw new Error('Trying to get undefined asset "'+t+'"');if(e&&!n.ready)throw new Error('Trying to get asset "'+t+'" before it has been loaded');return n}},{key:"getSprite",value:function getSprite(name){var params=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,spriteClass=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,mc=null,asset=null;try{asset=this.getAsset(name,!0)}catch(t){asset=new _Asset2.default}return spriteClass=spriteClass||asset.spriteClass||this.spriteClass||_display.Sprite,"string"==typeof spriteClass&&(spriteClass=window[spriteClass]?window[spriteClass]:eval(spriteClass)),mc=spriteClass.create&&"function"==typeof spriteClass.create?spriteClass.create(asset,this):new spriteClass(asset.bitmap,asset.width,asset.height,asset.frames,asset.layers),params&&"object"==("undefined"==typeof params?"undefined":_typeof(params))&&Object.assign(mc,params),mc}},{key:"getBitmap",value:function(t){try{var e=this.getAsset(t,!0);return e.bitmap}catch(t){return null}}}]),AssetsLibrary}();exports.default=AssetsLibrary},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.SpineSprite=e.BitmapText=e.CompositeHitArea=e.AtlasSprite=e.Sprite=void 0;var i=n(364),o=r(i),a=n(397),s=r(a),u=n(389),h=r(u),l=n(363),f=r(l),c=n(398),d=r(c);e.Sprite=o.default,e.AtlasSprite=s.default,e.CompositeHitArea=h.default,e.BitmapText=f.default,e.SpineSprite=d.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n1?a.gotoAndPlay(0):a.gotoAndStop(0),a}return a(e,t),s(e,null,[{key:"getFramesInfo",value:function(t,e){var n=[],r=t.meta.scale?1*t.meta.scale:1,i=Object.keys(t.frames),o=!0,a=!1,s=void 0;try{for(var u,h=i[Symbol.iterator]();!(o=(u=h.next()).done);o=!0){var l=u.value;l.substr(0,e.length)==e&&n.push({name:l,frame:t.frames[l],scale:r})}}catch(t){a=!0,s=t}finally{try{!o&&h.return&&h.return()}finally{if(a)throw s}}return n}},{key:"getFrames",value:function(t,n,r){Array.isArray(t)||(t=[t]),Array.isArray(n)||(n=[n]);for(var i=[],o=0;o=0){var i={};return i[t]=n,this.view.state.addListener(i),void(r&&console.warn("Spine state does not support context for listeners"))}u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"on",this).call(this,t,n,r)}},{key:"once",value:function(t,n,r){if(d.indexOf(t)>=0)throw Error("Spine state does not support once listeners");u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"once",this).call(this,t,n,r)}},{key:"removeListener",value:function(t,n,r,i){if(d.indexOf(t)>=0){if(r&&console.warn("Spine state does not support context for listeners"),i)throw Error("Spine state does not support once listeners");var o={};return o[t]=n,void this.view.state.removeListener(o)}u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeListener",this).call(this,t,n,r,i)}},{key:"off",value:function(t,e,n,r){this.removeListener(t,e,n,r)}},{key:"removeAllListeners",value:function(){u(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"removeAllListeners",this).call(this),this.view.state.clearListeners()}},{key:"setAnimationByName",value:function(t,e,n){this.view.state.setAnimation(t,e,n),this.view.update(0)}},{key:"tick",value:function(t){this.playing&&this.view.update(t.delta/1e3)}}]),e}(c.default);e.default=p},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:void 0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;n(this,t),this.name=e+"",this.src=r+"",this.width=i,this.height=o,this.frames=a,this.layers=s,this._bitmap=null,this.texture=null,this.ready=!(!this.width||!this.height),this.spriteClass=null,this._scale=1}return r(t,[{key:"_detectSize",value:function(){if(!this.bitmap)return!1;try{this.width=~~this.width||~~this.bitmap.width||~~this.bitmap.naturalWidth||0,this.height=~~this.height||~~this.bitmap.height||~~this.bitmap.naturalHeight||0}catch(t){}return!isNaN(this.width)&&!isNaN(this.height)}},{key:"applyScale",value:function(){arguments.length>0&&void 0!==arguments[0]?arguments[0]:this._scale}},{key:"bitmap",get:function(){return this._bitmap},set:function(t){this._bitmap=t,this.texture=PIXI.Texture.fromImage(t.src),this.texture.baseTexture.resolution=this._scale,this.texture.update(),this.scale=this._scale}},{key:"scale",get:function(){return this._scale},set:function(t){t&&!isNaN(t)||(t=this._scale),this._scale=t,this.ready||this._detectSize()&&(this.frames=Math.max(1,~~this.frames),this.layers=Math.max(1,~~this.layers),this.width=Math.ceil(this.width/this.layers/this._scale),this.height=Math.ceil(this.height/this.frames/this._scale),this.ready=!0)}}]),t}();e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.AudioMixer=void 0;var i=n(401),o=r(i);e.AudioMixer=o.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),s=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;o(this,t),this.context=e,this.destination=n||e&&e.destination,this.gainNode=null,this.destination&&(this.gainNode=e.createGainNode?e.createGainNode():e.createGain(),this.gainNode.connect(this.destination)),this.channels=[],this.channelsCount=r}return s(t,[{key:"destructor",value:function(){this.channelsCount=0,this.channels=null,this.context=null,this.destination=null,this.gainNode=null}},{key:"addChannel",value:function(){var t=c.default.create(this.context,this.gainNode);return this.channels.push(t)}},{key:"hasChannel",value:function(t){return null!==t&&!isNaN(t)&&(t>=0&&t2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=null===r?this.getFreeChannel(n):this.getChannel(r);return i&&(i.stop(),i.play(t,e)),i}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.channels[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;a.stop()}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}else this.hasChannel(t)&&this.getChannel(t).stop()}},{key:"pause",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.channels[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;a.pause()}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}else this.hasChannel(t)&&this.getChannel(t).pause()}},{key:"resume",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.channels[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;a.resume()}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}else this.hasChannel(t)&&this.getChannel(t).resume()}},{key:"setVolume",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null===e?this.volume=t:this.hasChannel(e)&&(this.getChannel(e).volume=t)}},{key:"getFreeChannel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=[];return t?e=this.channels.filter(function(t){return!(t.locked||t.busy)}):(e=this.channels.filter(function(t){return!t.locked}),e.sort(function(t,e){if(!t.busy||!e.busy)return~~t.busy-~~e.busy;var n=t.playbackStatus.timeLeft/t.playbackStatus.duration,r=e.playbackStatus.timeLeft/e.playbackStatus.duration;return n<=r?-1:1})),e.shift()}},{key:"channelsCount",get:function(){return this.channels.length},set:function(t){t=~~t;for(var e=this.channels.length;e>t;){var n=this.channels.pop();n.destructor(),e--}for(;e1&&void 0!==arguments[1]?arguments[1]:"assets/sounds",n=new l.Queue,r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value,h=u.src;if(Array.isArray(h))for(var f=0;f1&&void 0!==arguments[1]?arguments[1]:1;this.channels.has(t)?this.channels.get(t).channelsCount=e:this.channels.set(t,new d(this.context,this.gainNode,e))}},{key:"hasChannel",value:function(t){return this.channels.has(t)}},{key:"getChannel",value:function(t){return y?this.channels.get(p):this.channels.get(t)}},{key:"clearChannels",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=this.channels[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var o=a(r.value,2),s=o[1];s.destructor()}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}this.channels.clear()}},{key:"play",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=this.getChannel(r);return i&&(i.stop(),i.play(t,e,n)),i}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.channels[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=a(i.value,2),u=s[1];u.stop()}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}else this.hasChannel(t)&&this.getChannel(t).stop()}},{key:"pause",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.channels[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=a(i.value,2),u=s[1];u.pause()}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}else this.hasChannel(t)&&this.getChannel(t).pause()}},{key:"resume",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.channels[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){ var s=a(i.value,2),u=s[1];u.resume()}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}else this.hasChannel(t)&&this.getChannel(t).resume()}},{key:"setVolume",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null===e?this.volume=t:this.hasChannel(e)&&(this.getChannel(e).volume=t)}},{key:"singleChannelMode",get:function(){return y}},{key:"volume",get:function(){return this.gainNode?this.gainNode.gain.value:1},set:function(t){if(t=t&&!isNaN(t)?Math.max(0,Math.min(1,t)):0,this.gainNode)this.gainNode.gain.value=t;else{var e=!0,n=!1,r=void 0;try{for(var i,o=this.channels[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var s=a(i.value,2),u=s[1];u.volume=t}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}}}]),t}();e.default=v},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(){}function h(t){return t?t.currentTime:(new Date).getTime()}Object.defineProperty(e,"__esModule",{value:!0});var l=function t(e,n,r){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,n);if(void 0===i){var o=Object.getPrototypeOf(e);return null===o?void 0:t(o,n,r)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(r)},f=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;s(this,t),this.context=e,this.duration=n,this.started=NaN,this.durationPlayed=0}return f(t,[{key:"destructor",value:function(){this.context=null}},{key:"reset",value:function(){this.started=NaN,this.durationPlayed=0}},{key:"play",value:function(){this.started=h(this.context)}},{key:"stop",value:function(){this.reset()}},{key:"pause",value:function(){this.isPlaying&&(this.durationPlayed+=h(this.context)-this.started),this.started=NaN}},{key:"resume",value:function(){this.isPlaying||this.play()}},{key:"currentPosition",get:function(){var t=0;if(this.isPlaying&&this.duration>0)for(t+=h(this.context)-this.started;t>this.duration;)t-=this.duration;return Math.max(0,t)}},{key:"timeLeft",get:function(){return this.duration-this.currentPosition}},{key:"isPlaying",get:function(){return!isNaN(this.started)}}]),t}(),m=function(t){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;s(this,e);var n=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return n.context=t,n.playbackStatus=new x(t),n.disabled=!1,n.locked=!1,n.audioWrapper=null,n.startPlayTime=0,n}return a(e,t),f(e,null,[{key:"create",value:function(){for(var t=arguments.length,e=Array(t),n=0;n1&&void 0!==arguments[1]&&arguments[1];if(!l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"createNewAudio",this).call(this,t,n))return!1;this.audioWrapper&&this.audioWrapper.removeEventListener("ended",this.controlPlay,!1);var r=y.CACHE.get(t);if(!r)throw Error('Playing sound without preloading "'+t+'"');return this.audioWrapper=r.cloneNode(!0),this.audioWrapper.loop=!1,this.audioWrapper.doLoop=!!n,this.playbackStatus.duration=this.duration,this.audioWrapper.addEventListener("ended",this.controlPlay,!1),this.audioWrapper}},{key:"play",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.createNewAudio(t,n)&&l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"play",this).call(this,t,n)&&this.playWrapper()}},{key:"playWrapper",value:function(){if(this.audioWrapper){var t=this.audioWrapper.play();t&&"undefined"!=typeof window.Promise&&t instanceof Promise&&t.catch(u)}}},{key:"stop",value:function(){if(l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"stop",this).call(this))try{return this.audioWrapper.pause(),this.audioWrapper.currentTime=0,this.audioWrapper=null,!0}catch(t){return!1}}},{key:"pause",value:function(){if(l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"pause",this).call(this))try{this.audioWrapper.pause()}catch(t){}}},{key:"resume",value:function(){console.log("HTMLAudioChannel resume()"),l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"resume",this).call(this)&&(console.log("AudioChannel resume()"),this.playWrapper())}},{key:"position",get:function(){return this.audioWrapper&&1e3*this.audioWrapper.currentTime||0}},{key:"duration",get:function(){return this.audioWrapper&&1e3*this.audioWrapper.duration||0}},{key:"volume",get:function(){return this.audioWrapper&&this.audioWrapper.volume||0},set:function(t){this.audioWrapper&&(this.audioWrapper.volume=Math.max(0,Math.min(1,t)))}}]),e}(m),w=function(t){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.destination;s(this,e);var r=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return r.context=t,r.destination=n,r.gainNode=r.context.createGainNode?r.context.createGainNode():r.context.createGain(),r.gainNode.connect(r.destination),r.controlPlay=c.Utils.proxy(r.controlPlay,r),r.waCheckInterval=null,r}return a(e,t),f(e,[{key:"destructor",value:function(){this.waCheckInterval&&clearInterval(this.waCheckInterval),this.gainNode&&this.gainNode.disconnect(),this.audioWrapper&&(this.audioWrapper.onended=null,this.audioWrapper.disconnect()),this.waCheckInterval=null,this.audioWrapper=null,this.gainNode=null,this.context=null,this.destination=null,l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"destructor",this).call(this)}},{key:"controlPlay",value:function(){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"controlPlay",this).call(this),!this.audioWrapper&&this.waCheckInterval&&(clearInterval(this.waCheckInterval),this.waCheckInterval=null)}},{key:"createNewAudio",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.audioWrapper)try{this.audioWrapper.disconnect(),this.audioWrapper.onended=null}catch(t){}return!!l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"createNewAudio",this).call(this)&&(!!this.context&&(this.audioWrapper=this.context.createBufferSource(),this.audioWrapper.doLoop=!!n,this.audioWrapper.loop=!!n,this.audioWrapper.connect(this.gainNode),this.audioWrapper.buffer=y.CACHE.get(t),this.playbackStatus.duration=this.duration,this.audioWrapper))}},{key:"play",value:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.createNewAudio(t,r)&&l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"play",this).call(this,t,r)&&(this.audioWrapper.noteOn?this.audioWrapper.noteOn(0):this.audioWrapper.start(0),"undefined"!=typeof this.audioWrapper.playbackState?this.waCheckInterval=setInterval(function(){n.audioWrapper&&n.audioWrapper.playbackState!=n.audioWrapper.FINISHED_STATE||n.controlPlay()},100):this.audioWrapper.onended=this.controlPlay)}},{key:"stop",value:function(){if(l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"stop",this).call(this))try{return this.audioWrapper.noteOff?this.audioWrapper.noteOff(0):this.audioWrapper.stop(0),!0}catch(t){return!1}}},{key:"pause",value:function(){if(l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"pause",this).call(this))try{this.audioWrapper.disconnect()}catch(t){}}},{key:"resume",value:function(){if(l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"resume",this).call(this))try{this.audioWrapper.connect(this.destination)}catch(t){}}},{key:"position",get:function(){return this.playbackStatus.currentPosition}},{key:"duration",get:function(){return this.audioWrapper&&this.audioWrapper.buffer&&this.audioWrapper.buffer.duration||0}},{key:"volume",get:function(){return this.gainNode.gain.value},set:function(t){this.gainNode.gain.value=Math.max(0,Math.min(1,t))}}]),e}(m);e.default=m},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.LoaderUI=e.FullScreen=e.DOMLayout=void 0;var i=n(355),o=r(i),a=n(404),s=r(a),u=n(405),h=r(u);e.DOMLayout=s.default,e.FullScreen=h.default,e.LoaderUI=o.default},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(){window.scrollTo(0,0)}Object.defineProperty(e,"__esModule",{value:!0}),e.ORIENTATION=void 0;var h=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),l=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{width:960,height:640},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];s(this,e);var a=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));if(a.size=r,a.noCheckOrientation=!!i,a.calculatedSize={width:r.width,height:r.height,screenWidth:r.width,screenHeight:r.height,scale:1},a.bitmapScale=1,a._lastOrientation=null,a._lastViewport={width:null,height:null},a.align={horizontal:d.ALIGN.CENTER,vertical:d.VALIGN.MIDDLE},a.margin=[0,0,0,0],a.screens=[],t=t instanceof HTMLElement&&t||document.querySelector(t),!(t instanceof HTMLElement))throw new Error("Invalid layout container");return t.parentNode===document.body&&(t.parentNode.style.overflow="hidden"),a.container=t,a.container.className="p2m-layout",Object.assign(a.container.style,{position:"absolute",overflow:"hidden"}),a.addLayers("screens","preloader","p2l"),a.initP2L({css:{display:"none"}}),a._domMarkElement=null,window.parent==window&&y.ANDROID&&y.FIREFOX&&(a._domMarkElement=a.container.appendChild(document.createElement("div")),Object.assign(a._domMarkElement.style,{position:"fixed",right:"0px",bottom:"0px",width:"2px",height:"2px",background:"transparent",zIndex:"100000"})),a.fitLayout(!0),a.autoFit=!0,a._autoFill=!1,n=a,o(a,n)}return a(e,t),l(e,[{key:"detectBitmapScale",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[1],e=1;if(t=t.slice(0),t.sort(),(!y.IOS||y.IPHONE4)&&t.length>1){var n=window.devicePixelRatio||1;n=1;var r,i,o=screen.width*n,a=screen.height*n;this.size.width>this.size.height?(r=Math.max(o,a),i=Math.min(o,a)):(r=Math.min(o,a),i=Math.max(o,a));var s=[],u=!0,h=!1,l=void 0;try{for(var f,c=t[Symbol.iterator]();!(u=(f=c.next()).done);u=!0){var d=f.value;s.push({scale:d,coef:this.size.width*d/o*(this.size.height*d/a)})}}catch(t){h=!0,l=t}finally{try{!u&&c.return&&c.return()}finally{if(h)throw l}}var p=Number.MAX_VALUE;e=t[0];var v=!0,g=!1,x=void 0;try{for(var m,b=s[Symbol.iterator]();!(v=(m=b.next()).done);v=!0){d=m.value;var w=Math.abs(d.coef-1);w0&&void 0!==arguments[0]?arguments[0]:0;return this.screens[t]}},{key:"initP2L",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.image,n=void 0===e?g.P2L:e,r=(t.color,t.css),i=void 0===r?{}:r,o=this.container.querySelector(".p2m-layer-p2l");o&&(Object.assign(o.style,{backgroundColor:"rgba(255, 255, 255, 1)",backgroundSize:"30%",backgroundImage:"url('"+n+"')",backgroundRepeat:"no-repeat",backgroundPosition:"center center"}),Object.assign(o.style,i||{}))}},{key:"showPreloader",value:function(){this.getLayer("screens").style.display="none",this.getLayer("preloader").style.display="block"}},{key:"showScreens",value:function(){this.getLayer("preloader").style.display="none",this.getLayer("screens").style.display="block"}},{key:"_getLayoutRect",value:function(t){var e=isNaN(this.margin)?this.margin||[0]:[this.margin],n=h(e,4),r=n[0],i=n[1],o=void 0===i?r:i,a=n[2],s=void 0===a?r:a,u=n[3],l=void 0===u?o:u,f={left:l,top:r,width:t.width-(l+o),height:t.height-(r+s)};return f}},{key:"fitLayout",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.viewport;if(!t&&this._lastViewport.width===e.width&&this._lastViewport.height===e.height)return!1;Object.assign(this._lastViewport,e);var n=this._getLayoutRect(e);this.checkOrientation(e),this.scale=Math.min(n.width/this.size.width,n.height/this.size.height);var r={left:0,top:0,width:Math.floor(this.size.width*this.scale),height:Math.floor(this.size.height*this.scale)},i=this.align,o=i.horizontal,a=i.vertical;o==d.ALIGN.LEFT&&(o=0),o==d.ALIGN.CENTER&&(o=.5),o==d.ALIGN.RIGHT&&(o=1),r.left=!o||isNaN(o)?0:(n.width-r.width)*o,a==d.VALIGN.TOP&&(a=0),a==d.VALIGN.MIDDLE&&(a=.5),a==d.VALIGN.BOTTOM&&(a=1),r.top=!a||isNaN(a)?0:(n.height-r.height)*a;var s={width:this.size.width,height:this.size.height};this.autoFill&&(r.width0&&void 0!==arguments[0]?arguments[0]:this.viewport;if(!y.MOBILE)return!1;var e=t.width/t.height,n=this.size.width/this.size.height;if(1/0===e||1/0===n)return!1;if(1===e||1===n)return!1;var r=e>1;if(this._lastOrientation===r)return!1;this._lastOrientation=r;var i=n>1^r;return this.noCheckOrientation?(this.p2l=!1,i=!1):(this.p2l=i,i?this.emit("lockscreen"):this.emit("unlockscreen")),this.emit("orientationchange",{locked:i,orientation:e>1?w.LANDSCAPE:w.PORTRAIT}),i}},{key:"refreshScreen",value:function(t){this.getScreen(t).refresh=!0}},{key:"tick",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=this.screens[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;a.tick(t)}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}},{key:"autoFill",get:function(){return this._autoFill},set:function(t){this._autoFill=!!t,this.fitLayout(!0)}},{key:"windowVisible",get:function(){return!x}},{key:"scale",get:function(){return T},set:function(t){T=t}},{key:"windowRect",get:function(){var t={width:window.innerWidth||screen.width,height:window.innerHeight||screen.height};return this._domMarkElement&&(t.height=this._domMarkElement.offsetTop+this._domMarkElement.offsetHeight),t}},{key:"orientation",get:function(){var t=y.MOBILE?this.windowRect:this.size;return t.width>t.height?w.LANDSCAPE:w.PORTRAIT}},{key:"autoFit",get:function(){return!!m},set:function(t){var e=this;!!t!=this.autoFit&&(clearInterval(m),m=null,t&&(m=setInterval(function(){return e.fitLayout()},500)))}},{key:"viewport",get:function(){if(b)return b;var t=this.container&&this.container.parentNode;return t?t===document.body?this.windowRect:{width:t.clientWidth,height:t.clientHeight}:this.windowRect},set:function(t){b=t}},{key:"p2l",get:function(){var t=this.getLayer("p2l");return t&&"none"!==t.style.display},set:function(t){var e=this.getLayer("p2l");e&&(e.style.display=t?"block":"none")}}]),e}(c.default);e.ORIENTATION=w,e.default=E},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:!this.active;return!!this.enabled&&void(e?this.activate(t):this.cancel())}},{key:"enabled",get:function(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}},{key:"active",get:function(){return!!this.enabled&&!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)},set:function(t){return!!this.enabled&&void this.toggle(document.documentElement,!!t)}}]),t}();e.default=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;i(this,e);var s=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));s.config=f.Utils.clone(n),s.layout=t,s.screen=t.addScreen();var u={view:s.screen.canvas,resolution:r,transparent:void 0==n.transparentStage||n.transparentStage};return a==PIXI.RENDERER_TYPE.WEBGL?s.renderer=new PIXI.WebGLRenderer(n.size.width,n.size.height,u):a==PIXI.RENDERER_TYPE.CANVAS?s.renderer=new PIXI.CanvasRenderer(n.size.width,n.size.height,u):s.renderer=PIXI.autoDetectRenderer(n.size.width,n.size.height,u),s.layout.on("fitlayout",function(t){s.layout.autoFill&&s.resize(t.screenWidth,t.screenHeight)}),s.view=new d.default,s.viewAlign={x:l.ALIGN.CENTER,y:l.VALIGN.MIDDLE},s.autoRender=!0,s.alignView(),s}return a(e,t),s(e,[{key:"alignView",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.viewAlign.x,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.viewAlign.y;this.viewAlign.x=t,this.viewAlign.y=e;var n=0,r=0,i=this.screen.canvas.width/this.layout.bitmapScale,o=this.screen.canvas.height/this.layout.bitmapScale;t==l.ALIGN.CENTER&&(n=i/2),t==l.ALIGN.RIGHT&&(n=i),e==l.VALIGN.MIDDLE&&(r=o/2),e==l.VALIGN.BOTTOM&&(r=o),this.view.position.set(n,r)}},{key:"resize",value:function(t,e){this.renderer.resize(t,e),this.alignView()}},{key:"render",value:function(){this.renderer.render(this.view)}},{key:"tick",value:function(t){this.autoRender&&this.render()}}]),e}(h.default);e.default=p},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"assets/spine",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];i(this,t),this.path=e,this.items=new Map,this.loaded=!1,this.textureAutoSufix=!0,this.addItems(n)}return a(t,[{key:"addItems",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!0,n=!1,r=void 0;try{for(var i,o=t[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;this.items.set(a,{name:a,data:null})}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}},{key:"createLoaderQueue",value:function(t){this.addItems(t);var e=new u.Queue,n=!0,r=!1,i=void 0;try{for(var a,s=this.items[Symbol.iterator]();!(n=(a=s.next()).done);n=!0){var h=o(a.value,1),l=h[0],f=new u.SpineLoader(this.path+"/"+l);f._spineName=l,e.add(f)}}catch(t){r=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(r)throw i}}return e.on("fileload",this.prepareSpineData,this),e}},{key:"detectAtlasScale",value:function(){if(f)return f;var t=-1,e=!0,n=!1,r=void 0;try{for(var i,o=s.APP.config.scales[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;a>t&&(t=a)}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}return t}},{key:"prepareSpineData",value:function(t){var e=this,n=s.APP.layout.bitmapScale,r=-1,i=t.item.data.atlas,o=t.item.data.config,a=t.item._spineName,u=[],h=new PIXI.spine.core.TextureAtlas(i,function(t,n){var o=t.split(".");o.pop();var h=o.join(".");e.textureAutoSufix&&(o=a.split("/"),o.length>1&&(o.pop(),h=o.join("/")+"/"+h));var l=s.APP.library.getAsset(h).texture.baseTexture;r<0&&(r=e.detectAtlasScale(i,l)),l.resolution=r,u.push(l),n(l)}),l=!0,f=!1,c=void 0;try{for(var d,p=u[Symbol.iterator]();!(l=(d=p.next()).done);l=!0){var y=d.value;y.resolution=n}}catch(t){f=!0,c=t}finally{try{!l&&p.return&&p.return()}finally{if(f)throw c}}var v=new PIXI.spine.core.SkeletonJson(new PIXI.spine.core.AtlasAttachmentLoader(h)),g=v.readSkeletonData(o);this.items.set(a,{name:a,data:g})}},{key:"getData",value:function(t){var e=this.items.get(t);if(!e)throw Error("Spine data "+t+" not found");return e.data}},{key:"getSprite",value:function(t){return new l.default(this.getData(t))}}],[{key:"atlasScale",get:function(){return f},set:function(t){f=t}}]),t}();e.default=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];if(o.APP.settings.soundsEnabled&&!o.APP.iPadMini&&!o.APP.audio.singleChannelMode)return o.APP.audio.getChannel("fx").play(t,e)}}]),t}();e.default=a},function(t,e,n){ "use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function o(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:0;a(this,e);var n=s(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return q&&q.safeRemove(),q=n,n.interval=f.APP.configClient.firstNewLineTime,n.firstNewLine=!0,f.APP.settings.lastLevel=t,f.APP.settings.save(),n.interactiveBack=null,n.bubblesContainer=null,n.levelId=t,n.config=T.default[t],n.loseLevelAnalyticTagSent=!1,n.lineSpeed=rt*n.config.speed,n.newLineTimeout=0,n.timeforNewLine=n.interval/n.lineSpeed,n.criticalTime=n.timeforNewLine-f.APP.configClient.shakeInDangerousZone,n.criticalInterval=n.interval*f.APP.configClient.shakeInDangerousZone/n.timeforNewLine,n.timesLoseShake=Math.floor((f.APP.configClient.shakeInDangerousZone-50)/100),n.timesMoveFirstLines=Math.ceil((f.APP.configClient.shakeFirstLine-140)/240),n.compressedLines=0,n.press=null,n.linesShifted=J,n.bubblesForRemove=[],n.field=new O.default,n.animArray=[],n.animations=null,n.riskAnim=!1,n.locked=!1,n.paused=!1,n.fieldModified=!1,n.currentBubble=null,n.currentBubbleMoveAngle=0,n.currentBubbleMoveSpeed=f.APP.configClient.fireSpeed,n.hitField=null,n.slingshot=null,n.basket=null,n.linesYShift=0,n.block=null,n.createChildren(),n.visibleLines=f.APP.configClient.initialLines[n.levelId],n.fillField(),n.shownLines=0,n.slingshot.addBubble(),n.basket.addBubble(),f.APP.ticker.on("tick",n.tick,n),n.score=f.APP.score,n.startLevelScore=n.score,n.levelTime=0,n.ui=n.addChild(new N.default),n.ui.zIndex=1e6,n.endMoveNeighbour=n.endMoveNeighbour.bind(n),n.fallLoseBubbles=n.fallLoseBubbles.bind(n),n.updateScoreNumber(),n.shakeAnim=!1,n.lose=!1,n.plX=0,n.plY=0,n}return u(e,t),h(e,[{key:"updateScoreNumber",value:function(){this.ui.scoreText.write(f.APP.score)}},{key:"checkCriticalTime",value:function(){this.newLineTimeout+this.criticalInterval>=this.interval+200&&this.playLoseAnimation()}},{key:"addNewLine",value:function(){var t=this.isLineShifted(0)?H:Y;if(this.linesShifted=this.linesShifted==Z?J:Z,this.field.addLine(),this.shownLines+f.APP.configClient.initialLines[this.levelId]r.y-C.default.radius)return void this.trajectory.hide();var i=Math.atan2(n.y-this.slingshot.y,n.x-this.slingshot.x);if(i<=-Math.PI/9&&i>=8*-Math.PI/9){this.rotateGun(n.x,n.y);var o=_.default.getCurrentBubbleCoords();this.trajectory.show(n.x,n.y,o.x,o.y)}else this.trajectory.hide()}},{key:"drawHintKeyboard",value:function(t){"37"==t.keyCode||"100"==t.keyCode?this.plX-=25:"39"!=t.keyCode&&"102"!=t.keyCode||(this.plX+=25);var e=(_.default.getCurrentBubbleCoords(),Math.atan2(0-this.slingshot.y,this.plX-this.slingshot.x));if(e<=-Math.PI/9&&e>=8*-Math.PI/9){this.rotateGun(this.plX,this.plY);var n=_.default.getCurrentBubbleCoords();this.trajectory.show(this.plX,this.plY,n.x,n.y)}else this.trajectory.hide()}},{key:"rotateGun",value:function(t,e){var n=_.default.normalizeAngle(Math.atan2(e-this.slingshot.y,t-this.slingshot.x));this.slingshot.rotation=n+Math.PI/2}},{key:"fire",value:function(t){if(!this.paused&&!this.locked){this.trajectory.hide();var n={};t.keyCode?(n.x=this.plX,n.y=this.plY):n=e.getLocalEventCoords(t);var r=_.default.getCurrentBubbleCoords();n.y>r.y-C.default.radius||(this.currentBubbleMoveAngle=_.default.normalizeAngle(Math.atan2(n.y-this.slingshot.y,n.x-this.slingshot.x)),this.currentBubbleMoveAngle&&(this.locked=!0,this.currentBubble=this.slingshot.bubble.clone(),this.currentBubble.zIndex=5,this.currentBubble.position.set(r.x,r.y),this.bubblesContainer.addChild(this.currentBubble),this.slingshot.removeBubble(),this.slingshot.addBubble(this.basket.bubble.clone()),this.slingshot.playAnimation(),this.basket.removeBubble(),this.basket.addBubble(),M.default.playFx("shoot")))}}},{key:"checkBubbleCollision",value:function(t){var e=this.getNeighborsMatrix(t.fieldY),n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value,u=this.field.getBubble(t.fieldX+s.x,t.fieldY+s.y);if(u&&u.hitTest(t))return u}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return null}},{key:"moveBubble",value:function(t,e){t.x+=Math.cos(e),t.y+=Math.sin(e);var n=t.getFieldCoordsByPosition();t.fieldX=n.x,t.fieldY=n.y,t.x+C.default.radius>et&&(t.x=et-C.default.radius,e=3*Math.PI-e),t.x-C.default.radius0&&(a+=this.compressedLines*C.default.placeHeight+this.linesYShift),t.y-C.default.radius=G)return void(this.locked=!0);var e=this.field.addBubble(t.x,t.y,this.currentBubble);this.currentBubble&&this.currentBubble.updatePosition();var n=this.getBubbleNeighbors(this.currentBubble,!0);n.length>=3?(this.moveNeighbours(n),this.addMathesInScore(n.length),this.updateScoreNumber(),this.explodeBubbles(n),this.bubblesForRemove=n,this.fieldModified=!0):(t.y>=G-1&&this.showQuickLose(),this.moveNeighbours([e]),this.trajectory.show()),this.currentBubble=null,this.locked=!1}},{key:"explodeBubbles",value:function(t){var e=!0,n=!1,r=void 0;try{for(var i,o=t[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;this.animations.explodeBubble(a)}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}}},{key:"getMovingNeighbors",value:function(t){for(var e=[],n=0;n=f.APP.configClient.totalLines[this.levelId]&&this.field.isEmpty()&&!this.lose&&this.compressedLines<10){this.createFieldBlock(),this.showWin();var r=this.googleActionTag(t,this.levelId);return console.log("GA"+r),ga("send","event",t,r),!0}return!1}},{key:"googleActionTag",value:function(t,e){var n=e+1,r=t+"00"+n;return n>=10&&(r=t+"0"+n),r}},{key:"showWin",value:function(){this.trajectory.hide(),this.updateScoreNumber(),this.locked=!0,this.paused=!0,f.APP.settings.lastLevel=t;n--)for(var r=0;r0||this.textYouWin||!this.block||(this.ui.showWinBoard(),this.block.safeRemove(),this.block=null)}},{key:"showWinText",value:function(){var t=this;this.trajectory.hide(),this.hitField.off("pointermove",this.handlerMouseMove,this),this.hitField.off("pointerup",this.handlerMouseMove,this);var n=[[280,-140],[280,-20],[-280,-140],[-280,-20],[280,-80],[-280,-80]];this.textYouWin=this.interactiveBack.addChild(f.APP.library.getSprite("you_win")),this.textYouWin.position.set(0,-80),this.textYouWin.scale.set(0);for(var r=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:this.timesLoseShake;if(!this.shakeAnim){this.shakeAnim=!0;var e=[];e.push({tweens:[{prop:"x",from:0,to:-5}],duration:25});for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.bubblesContainer,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.timesMoveFirstLines;if(t){var n=t.x,r=[];r.push({tweens:[{prop:"x",to:n+2}],duration:200});for(var i=0;i<=e;i++)r.push({tweens:[{prop:"x",from:n-2,to:n+2}],duration:200}),r.push({tweens:[{prop:"x",from:n+2,to:n-2}],duration:200});r.push({tweens:[{prop:"x",from:n-2,to:n}],duration:100}),this.secFirstRow=new m.default(t,r),this.secFirstRow.play(),this.secFirstRow.on("finish",this.addNewLine,this)}}},{key:"removeBubbles",value:function(){if(this.bubblesForRemove.length){for(var t=0;th&&(h=y.position.x)}}catch(t){f=!0,c=t}finally{try{!l&&p.return&&p.return()}finally{if(f)throw c}}var v=u+(h-u)/2,g=Math.abs(h-u)/2,x=1.5*g;x>200&&(x=200);var b=!0,A=!1,T=void 0;try{for(var E,O=s[Symbol.iterator]();!(b=(E=O.next()).done);b=!0){var S=E.value,M=S.clone();M.zIndex=10,this.bubblesContainer.addChild(M),M.position.set(S.position.x,S.position.y);var P=g?(S.position.x-v)/g:0;P+=.3*Math.random()-.15;var R=W.default.size.height/2+C.default.radius,I=(R-S.position.y,S.position.x+x*P),k=S.position.x+x*P/2,_=S.position.y-25-15*Math.random(),L=[{tweens:[{prop:"x",from:S.x,to:k,ease:w.linear.easeOut},{prop:"y",to:_,ease:w.quadratic.easeOut}],duration:200},{tweens:[{prop:"x",from:k,to:I,ease:w.linear.easeIn},{prop:"y",to:R,ease:w.quadratic.easeIn}],duration:500*((R-_)/R),onfinish:e.removeBubbleAfterAnim}],j=new m.default(M,L);j.play()}}catch(t){A=!0,T=t}finally{try{!b&&O.return&&O.return()}finally{if(A)throw T}}}}catch(t){r=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}}},{key:"getNeighborsMatrix",value:function(t){var e=void 0;return e=this.isLineShifted(t)?[{x:0,y:1},{x:1,y:1},{x:-1,y:0},{x:1,y:0},{x:0,y:-1},{x:1,y:-1}]:[{x:-1,y:1},{x:0,y:1},{x:-1,y:0},{x:1,y:0},{x:-1,y:-1},{x:0,y:-1}]}},{key:"getBubbleNeighbors",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(n.indexOf(t)>=0)return n;n.push(t);for(var r=this.getNeighborsMatrix(t.fieldY),i=0;ithis.interval&&(this.shakeAnim?this.addNewLine():this.playFirstRowShakeAnimation(),this.newLineTimeout=0)}},{key:"tick",value:function(t){if(this.animations.tick(t),!this.paused){if(this.levelTime+=t.delta,this.countTimeAddLine(t),this.currentBubble)for(var e=this.currentBubbleMoveSpeed*(t.delta/1e3),n=0;n0?this.bubblesForRemove.length<=3?M.default.playFx("explosion_3"):M.default.playFx("explosion_6"):M.default.playFx("sticking");break}}if(this.removeBubbles(),this.shownLines+f.APP.configClient.initialLines[this.levelId]=this._iteratorList.length?(this._iteratorIx=-1,this._iteratorList=null,{done:!0}):{value:this._iteratorList[this._iteratorIx],done:!1}}},{key:"isEmpty",value:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=this.data[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var o=r.value,a=!0,s=!1,u=void 0;try{for(var h,l=o[Symbol.iterator]();!(a=(h=l.next()).done);a=!0){var f=h.value;if(f)return!1}}catch(t){s=!0,u=t}finally{try{!a&&l.return&&l.return()}finally{if(s)throw u}}}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}return!0}},{key:"isFilled",value:function(){var t=this.data[this.data.length-1],e=!0,n=!1,r=void 0;try{for(var i,o=t[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){var a=i.value;if(a)return!0}}catch(t){n=!0,r=t}finally{try{!e&&o.return&&o.return()}finally{if(n)throw r}}return!1}},{key:"addLine",value:function(){this.data.unshift([]),this.data.splice(this.height-1,1)}},{key:"addBubble",value:function(t,e,n){return this.data[e][t]&&(console.warn("field corrupted",t,e),this.data[e][t].safeRemove()),n.fieldX=t,n.fieldY=e,this.data[e][t]=n}},{key:"removeBubble",value:function(t,e){this.data[e][t]=null}},{key:"getLine",value:function(t){return this.data[t]}},{key:"getBubble",value:function(t,e){return this.data[e]?this.data[e][t]:null}},{key:"clear",value:function(){this.data=[];for(var t=0;t2*d||n>2*d)&&Math.sqrt(Math.pow(e,2)+Math.pow(n,2))<=2*d*.8}},{key:"clone",value:function(){return new e(this.color)}}],[{key:"radius",get:function(){return d}},{key:"placeHeight",get:function(){return y}},{key:"placeWidth",get:function(){return p}},{key:"yShift",get:function(){return v}}]),e}(l.default);e.default=g},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:null;if(this.bubble&&this.bubble.safeRemove(),!t){var e=p.default.instance.getAvailableColors(),n=e[Math.floor(Math.random()*e.length)];t=new c.default(n)}this.bubble=t,this.bubbleNull.addChild(this.bubble),this.bubble.scale.set(.3),this.bubble.scaleTo(1,250)}},{key:"removeBubble",value:function(){this.bubble&&this.bubble.safeRemove(),this.bubble=null}},{key:"swapBubble",value:function(t){this.bubble.safeRemove(),this.bubble=new c.default(t),this.bubbleNull.addChild(this.bubble),this.bubbleNull.position.set(0,-26),this.bubble.scale.set(.3),this.bubble.scaleTo(1,250)}}],[{key:"normalizeAngle",value:function(t){for(;t<0;)t+=2*Math.PI;for(;t>2*Math.PI;)t-=2*Math.PI;var e=Math.PI/2*3,n=e-Math.PI/180*70,r=e+Math.PI/180*70;return(t>r||t=10&&(r=t+"0"+n),r}}]),e}(d.default);e.default=b},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";i(this,e);var a=o(this,(e.__proto__||Object.getPrototypeOf(e)).call(this)),s=new l.default;if(a.addChild(s),a.viewOn=a.addChild(u.APP.library.getSprite("ui/settings/slider")),a.viewOff=a.addChild(u.APP.library.getSprite("ui/settings/off")),s.width=a.viewOn.width,s.height=a.viewOn.height,n){var h=a.addChild(new c.default(p.default.font,u.APP.library.getAsset("fonts/font")));h.write(n),h.position.set(20,-3),h.align=u.ALIGN.LEFT,h.valign=u.VALIGN.MIDDLE,h.scale.set(.75),s.width+=20+.75*h.getWidth()}return a._checked=t,a.value=r,a.update(),a}return a(e,t),s(e,[{key:"update",value:function(){this.viewOn.visible=this._checked,this.viewOff.visible=!this._checked}},{key:"checked",get:function(){return this._checked},set:function(t){this._checked=!!t,this.update()}}]),e}(l.default);e.default=y},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n1))break;if(o=d.angle,l++,l>=g&&(a.push({x:this.bubble.x,y:this.bubble.y,changeAngleCnt:h}),l=0),d.done)break}for(var p=0,y=0,x=0;x0&&(y++,y>=5)));x++)p++;this.previousX1=this.x1,this.previousY1=this.y1,this.previousPlayerX=t,this.previousPlayerY=n,this.zIndex=1}}},{key:"hide",value:function(){for(var t=this.dots.length,e=0;e=0&&"warning"===t?console.warn(e):["info","warning","error"].indexOf(f)>=0&&"error"===t?console.error(e):void 0}function r(){u?(e("info","[WDS] App hot update..."),window.postMessage("webpackHotUpdate"+l,"*")):(e("info","[WDS] App updated. Reloading..."),window.location.reload())}var i,o=n(438),a=n(445),s=n(447);i=o.parse(t.substr(1));var u=!1,h=!0,l="",f="info",c={hot:function(){u=!0,e("info","[WDS] Hot Module Replacement enabled.")},invalid:function(){e("info","[WDS] App updated. Recompiling...")},hash:function(t){l=t},"still-ok":function(){e("info","[WDS] Nothing changed.")},"log-level":function(t){f=t},ok:function(){return h?h=!1:void r()},warnings:function(t){e("info","[WDS] Warnings while compiling.");for(var n=0;n",'"',"`"," ","\r","\n","\t"],p=["{","}","|","\\","^","`"].concat(d),y=["'"].concat(p),v=["%","/","?",";","#"].concat(y),g=["/","?","#"],x=255,m=/^[+a-z0-9A-Z_-]{0,63}$/,b=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,w={javascript:!0,"javascript:":!0},A={javascript:!0,"javascript:":!0},T={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},E=n(442);r.prototype.parse=function(t,e,n){if(!h.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var r=t.indexOf("?"),i=r!==-1&&r127?"x":L[D];if(!j.match(m)){var F=k.slice(0,M),U=k.slice(M+1),B=L.match(b);B&&(F.push(B[1]),U.unshift(B[2])),U.length&&(s="/"+U.join(".")+s),this.hostname=F.join(".");break}}}this.hostname.length>x?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=u.toASCII(this.hostname));var V=this.port?":"+this.port:"",X=this.hostname||"";this.host=X+V,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!w[p])for(var M=0,_=y.length;M<_;M++){var W=y[M];if(s.indexOf(W)!==-1){var q=encodeURIComponent(W);q===W&&(q=escape(W)),s=s.split(W).join(q)}}var G=s.indexOf("#");G!==-1&&(this.hash=s.substr(G),s=s.slice(0,G));var H=s.indexOf("?");if(H!==-1?(this.search=s.substr(H),this.query=s.substr(H+1),e&&(this.query=E.parse(this.query)),s=s.slice(0,H)):e&&(this.search="",this.query={}),s&&(this.pathname=s),T[p]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var V=this.pathname||"",Y=this.search||"";this.path=V+Y}return this.href=this.format(),this},r.prototype.format=function(){var t=this.auth||"";t&&(t=encodeURIComponent(t),t=t.replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=t+this.host:this.hostname&&(i=t+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&h.isObject(this.query)&&Object.keys(this.query).length&&(o=E.stringify(this.query));var a=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||T[e])&&i!==!1?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),n=n.replace(/[?#]/g,function(t){return encodeURIComponent(t)}),a=a.replace("#","%23"),e+i+n+a+r},r.prototype.resolve=function(t){return this.resolveObject(i(t,!1,!0)).format()},r.prototype.resolveObject=function(t){if(h.isString(t)){var e=new r;e.parse(t,!1,!0),t=e}for(var n=new r,i=Object.keys(this),o=0;o0)&&n.host.split("@");O&&(n.auth=O.shift(),n.host=n.hostname=O.shift())}return n.search=t.search,n.query=t.query,h.isNull(n.pathname)&&h.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var S=w.slice(-1)[0],M=(n.host||t.host||w.length>1)&&("."===S||".."===S)||""===S,P=0,C=w.length;C>=0;C--)S=w[C],"."===S?w.splice(C,1):".."===S?(w.splice(C,1),P++):P&&(w.splice(C,1),P--);if(!m&&!b)for(;P--;P)w.unshift("..");!m||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),M&&"/"!==w.join("/").substr(-1)&&w.push("");var R=""===w[0]||w[0]&&"/"===w[0].charAt(0);if(E){n.hostname=n.host=R?"":w.length?w.shift():"";var O=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");O&&(n.auth=O.shift(),n.host=n.hostname=O.shift())}return m=m||n.host&&w.length,m&&!R&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),h.isNull(n.pathname)&&h.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var t=this.host,e=f.exec(t);e&&(e=e[0],":"!==e&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,n){var r;(function(t,i){!function(o){function a(t){throw RangeError(k[t])}function s(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function u(t,e){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(I,".");var i=t.split("."),o=s(i,e).join(".");return r+o}function h(t){for(var e,n,r=[],i=0,o=t.length;i=55296&&e<=56319&&i65535&&(t-=65536,e+=j(t>>>10&1023|55296),t=56320|1023&t),e+=j(t)}).join("")}function f(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:w}function c(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function d(t,e,n){var r=0;for(t=n?L(t/O):t>>1,t+=L(t/e);t>_*T>>1;r+=w)t=L(t/_);return L(r+(_+1)*t/(t+E))}function p(t){var e,n,r,i,o,s,u,h,c,p,y=[],v=t.length,g=0,x=M,m=S;for(n=t.lastIndexOf(P),n<0&&(n=0),r=0;r=128&&a("not-basic"),y.push(t.charCodeAt(r));for(i=n>0?n+1:0;i=v&&a("invalid-input"),h=f(t.charCodeAt(i++)),(h>=w||h>L((b-g)/s))&&a("overflow"),g+=h*s,c=u<=m?A:u>=m+T?T:u-m,!(hL(b/p)&&a("overflow"),s*=p;e=y.length+1,m=d(g-o,e,0==o),L(g/e)>b-x&&a("overflow"),x+=L(g/e),g%=e,y.splice(g++,0,x)}return l(y)}function y(t){var e,n,r,i,o,s,u,l,f,p,y,v,g,x,m,E=[];for(t=h(t),v=t.length,e=M,n=0,o=S,s=0;s=e&&yL((b-n)/g)&&a("overflow"),n+=(u-e)*g,e=u,s=0;sb&&a("overflow"),y==e){for(l=n,f=w;p=f<=o?A:f>=o+T?T:f-o,!(l= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=w-A,L=Math.floor,j=String.fromCharCode;m={version:"1.3.2",ucs2:{decode:h,encode:l},decode:p,encode:y,toASCII:g,toUnicode:v},r=function(){return m}.call(e,n,e,t),!(void 0!==r&&(t.exports=r))}(this)}).call(e,n(440)(t),function(){return this}())},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,n){"use strict";e.decode=e.parse=n(443),e.encode=e.stringify=n(444)},function(t,e){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,i){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;var a=/\+/g;t=t.split(e);var s=1e3;i&&"number"==typeof i.maxKeys&&(s=i.maxKeys);var u=t.length;s>0&&u>s&&(u=s);for(var h=0;h=0?(l=p.substr(0,y),f=p.substr(y+1)):(l=p,f=""),c=decodeURIComponent(l),d=decodeURIComponent(f),n(o,c)?Array.isArray(o[c])?o[c].push(d):o[c]=[o[c],d]:o[c]=d}return o}},function(t,e){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,i){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map(function(i){var o=encodeURIComponent(n(i))+r;return Array.isArray(t[i])?t[i].map(function(t){return o+encodeURIComponent(n(t))}).join(e):o+encodeURIComponent(n(t[i]))}).join(e):i?encodeURIComponent(n(i))+r+encodeURIComponent(n(t)):""}},function(t,e,n){"use strict";var r=n(446)();t.exports=function(t){return"string"==typeof t?t.replace(r,""):t}},function(t,e){"use strict";t.exports=function(){return/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g; }},function(t,e,n){function r(t,e){a=new i(t),a.onopen=function(){o=0},a.onclose=function(){if(0===o&&e.close(),a=null,o<=10){var n=1e3*Math.pow(2,o)+100*Math.random();o+=1,setTimeout(function(){r(t,e)},n)}},a.onmessage=function(t){var n=JSON.parse(t.data);e[n.type]&&e[n.type](n.data)}}var i=n(448),o=0,a=null;t.exports=r},function(t,e,n){(function(e){"use strict";var r=n(449);t.exports=n(495)(r),"_sockjs_onload"in e&&setTimeout(e._sockjs_onload,1)}).call(e,function(){return this}())},function(t,e,n){"use strict";t.exports=[n(450),n(466),n(476),n(478),n(481)(n(478)),n(488),n(481)(n(488)),n(490),n(491),n(481)(n(490)),n(492)]},function(t,e,n){(function(e){"use strict";function r(t,e,n){if(!r.enabled())throw new Error("Transport created when disabled");s.call(this),h("constructor",t);var a=this,l=o.addPath(t,"/websocket");l="https"===l.slice(0,5)?"wss"+l.slice(5):"ws"+l.slice(4),this.url=l,this.ws=new u(this.url,[],n),this.ws.onmessage=function(t){h("message event",t.data),a.emit("message",t.data)},this.unloadRef=i.unloadAdd(function(){h("unload"),a.ws.close()}),this.ws.onclose=function(t){h("close event",t.code,t.reason),a.emit("close",t.code,t.reason),a._cleanup()},this.ws.onerror=function(t){h("error event",t),a.emit("close",1006,"WebSocket connection broken"),a._cleanup()}}var i=n(452),o=n(455),a=n(462),s=n(463).EventEmitter,u=n(465),h=function(){};"production"!==e.env.NODE_ENV&&(h=n(459)("sockjs-client:websocket")),a(r,s),r.prototype.send=function(t){var e="["+t+"]";h("send",e),this.ws.send(e)},r.prototype.close=function(){h("close");var t=this.ws;this._cleanup(),t&&t.close()},r.prototype._cleanup=function(){h("_cleanup");var t=this.ws;t&&(t.onmessage=t.onclose=t.onerror=null),i.unloadDel(this.unloadRef),this.unloadRef=this.ws=null,this.removeAllListeners()},r.enabled=function(){return h("enabled"),!!u},r.transportName="websocket",r.roundTrips=2,t.exports=r}).call(e,n(451))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){y&&d&&(y=!1,d.length?p=d.concat(p):v=-1,p.length&&s())}function s(){if(!y){var t=i(a);y=!0;for(var e=p.length;e;){for(d=p,p=[];++v1)for(var n=1;n=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(i++,"%c"===t&&(o=i))}),t.splice(o,0,r)}}function a(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}}function u(){var t;try{t=e.storage.debug}catch(t){}return!t&&"undefined"!=typeof r&&"env"in r&&(t=r.env.DEBUG),t}function h(){try{return window.localStorage}catch(t){}}e=t.exports=n(460),e.log=a,e.formatArgs=o,e.save=s,e.load=u,e.useColors=i,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:h(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(u())}).call(e,n(451))},function(t,e,n){function r(t){var n,r=0;for(n in t)r=(r<<5)-r+t.charCodeAt(n),r|=0;return e.colors[Math.abs(r)%e.colors.length]}function i(t){function n(){if(n.enabled){var t=n,r=+new Date,i=r-(h||r);t.diff=i,t.prev=h,t.curr=r,h=r;for(var o=new Array(arguments.length),a=0;a100)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*l;case"days":case"day":case"d":return n*h;case"hours":case"hour":case"hrs":case"hr":case"h":return n*u;case"minutes":case"minute":case"mins":case"min":case"m":return n*s;case"seconds":case"second":case"secs":case"sec":case"s":return n*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function r(t){return t>=h?Math.round(t/h)+"d":t>=u?Math.round(t/u)+"h":t>=s?Math.round(t/s)+"m":t>=a?Math.round(t/a)+"s":t+"ms"}function i(t){return o(t,h,"day")||o(t,u,"hour")||o(t,s,"minute")||o(t,a,"second")||t+" ms"}function o(t,e,n){if(!(t0)return n(t);if("number"===o&&isNaN(t)===!1)return e.long?i(t):r(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){"use strict";function r(){o.call(this)}var i=n(462),o=n(464);i(r,o),r.prototype.removeAllListeners=function(t){t?delete this._listeners[t]:this._listeners={}},r.prototype.once=function(t,e){function n(){r.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}var r=this,i=!1;this.on(t,n)},r.prototype.emit=function(){var t=arguments[0],e=this._listeners[t];if(e){for(var n=arguments.length,r=new Array(n-1),i=1;i1?this._listeners[t]=n.slice(0,r).concat(n.slice(r+1)):delete this._listeners[t]):void 0}},n.prototype.dispatchEvent=function(){var t=arguments[0],e=t.type,n=1===arguments.length?[t]:Array.apply(null,arguments);if(this["on"+e]&&this["on"+e].apply(this,n),e in this._listeners)for(var r=this._listeners[e],i=0;i0){var e="["+this.sendBuffer.join(",")+"]";this.sendStop=this.sender(this.url,e,function(e){t.sendStop=null,e?(a("error",e),t.emit("close",e.code||1006,"Sending error: "+e),t.close()):t.sendScheduleWait()}),this.sendBuffer=[]}},r.prototype._cleanup=function(){a("_cleanup"),this.removeAllListeners()},r.prototype.close=function(){a("close"),this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},t.exports=r}).call(e,n(451))},function(t,e,n){(function(e){"use strict";function r(t,e,n){a(e),o.call(this),this.Receiver=t,this.receiveUrl=e,this.AjaxObject=n,this._scheduleReceiver()}var i=n(462),o=n(463).EventEmitter,a=function(){};"production"!==e.env.NODE_ENV&&(a=n(459)("sockjs-client:polling")),i(r,o),r.prototype._scheduleReceiver=function(){a("_scheduleReceiver");var t=this,e=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);e.on("message",function(e){a("message",e),t.emit("message",e)}),e.once("close",function(n,r){a("close",n,r,t.pollIsClosing),t.poll=e=null,t.pollIsClosing||("network"===r?t._scheduleReceiver():(t.emit("close",n||1006,r),t.removeAllListeners()))})},r.prototype.abort=function(){a("abort"),this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},t.exports=r}).call(e,n(451))},function(t,e,n){(function(e){"use strict";function r(t,e){a(t),o.call(this);var n=this;this.bufferPosition=0,this.xo=new e("POST",t,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",function(t,e){a("finish",t,e),n._chunkHandler(t,e),n.xo=null;var r=200===t?"network":"permanent";a("close",r),n.emit("close",null,r),n._cleanup()})}var i=n(462),o=n(463).EventEmitter,a=function(){};"production"!==e.env.NODE_ENV&&(a=n(459)("sockjs-client:receiver:xhr")),i(r,o),r.prototype._chunkHandler=function(t,e){if(a("_chunkHandler",t),200===t&&e)for(var n=-1;;this.bufferPosition+=n+1){var r=e.slice(this.bufferPosition);if(n=r.indexOf("\n"),n===-1)break;var i=r.slice(0,n);i&&(a("message",i),this.emit("message",i))}},r.prototype._cleanup=function(){a("_cleanup"),this.removeAllListeners()},r.prototype.abort=function(){a("abort"),this.xo&&(this.xo.close(),a("close"),this.emit("close",null,"user"),this.xo=null),this._cleanup()},t.exports=r}).call(e,n(451))},function(t,e,n){"use strict";function r(t,e,n,r){o.call(this,t,e,n,r)}var i=n(462),o=n(473);i(r,o),r.enabled=o.enabled&&o.supportsCORS,t.exports=r},function(t,e,n){(function(e,r){"use strict";function i(t,e,n,r){l(t,e);var i=this;o.call(this),setTimeout(function(){i._start(t,e,n,r)},0)}var o=n(463).EventEmitter,a=n(462),s=n(452),u=n(455),h=e.XMLHttpRequest,l=function(){};"production"!==r.env.NODE_ENV&&(l=n(459)("sockjs-client:browser:xhr")),a(i,o),i.prototype._start=function(t,e,n,r){var o=this;try{this.xhr=new h}catch(t){}if(!this.xhr)return l("no xhr"),this.emit("finish",0,"no xhr support"),void this._cleanup();e=u.addQuery(e,"t="+ +new Date),this.unloadRef=s.unloadAdd(function(){l("unload cleanup"),o._cleanup(!0)});try{this.xhr.open(t,e,!0),this.timeout&&"timeout"in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){l("xhr timeout"),o.emit("finish",0,""),o._cleanup(!1)})}catch(t){return l("exception",t),this.emit("finish",0,""),void this._cleanup(!1)}if(r&&r.noCredentials||!i.supportsCORS||(l("withCredentials"),this.xhr.withCredentials="true"),r&&r.headers)for(var a in r.headers)this.xhr.setRequestHeader(a,r.headers[a]);this.xhr.onreadystatechange=function(){if(o.xhr){var t,e,n=o.xhr;switch(l("readyState",n.readyState),n.readyState){case 3:try{e=n.status,t=n.responseText}catch(t){}l("status",e),1223===e&&(e=204),200===e&&t&&t.length>0&&(l("chunk"),o.emit("chunk",e,t));break;case 4:e=n.status,l("status",e),1223===e&&(e=204),12005!==e&&12029!==e||(e=0),l("finish",e,n.responseText),o.emit("finish",e,n.responseText),o._cleanup(!1)}}};try{o.xhr.send(n)}catch(t){o.emit("finish",0,""),o._cleanup(!1)}},i.prototype._cleanup=function(t){if(l("cleanup"),this.xhr){if(this.removeAllListeners(),s.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),t)try{this.xhr.abort()}catch(t){}this.unloadRef=this.xhr=null}},i.prototype.close=function(){l("close"),this._cleanup(!0)},i.enabled=!!h;var f=["Active"].concat("Object").join("X");!i.enabled&&f in e&&(l("overriding xmlhttprequest"),h=function(){try{return new e[f]("Microsoft.XMLHTTP")}catch(t){return null}},i.enabled=!!new h);var c=!1;try{c="withCredentials"in new h}catch(t){}i.supportsCORS=c,t.exports=i}).call(e,function(){return this}(),n(451))},function(t,e,n){"use strict";function r(t,e,n){o.call(this,t,e,n,{noCredentials:!0})}var i=n(462),o=n(473);i(r,o),r.enabled=o.enabled,t.exports=r},function(t,e){(function(e){"use strict";t.exports={isOpera:function(){return e.navigator&&/opera/i.test(e.navigator.userAgent)},isKonqueror:function(){return e.navigator&&/konqueror/i.test(e.navigator.userAgent)},hasDomain:function(){if(!e.document)return!0;try{return!!e.document.domain}catch(t){return!1}}}}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(t){if(!s.enabled)throw new Error("Transport created when disabled");o.call(this,t,"/xhr_streaming",a,s)}var i=n(462),o=n(467),a=n(471),s=n(477);i(r,o),r.enabled=function(t){return!t.cookie_needed&&!t.nullOrigin&&(s.enabled&&t.sameScheme)},r.transportName="xdr-streaming",r.roundTrips=2,t.exports=r},function(t,e,n){(function(e,r){"use strict";function i(t,e,n){l(t,e);var r=this;o.call(this),setTimeout(function(){r._start(t,e,n)},0)}var o=n(463).EventEmitter,a=n(462),s=n(452),u=n(475),h=n(455),l=function(){};"production"!==e.env.NODE_ENV&&(l=n(459)("sockjs-client:sender:xdr")),a(i,o),i.prototype._start=function(t,e,n){l("_start");var i=this,o=new r.XDomainRequest;e=h.addQuery(e,"t="+ +new Date),o.onerror=function(){l("onerror"),i._error()},o.ontimeout=function(){l("ontimeout"),i._error()},o.onprogress=function(){l("progress",o.responseText),i.emit("chunk",200,o.responseText)},o.onload=function(){l("load"),i.emit("finish",200,o.responseText),i._cleanup(!1)},this.xdr=o,this.unloadRef=s.unloadAdd(function(){i._cleanup(!0)});try{this.xdr.open(t,e),this.timeout&&(this.xdr.timeout=this.timeout),this.xdr.send(n)}catch(t){this._error()}},i.prototype._error=function(){this.emit("finish",0,""),this._cleanup(!1)},i.prototype._cleanup=function(t){if(l("cleanup",t),this.xdr){if(this.removeAllListeners(),s.unloadDel(this.unloadRef),this.xdr.ontimeout=this.xdr.onerror=this.xdr.onprogress=this.xdr.onload=null,t)try{this.xdr.abort()}catch(t){}this.unloadRef=this.xdr=null}},i.prototype.close=function(){l("close"),this._cleanup(!0)},i.enabled=!(!r.XDomainRequest||!u.hasDomain()),t.exports=i}).call(e,n(451),function(){return this}())},function(t,e,n){"use strict";function r(t){if(!r.enabled())throw new Error("Transport created when disabled");o.call(this,t,"/eventsource",a,s)}var i=n(462),o=n(467),a=n(479),s=n(472),u=n(480);i(r,o),r.enabled=function(){return!!u},r.transportName="eventsource",r.roundTrips=2,t.exports=r},function(t,e,n){(function(e){"use strict";function r(t){s(t),o.call(this);var e=this,n=this.es=new a(t);n.onmessage=function(t){s("message",t.data),e.emit("message",decodeURI(t.data))},n.onerror=function(t){s("error",n.readyState,t);var r=2!==n.readyState?"network":"permanent";e._cleanup(),e._close(r)}}var i=n(462),o=n(463).EventEmitter,a=n(480),s=function(){};"production"!==e.env.NODE_ENV&&(s=n(459)("sockjs-client:receiver:eventsource")),i(r,o),r.prototype.abort=function(){s("abort"),this._cleanup(),this._close("user")},r.prototype._cleanup=function(){s("cleanup");var t=this.es;t&&(t.onmessage=t.onerror=null,t.close(),this.es=null)},r.prototype._close=function(t){s("close",t);var e=this;setTimeout(function(){e.emit("close",null,t),e.removeAllListeners()},200)},t.exports=r}).call(e,n(451))},function(t,e){(function(e){t.exports=e.EventSource}).call(e,function(){return this}())},function(t,e,n){(function(e){"use strict";var r=n(462),i=n(482),o=n(487);t.exports=function(t){function n(e,n){i.call(this,t.transportName,e,n)}return r(n,i),n.enabled=function(n,r){if(!e.document)return!1;var a=o.extend({},r);return a.sameOrigin=!0,t.enabled(a)&&i.enabled()},n.transportName="iframe-"+t.transportName,n.needBody=!0,n.roundTrips=i.roundTrips+t.roundTrips-1,n.facadeTransport=t,n}}).call(e,function(){return this}())},function(t,e,n){(function(e){"use strict";function r(t,e,n){if(!r.enabled())throw new Error("Transport created when disabled");a.call(this);var i=this;this.origin=u.getOrigin(n),this.baseUrl=n,this.transUrl=e,this.transport=t,this.windowId=f.string(8);var o=u.addPath(n,"/iframe.html")+"#"+this.windowId;c(t,e,o),this.iframeObj=h.createIframe(o,function(t){c("err callback"),i.emit("close",1006,"Unable to load an iframe ("+t+")"),i.close()}),this.onmessageCallback=this._message.bind(this),l.attachEvent("message",this.onmessageCallback)}var i=n(462),o=n(483),a=n(463).EventEmitter,s=n(485),u=n(455),h=n(486),l=n(452),f=n(453),c=function(){};"production"!==e.env.NODE_ENV&&(c=n(459)("sockjs-client:transport:iframe")),i(r,a),r.prototype.close=function(){if(c("close"),this.removeAllListeners(),this.iframeObj){l.detachEvent("message",this.onmessageCallback);try{this.postMessage("c")}catch(t){}this.iframeObj.cleanup(),this.iframeObj=null,this.onmessageCallback=this.iframeObj=null}},r.prototype._message=function(t){if(c("message",t.data),!u.isOriginEqual(t.origin,this.origin))return void c("not same origin",t.origin,this.origin);var e;try{e=o.parse(t.data)}catch(e){return void c("bad json",t.data)}if(e.windowId!==this.windowId)return void c("mismatched window id",e.windowId,this.windowId);switch(e.type){case"s":this.iframeObj.loaded(),this.postMessage("s",o.stringify([s,this.transport,this.transUrl,this.baseUrl]));break;case"t":this.emit("message",e.data);break;case"c":var n;try{n=o.parse(e.data)}catch(t){return void c("bad json",e.data)}this.emit("close",n[0],n[1]),this.close()}},r.prototype.postMessage=function(t,e){c("postMessage",t,e),this.iframeObj.post(o.stringify({windowId:this.windowId,type:t,data:e||""}),this.origin)},r.prototype.send=function(t){c("send",t),this.postMessage("m",t)},r.enabled=function(){return h.iframeEnabled},r.transportName="iframe",r.roundTrips=2,t.exports=r}).call(e,n(451))},function(t,e,n){var r;(function(t,i){(function(){function o(t,e){function n(t){if(n[t]!==v)return n[t];var o;if("bug-string-char-index"==t)o="a"!="a"[0];else if("json"==t)o=n("json-stringify")&&n("json-parse");else{var a,s='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var h=e.stringify,l="function"==typeof h&&m;if(l){(a=function(){return 1}).toJSON=a;try{l="0"===h(0)&&"0"===h(new r)&&'""'==h(new i)&&h(x)===v&&h(v)===v&&h()===v&&"1"===h(a)&&"[1]"==h([a])&&"[null]"==h([v])&&"null"==h(null)&&"[null,null,null]"==h([v,x,null])&&h({a:[a,!0,!1,null,"\0\b\n\f\r\t"]})==s&&"1"===h(null,a)&&"[\n 1,\n 2\n]"==h([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==h(new u(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==h(new u(864e13))&&'"-000001-01-01T00:00:00.000Z"'==h(new u(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==h(new u(-1))}catch(t){l=!1}}o=l}if("json-parse"==t){var f=e.parse;if("function"==typeof f)try{if(0===f("0")&&!f(!1)){a=f(s);var c=5==a.a.length&&1===a.a[0];if(c){try{c=!f('"\t"')}catch(t){}if(c)try{c=1!==f("01")}catch(t){}if(c)try{c=1!==f("1.")}catch(t){}}}}catch(t){c=!1}o=c}}return n[t]=!!o}t||(t=h.Object()),e||(e=h.Object());var r=t.Number||h.Number,i=t.String||h.String,a=t.Object||h.Object,u=t.Date||h.Date,l=t.SyntaxError||h.SyntaxError,f=t.TypeError||h.TypeError,c=t.Math||h.Math,d=t.JSON||h.JSON;"object"==typeof d&&d&&(e.stringify=d.stringify,e.parse=d.parse);var p,y,v,g=a.prototype,x=g.toString,m=new u(-0xc782b5b800cec);try{m=m.getUTCFullYear()==-109252&&0===m.getUTCMonth()&&1===m.getUTCDate()&&10==m.getUTCHours()&&37==m.getUTCMinutes()&&6==m.getUTCSeconds()&&708==m.getUTCMilliseconds()}catch(t){}if(!n("json")){var b="[object Function]",w="[object Date]",A="[object Number]",T="[object String]",E="[object Array]",O="[object Boolean]",S=n("bug-string-char-index");if(!m)var M=c.floor,P=[0,31,59,90,120,151,181,212,243,273,304,334],C=function(t,e){return P[e]+365*(t-1970)+M((t-1969+(e=+(e>1)))/4)-M((t-1901+e)/100)+M((t-1601+e)/400)};if((p=g.hasOwnProperty)||(p=function(t){var e,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=x?p=function(t){var e=this.__proto__,n=t in(this.__proto__=null,this);return this.__proto__=e,n}:(e=n.constructor,p=function(t){var n=(this.constructor||e).prototype;return t in this&&!(t in n&&this[t]===n[t])}),n=null,p.call(this,t)}),y=function(t,e){var n,r,i,o=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n;for(i in r)p.call(r,i)&&o++;return n=r=null,o?y=2==o?function(t,e){var n,r={},i=x.call(t)==b;for(n in t)i&&"prototype"==n||p.call(r,n)||!(r[n]=1)||!p.call(t,n)||e(n)}:function(t,e){var n,r,i=x.call(t)==b;for(n in t)i&&"prototype"==n||!p.call(t,n)||(r="constructor"===n)||e(n);(r||p.call(t,n="constructor"))&&e(n)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],y=function(t,e){var n,i,o=x.call(t)==b,a=!o&&"function"!=typeof t.constructor&&s[typeof t.hasOwnProperty]&&t.hasOwnProperty||p;for(n in t)o&&"prototype"==n||!a.call(t,n)||e(n);for(i=r.length;n=r[--i];a.call(t,n)&&e(n));}),y(t,e)},!n("json-stringify")){var R={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},I="000000",k=function(t,e){return(I+(e||0)).slice(-t)},_="\\u00",L=function(t){for(var e='"',n=0,r=t.length,i=!S||r>10,o=i&&(S?t.split(""):t);n-1/0&&s<1/0){if(C){for(c=M(s/864e5),h=M(c/365.2425)+1970-1;C(h+1,0)<=c;h++);for(l=M((c-C(h,0))/30.42);C(h,l+1)<=c;l++);c=1+c-C(h,l),d=(s%864e5+864e5)%864e5,g=M(d/36e5)%24,m=M(d/6e4)%60,b=M(d/1e3)%60,S=d%1e3}else h=s.getUTCFullYear(),l=s.getUTCMonth(),c=s.getUTCDate(),g=s.getUTCHours(),m=s.getUTCMinutes(),b=s.getUTCSeconds(),S=s.getUTCMilliseconds();s=(h<=0||h>=1e4?(h<0?"-":"+")+k(6,h<0?-h:h):k(4,h))+"-"+k(2,l+1)+"-"+k(2,c)+"T"+k(2,g)+":"+k(2,m)+":"+k(2,b)+"."+k(3,S)+"Z"}else s=null;if(n&&(s=n.call(e,t,s)),null===s)return"null";if(u=x.call(s),u==O)return""+s;if(u==A)return s>-1/0&&s<1/0?""+s:"null";if(u==T)return L(""+s);if("object"==typeof s){for(_=a.length;_--;)if(a[_]===s)throw f();if(a.push(s),P=[],D=o,o+=i,u==E){for(I=0,_=s.length;I<_;I++)R=j(I,s,n,r,i,o,a),P.push(R===v?"null":R);N=P.length?i?"[\n"+o+P.join(",\n"+o)+"\n"+D+"]":"["+P.join(",")+"]":"[]"}else y(r||s,function(t){var e=j(t,s,n,r,i,o,a);e!==v&&P.push(L(t)+":"+(i?" ":"")+e)}),N=P.length?i?"{\n"+o+P.join(",\n"+o)+"\n"+D+"}":"{"+P.join(",")+"}":"{}";return a.pop(),N}};e.stringify=function(t,e,n){var r,i,o,a;if(s[typeof e]&&e)if((a=x.call(e))==b)i=e;else if(a==E){o={};for(var u,h=0,l=e.length;h0)for(r="",n>10&&(n=10);r.length=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70||B();t+=F("0x"+o.slice(e,D));break;default:B()}else{if(34==i)break;for(i=o.charCodeAt(D),e=D;i>=32&&92!=i&&34!=i;)i=o.charCodeAt(++D);t+=o.slice(e,D)}if(34==o.charCodeAt(D))return D++,t;B();default:if(e=D,45==i&&(r=!0,i=o.charCodeAt(++D)),i>=48&&i<=57){for(48==i&&(i=o.charCodeAt(D+1),i>=48&&i<=57)&&B(),r=!1;D=48&&i<=57);D++);if(46==o.charCodeAt(D)){for(n=++D;n=48&&i<=57);n++);n==D&&B(),D=n}if(i=o.charCodeAt(D),101==i||69==i){for(i=o.charCodeAt(++D),43!=i&&45!=i||D++,n=D;n=48&&i<=57);n++);n==D&&B(),D=n}return+o.slice(e,D)}if(r&&B(),"true"==o.slice(D,D+4))return D+=4,!0;if("false"==o.slice(D,D+5))return D+=5,!1;if("null"==o.slice(D,D+4))return D+=4,null;B()}return"$"},X=function(t){var e,n;if("$"==t&&B(),"string"==typeof t){if("@"==(S?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];t=V(),"]"!=t;n||(n=!0))n&&(","==t?(t=V(),"]"==t&&B()):B()),","==t&&B(),e.push(X(t));return e}if("{"==t){for(e={};t=V(),"}"!=t;n||(n=!0))n&&(","==t?(t=V(),"}"==t&&B()):B()),","!=t&&"string"==typeof t&&"@"==(S?t.charAt(0):t[0])&&":"==V()||B(),e[t.slice(1)]=X(V());return e}B()}return t},W=function(t,e,n){var r=q(t,e,n);r===v?delete t[e]:t[e]=r},q=function(t,e,n){var r,i=t[e];if("object"==typeof i&&i)if(x.call(i)==E)for(r=i.length;r--;)W(i,r,n);else y(i,function(t){W(i,t,n)});return n.call(t,e,i)};e.parse=function(t,e){var n,r;return D=0,N=""+t,n=X(V()),"$"!=V()&&B(),D=N=null,e&&x.call(e)==b?q((r={},r[""]=n,r),"",e):n}}}return e.runInContext=o,e}var a=n(484),s={function:!0,object:!0},u=s[typeof e]&&e&&!e.nodeType&&e,h=s[typeof window]&&window||this,l=u&&s[typeof t]&&t&&!t.nodeType&&"object"==typeof i&&i;if(!l||l.global!==l&&l.window!==l&&l.self!==l||(h=l),u&&!a)o(h,u);else{var f=h.JSON,c=h.JSON3,d=!1,p=o(h,h.JSON3={noConflict:function(){return d||(d=!0,h.JSON=f,h.JSON3=c,f=c=null),p}});h.JSON={parse:p.parse,stringify:p.stringify}}a&&(r=function(){return p}.call(e,n,e,t),!(void 0!==r&&(t.exports=r)))}).call(this)}).call(e,n(440)(t),function(){return this}())},function(t,e){(function(e){t.exports=e}).call(e,{})},function(t,e){t.exports="1.1.4"},function(t,e,n){(function(e,r){"use strict";var i=n(452),o=n(483),a=n(475),s=function(){};"production"!==e.env.NODE_ENV&&(s=n(459)("sockjs-client:utils:iframe")),t.exports={WPrefix:"_jp",currentWindowId:null,polluteGlobalNamespace:function(){t.exports.WPrefix in r||(r[t.exports.WPrefix]={})},postMessage:function(e,n){r.parent!==r?r.parent.postMessage(o.stringify({windowId:t.exports.currentWindowId,type:e,data:n||""}),"*"):s("Cannot postMessage, no parent window.",e,n)},createIframe:function(t,e){var n,o,a=r.document.createElement("iframe"),u=function(){s("unattach"),clearTimeout(n);try{a.onload=null}catch(t){}a.onerror=null},h=function(){s("cleanup"),a&&(u(),setTimeout(function(){a&&a.parentNode.removeChild(a),a=null},0),i.unloadDel(o))},l=function(t){s("onerror",t),a&&(h(),e(t))},f=function(t,e){s("post",t,e);try{setTimeout(function(){a&&a.contentWindow&&a.contentWindow.postMessage(t,e)},0)}catch(t){}};return a.src=t,a.style.display="none",a.style.position="absolute",a.onerror=function(){l("onerror")},a.onload=function(){s("onload"),clearTimeout(n),n=setTimeout(function(){l("onload timeout")},2e3)},r.document.body.appendChild(a),n=setTimeout(function(){l("timeout")},15e3),o=i.unloadAdd(h),{post:f,cleanup:h,loaded:u}},createHtmlfile:function(e,n){var o,a,u,h=["Active"].concat("Object").join("X"),l=new r[h]("htmlfile"),f=function(){clearTimeout(o),u.onerror=null},c=function(){l&&(f(),i.unloadDel(a),u.parentNode.removeChild(u),u=l=null,CollectGarbage())},d=function(t){s("onerror",t),l&&(c(),n(t))},p=function(t,e){try{setTimeout(function(){u&&u.contentWindow&&u.contentWindow.postMessage(t,e)},0)}catch(t){}};l.open(),l.write(''),l.close(),l.parentWindow[t.exports.WPrefix]=r[t.exports.WPrefix];var y=l.createElement("div");return l.body.appendChild(y),u=l.createElement("iframe"),y.appendChild(u),u.src=e,u.onerror=function(){d("onerror")},o=setTimeout(function(){d("timeout")},15e3),a=i.unloadAdd(c),{post:p,cleanup:c,loaded:f}}},t.exports.iframeEnabled=!1,r.document&&(t.exports.iframeEnabled=("function"==typeof r.postMessage||"object"==typeof r.postMessage)&&!a.isKonqueror())}).call(e,n(451),function(){return this}())},function(t,e){"use strict";t.exports={isObject:function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},extend:function(t){if(!this.isObject(t))return t;for(var e,n,r=1,i=arguments.length;r')}catch(n){var e=r.document.createElement("iframe");return e.name=t,e}}function o(){u("createForm"),h=r.document.createElement("form"),h.style.display="none",h.style.position="absolute",h.method="POST",h.enctype="application/x-www-form-urlencoded",h.acceptCharset="UTF-8",l=r.document.createElement("textarea"),l.name="d",h.appendChild(l),r.document.body.appendChild(h)}var a=n(453),s=n(455),u=function(){};"production"!==e.env.NODE_ENV&&(u=n(459)("sockjs-client:sender:jsonp"));var h,l;t.exports=function(t,e,n){u(t,e),h||o();var r="a"+a.string(8);h.target=r,h.action=s.addQuery(s.addPath(t,"/jsonp_send"),"i="+r);var f=i(r);f.id=r,f.style.display="none",h.appendChild(f);try{l.value=e}catch(t){}h.submit();var c=function(t){u("completed",r,t),f.onerror&&(f.onreadystatechange=f.onerror=f.onload=null,setTimeout(function(){u("cleaning up",r),f.parentNode.removeChild(f),f=null},500),l.value="",n(t))};return f.onerror=function(){u("onerror",r),c()},f.onload=function(){u("onload",r),c()},f.onreadystatechange=function(t){u("onreadystatechange",r,f.readyState,t),"complete"===f.readyState&&c()},function(){u("aborted",r),c(new Error("Aborted"))}}}).call(e,n(451),function(){return this}())},function(t,e,n){(function(e,r){"use strict";function i(t,e,n){if(!(this instanceof i))return new i(t,e,n);if(arguments.length<1)throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");x.call(this),this.readyState=i.CONNECTING,this.extensions="",this.protocol="",n=n||{},n.protocols_whitelist&&v.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead."),this._transportsWhitelist=n.transports,this._transportOptions=n.transportOptions||{};var r=n.sessionId||8;if("function"==typeof r)this._generateSessionId=r;else{if("number"!=typeof r)throw new TypeError("If sessionId is used in the options, it needs to be a number or a function.");this._generateSessionId=function(){return h.string(r)}}this._server=n.server||h.numberString(1e3);var o=new a(t);if(!o.host||!o.protocol)throw new SyntaxError("The URL '"+t+"' is invalid");if(o.hash)throw new SyntaxError("The URL must not contain a fragment");if("http:"!==o.protocol&&"https:"!==o.protocol)throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '"+o.protocol+"' is not allowed.");var s="https:"===o.protocol;if("https"===m.protocol&&!s)throw new Error("SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS");e?Array.isArray(e)||(e=[e]):e=[];var u=e.sort();u.forEach(function(t,e){if(!t)throw new SyntaxError("The protocols entry '"+t+"' is invalid.");if(e=3e3&&t<=4999}n(496);var a=n(456),s=n(462),u=n(483),h=n(453),l=n(497),f=n(455),c=n(452),d=n(498),p=n(487),y=n(475),v=n(499),g=n(500),x=n(464),m=n(501),b=n(502),w=n(503),A=n(504),T=function(){};"production"!==e.env.NODE_ENV&&(T=n(459)("sockjs-client:main"));var E;s(i,x),i.prototype.close=function(t,e){if(t&&!o(t))throw new Error("InvalidAccessError: Invalid code");if(e&&e.length>123)throw new SyntaxError("reason argument has an invalid length");if(this.readyState!==i.CLOSING&&this.readyState!==i.CLOSED){var n=!0;this._close(t||1e3,e||"Normal closure",n)}},i.prototype.send=function(t){if("string"!=typeof t&&(t=""+t),this.readyState===i.CONNECTING)throw new Error("InvalidStateError: The connection has not been established yet");this.readyState===i.OPEN&&this._transport.send(l.quote(t))},i.version=n(485),i.CONNECTING=0,i.OPEN=1,i.CLOSING=2,i.CLOSED=3,i.prototype._receiveInfo=function(t,e){if(T("_receiveInfo",e),this._ir=null,!t)return void this._close(1002,"Cannot connect to server");this._rto=this.countRTO(e),this._transUrl=t.base_url?t.base_url:this.url,t=p.extend(t,this._urlInfo),T("info",t);var n=E.filterToEnabled(this._transportsWhitelist,t);this._transports=n.main,T(this._transports.length+" enabled transports"),this._connect()},i.prototype._connect=function(){for(var t=this._transports.shift();t;t=this._transports.shift()){if(T("attempt",t.transportName),t.needBody&&(!r.document.body||"undefined"!=typeof r.document.readyState&&"complete"!==r.document.readyState&&"interactive"!==r.document.readyState))return T("waiting for body"),this._transports.unshift(t),void c.attachEvent("load",this._connect.bind(this));var e=this._rto*t.roundTrips||5e3;this._transportTimeoutId=setTimeout(this._transportTimeout.bind(this),e),T("using timeout",e);var n=f.addPath(this._transUrl,"/"+this._server+"/"+this._generateSessionId()),i=this._transportOptions[t.transportName];T("transport url",n);var o=new t(n,this._transUrl,i);return o.on("message",this._transportMessage.bind(this)),o.once("close",this._transportClose.bind(this)),o.transportName=t.transportName,void(this._transport=o)}this._close(2e3,"All transports failed",!1)},i.prototype._transportTimeout=function(){T("_transportTimeout"),this.readyState===i.CONNECTING&&this._transportClose(2007,"Transport timed out")},i.prototype._transportMessage=function(t){T("_transportMessage",t);var e,n=this,r=t.slice(0,1),i=t.slice(1);switch(r){case"o":return void this._open();case"h":return this.dispatchEvent(new g("heartbeat")),void T("heartbeat",this.transport)}if(i)try{e=u.parse(i)}catch(t){T("bad json",i)}if("undefined"==typeof e)return void T("empty payload",i);switch(r){case"a":Array.isArray(e)&&e.forEach(function(t){T("message",n.transport,t),n.dispatchEvent(new w(t))});break;case"m":T("message",this.transport,e),this.dispatchEvent(new w(e));break;case"c":Array.isArray(e)&&2===e.length&&this._close(e[0],e[1],!0)}},i.prototype._transportClose=function(t,e){return T("_transportClose",this.transport,t,e),this._transport&&(this._transport.removeAllListeners(),this._transport=null,this.transport=null),o(t)||2e3===t||this.readyState!==i.CONNECTING?void this._close(t,e):void this._connect()},i.prototype._open=function(){T("_open",this._transport.transportName,this.readyState),this.readyState===i.CONNECTING?(this._transportTimeoutId&&(clearTimeout(this._transportTimeoutId),this._transportTimeoutId=null),this.readyState=i.OPEN,this.transport=this._transport.transportName,this.dispatchEvent(new g("open")),T("connected",this.transport)):this._close(1006,"Server lost session")},i.prototype._close=function(t,e,n){T("_close",this.transport,t,e,n,this.readyState);var r=!1;if(this._ir&&(r=!0,this._ir.close(),this._ir=null),this._transport&&(this._transport.close(),this._transport=null,this.transport=null),this.readyState===i.CLOSED)throw new Error("InvalidStateError: SockJS has already been closed");this.readyState=i.CLOSING,setTimeout(function(){this.readyState=i.CLOSED,r&&this.dispatchEvent(new g("error"));var o=new b("close");o.wasClean=n||!1,o.code=t||1e3,o.reason=e,this.dispatchEvent(o),this.onmessage=this.onclose=this.onerror=null,T("disconnected")}.bind(this),0)},i.prototype.countRTO=function(t){return t>100?4*t:300+t},t.exports=function(t){return E=d(t),n(509)(i,t),i}}).call(e,n(451),function(){return this}())},function(t,e){"use strict";function n(t){var e=+t;return e!==e?e=0:0!==e&&e!==1/0&&e!==-(1/0)&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function r(t){return t>>>0}function i(){}var o,a=Array.prototype,s=Object.prototype,u=Function.prototype,h=String.prototype,l=a.slice,f=s.toString,c=function(t){return"[object Function]"===s.toString.call(t)},d=function(t){return"[object Array]"===f.call(t)},p=function(t){return"[object String]"===f.call(t)},y=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}();o=y?function(t,e,n,r){!r&&e in t||Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(t,e,n,r){!r&&e in t||(t[e]=n)};var v=function(t,e,n){for(var r in e)s.hasOwnProperty.call(e,r)&&o(t,r,e[r],n)},g=function(t){if(null==t)throw new TypeError("can't convert "+t+" to object");return Object(t)};v(u,{bind:function(t){var e=this;if(!c(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var n=l.call(arguments,1),r=function(){if(this instanceof u){var r=e.apply(this,n.concat(l.call(arguments)));return Object(r)===r?r:this}return e.apply(t,n.concat(l.call(arguments)))},o=Math.max(0,e.length-n.length),a=[],s=0;s>>0;if(!c(t))throw new TypeError;for(;++i>>0;if(!r)return-1;var i=0;for(arguments.length>1&&(i=n(arguments[1])),i=i>=0?i:Math.max(0,r+i);i1?!function(){var t=void 0===/()??/.exec("")[1];h.split=function(e,n){var i=this;if(void 0===e&&0===n)return[];if("[object RegExp]"!==f.call(e))return A.call(this,e,n);var o,s,u,h,l=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":""),d=0;for(e=new RegExp(e.source,c+"g"),i+="",t||(o=new RegExp("^"+e.source+"$(?!\\s)",c)),n=void 0===n?-1>>>0:r(n);(s=e.exec(i))&&(u=s.index+s[0].length,!(u>d&&(l.push(i.slice(d,s.index)),!t&&s.length>1&&s[0].replace(o,function(){for(var t=1;t1&&s.index=n)));)e.lastIndex===s.index&&e.lastIndex++;return d===i.length?!h&&e.test("")||l.push(""):l.push(i.slice(d)),l.length>n?l.slice(0,n):l}}():"0".split(void 0,0).length&&(h.split=function(t,e){return void 0===t&&0===e?[]:A.call(this,t,e)});var T=h.substr,E="".substr&&"b"!=="0b".substr(-1);v(h,{substr:function(t,e){return T.call(this,t<0&&(t=this.length+t)<0?0:t,e)}},E)},function(t,e,n){"use strict";var r,i=n(483),o=/[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g,a=function(t){var e,n={},r=[];for(e=0;e<65536;e++)r.push(String.fromCharCode(e));return t.lastIndex=0,r.join("").replace(t,function(t){return n[t]="\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4),""}),t.lastIndex=0,n};t.exports={quote:function(t){var e=i.stringify(t);return o.lastIndex=0,o.test(e)?(r||(r=a(o)),e.replace(o,function(t){return r[t]})):e}}},function(t,e,n){(function(e){"use strict";var r=function(){};"production"!==e.env.NODE_ENV&&(r=n(459)("sockjs-client:utils:transport")),t.exports=function(t){return{filterToEnabled:function(e,n){var i={main:[],facade:[]};return e?"string"==typeof e&&(e=[e]):e=[],t.forEach(function(t){if(t)return"websocket"===t.transportName&&n.websocket===!1?void r("disabled from server","websocket"):e.length&&e.indexOf(t.transportName)===-1?void r("not in whitelist",t.transportName):void(t.enabled(n)?(r("enabled",t.transportName),i.main.push(t),t.facadeTransport&&i.facade.push(t.facadeTransport)):r("disabled",t.transportName))}),i}}}}).call(e,n(451))},function(t,e){(function(e){"use strict";var n={};["log","debug","warn"].forEach(function(t){var r;try{r=e.console&&e.console[t]&&e.console[t].apply}catch(t){}n[t]=r?function(){return e.console[t].apply(e.console,arguments)}:"log"===t?function(){}:n.log}),t.exports=n}).call(e,function(){return this}())},function(t,e){"use strict";function n(t){this.type=t}n.prototype.initEvent=function(t,e,n){return this.type=t,this.bubbles=e,this.cancelable=n,this.timeStamp=+new Date,this},n.prototype.stopPropagation=function(){},n.prototype.preventDefault=function(){},n.CAPTURING_PHASE=1,n.AT_TARGET=2,n.BUBBLING_PHASE=3,t.exports=n},function(t,e){(function(e){"use strict";t.exports=e.location||{origin:"http://localhost:80",protocol:"http",host:"localhost",port:80,href:"http://localhost/",hash:""}}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(){o.call(this),this.initEvent("close",!1,!1),this.wasClean=!1,this.code=0,this.reason=""}var i=n(462),o=n(500);i(r,o),t.exports=r},function(t,e,n){"use strict";function r(t){o.call(this),this.initEvent("message",!1,!1),this.data=t}var i=n(462),o=n(500);i(r,o),t.exports=r},function(t,e,n){(function(e){"use strict";function r(t,e){d(t);var n=this;i.call(this),setTimeout(function(){n.doXhr(t,e)},0)}var i=n(463).EventEmitter,o=n(462),a=n(455),s=n(477),u=n(472),h=n(474),l=n(505),f=n(506),c=n(508),d=function(){};"production"!==e.env.NODE_ENV&&(d=n(459)("sockjs-client:info-receiver")),o(r,i),r._getReceiver=function(t,e,n){return n.sameOrigin?new c(e,h):u.enabled?new c(e,u):s.enabled&&n.sameScheme?new c(e,s):f.enabled()?new f(t,e):new c(e,l)},r.prototype.doXhr=function(t,e){var n=this,i=a.addPath(t,"/info");d("doXhr",i),this.xo=r._getReceiver(t,i,e),this.timeoutRef=setTimeout(function(){d("timeout"),n._cleanup(!1),n.emit("finish")},r.timeout),this.xo.once("finish",function(t,e){d("finish",t,e),n._cleanup(!0),n.emit("finish",t,e)})},r.prototype._cleanup=function(t){d("_cleanup"),clearTimeout(this.timeoutRef),this.timeoutRef=null,!t&&this.xo&&this.xo.close(),this.xo=null},r.prototype.close=function(){d("close"),this.removeAllListeners(),this._cleanup(!1)},r.timeout=8e3,t.exports=r}).call(e,n(451))},function(t,e,n){"use strict";function r(){var t=this;i.call(this),this.to=setTimeout(function(){t.emit("finish",200,"{}")},r.timeout)}var i=n(463).EventEmitter,o=n(462);o(r,i),r.prototype.close=function(){clearTimeout(this.to)},r.timeout=2e3,t.exports=r},function(t,e,n){(function(e,r){"use strict";function i(t,e){var n=this;o.call(this);var i=function(){var r=n.ifr=new h(l.transportName,e,t);r.once("message",function(t){if(t){var e;try{e=s.parse(t)}catch(e){return f("bad json",t),n.emit("finish"),void n.close()}var r=e[0],i=e[1];n.emit("finish",r,i)}n.close()}),r.once("close",function(){n.emit("finish"),n.close()})};r.document.body?i():u.attachEvent("load",i)}var o=n(463).EventEmitter,a=n(462),s=n(483),u=n(452),h=n(482),l=n(507),f=function(){};"production"!==e.env.NODE_ENV&&(f=n(459)("sockjs-client:info-iframe")),a(i,o),i.enabled=function(){return h.enabled()},i.prototype.close=function(){this.ifr&&this.ifr.close(),this.removeAllListeners(),this.ifr=null},t.exports=i}).call(e,n(451),function(){return this}())},function(t,e,n){"use strict";function r(t){var e=this;o.call(this),this.ir=new u(t,s),this.ir.once("finish",function(t,n){e.ir=null,e.emit("message",a.stringify([t,n]))})}var i=n(462),o=n(463).EventEmitter,a=n(483),s=n(474),u=n(508);i(r,o),r.transportName="iframe-info-receiver",r.prototype.close=function(){this.ir&&(this.ir.close(),this.ir=null),this.removeAllListeners()},t.exports=r},function(t,e,n){(function(e){"use strict";function r(t,e){i.call(this);var n=this,r=+new Date;this.xo=new e("GET",t),this.xo.once("finish",function(t,e){var i,o;if(200===t){if(o=+new Date-r,e)try{i=a.parse(e)}catch(t){u("bad json",e)}s.isObject(i)||(i={})}n.emit("finish",i,o),n.removeAllListeners()})}var i=n(463).EventEmitter,o=n(462),a=n(483),s=n(487),u=function(){};"production"!==e.env.NODE_ENV&&(u=n(459)("sockjs-client:info-ajax")),o(r,i),r.prototype.close=function(){this.removeAllListeners(),this.xo.close()},t.exports=r}).call(e,n(451))},function(t,e,n){(function(e){"use strict";var r=n(455),i=n(452),o=n(483),a=n(510),s=n(507),u=n(486),h=n(501),l=function(){};"production"!==e.env.NODE_ENV&&(l=n(459)("sockjs-client:iframe-bootstrap")),t.exports=function(t,e){var n={};e.forEach(function(t){t.facadeTransport&&(n[t.facadeTransport.transportName]=t.facadeTransport)}),n[s.transportName]=s;var f;t.bootstrap_iframe=function(){var e;u.currentWindowId=h.hash.slice(1);var s=function(i){if(i.source===parent&&("undefined"==typeof f&&(f=i.origin),i.origin===f)){var s;try{s=o.parse(i.data)}catch(t){return void l("bad json",i.data)}if(s.windowId===u.currentWindowId)switch(s.type){case"s":var c;try{c=o.parse(s.data)}catch(t){l("bad json",s.data);break}var d=c[0],p=c[1],y=c[2],v=c[3];if(l(d,p,y,v),d!==t.version)throw new Error('Incompatible SockJS! Main site uses: "'+d+'", the iframe: "'+t.version+'".');if(!r.isOriginEqual(y,h.href)||!r.isOriginEqual(v,h.href))throw new Error("Can't connect to different domain from within an iframe. ("+h.href+", "+y+", "+v+")");e=new a(new n[p](y,v));break;case"m":e._send(s.data);break;case"c":e&&e._close(),e=null}}};i.attachEvent("message",s),u.postMessage("s")}}}).call(e,n(451))},function(t,e,n){"use strict";function r(t){this._transport=t,t.on("message",this._transportMessage.bind(this)),t.on("close",this._transportClose.bind(this))}var i=n(483),o=n(486);r.prototype._transportClose=function(t,e){o.postMessage("c",i.stringify([t,e]))},r.prototype._transportMessage=function(t){o.postMessage("t",t)},r.prototype._send=function(t){this._transport.send(t)},r.prototype._close=function(){this._transport.close(),this._transport.removeAllListeners()},t.exports=r}]);