1(window.webpackJsonp=window.webpackJsonp||[]).push([["effects"],{kvZ7:function(t,e,r){"use strict";r.r(e);var i=r("7W2i"),n=r.n(i),s=r("a1gu"),o=r.n(s),a=r("Nsbk"),h=r.n(a),u=r("lwsE"),l=r.n(u),c=r("W8MJ"),d=r.n(c),f=r("qSyC"),p=r("rn8W"),g=r("DzJC"),y=r.n(g);r("Dtww");function v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,i=h()(t);if(e){var n=h()(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return o()(this,r)}}var m=function(){function t(e){var r=this;l()(this,t);var i=document.getElementById("gwent-effects");if(this.spritesheet=i&&i.getAttribute("data-spritesheet")||"/img/effects/particle-spritesheet.json",e){this.syncCanvasSize(e),window.addEventListener("resize",y()((function(t){r.onResize(e),r.onVisibilityChange(r.checkVisible(e))}),300)),window.addEventListener("scroll",y()((function(t){r.onVisibilityChange(r.checkVisible(e))}),50)),document.addEventListener("visibilitychange",(function(){r.onVisibilityChange(r.checkVisible(e))})),this.app=new f.Application({width:e.width,height:e.height,transparent:!0,view:e,autoStart:!1}),this.app.stop(),this.app.stage.alpha=0,this.setupEmitters(e),this.effects=[],this.app.ticker.add(function(t){this.lastDelta?(t+=this.lastDelta,this.lastDelta=0,f.tweenManager.update(t),this.effects.forEach((function(e){e.update(t),e.draw(t)}))):this.lastDelta=t}.bind(this));var n=this.app.loader;this.setupLoader(n),n.load(this.onLoadedResources.bind(this))}}return d()(t,[{key:"checkVisible",value:function(t){if(!t||"visible"!==document.visibilityState)return!1;var e=t.getBoundingClientRect();return!(e.bottom<0||e.top-this.viewHeight>=0)}},{key:"syncCanvasSize",value:function(t){var e=window.getComputedStyle(t);t.width=parseInt(e.width),t.height=parseInt(e.height),this.viewHeight=Math.max(document.documentElement.clientHeight,window.innerHeight)}},{key:"addSprite",value:function(t,e,r,i,n){var s=new f.Sprite(e.texture);return s.x=r,s.y=i,n&&(s.x-=t.x,s.y-=t.y),t.addChild(s),s}},{key:"addEffects",value:function(t,e){e.forEach((function(e){e.init(t)})),this.effects=this.effects.concat(e)}},{key:"onVisibilityChange",value:function(t){this.isVisible!==t&&(t?(this.effects.forEach((function(t){t.reset()})),this.app.start()):this.app.stop(),this.isVisible=t)}},{key:"onResize",value:function(t){this.syncCanvasSize(t),this.app.renderer.resize(t.width,t.height),this.setupEmitters(t)}},{key:"onLoadedResources",value:function(t,e){this.container=new f.particles.ParticleContainer(400,{scale:!0,position:!0,rotation:!0,alpha:!0}),this.setupEffects(e),this.app.stage.addChild(this.container),this.onVisibilityChange(this.checkVisible(this.app.view)),this.fadeIn()}},{key:"setupLoader",value:function(t){t.add("particleSpriteSheet",this.spritesheet)}},{key:"fadeIn",value:function(t){var e=f.tweenManager.createTween(this.app.stage);e.stop().clear(),e.time=3e5,e.easing=f.tween.Easing.inOutCubic(),e.expire=!0,e.from({alpha:0}),e.to({alpha:1}),t&&e.on("end",t),e.start()}}]),t}(),_=function(t){n()(r,t);var e=v(r);function r(t){return l()(this,r),e.call(this,t)}return d()(r,[{key:"setupEmitters",value:function(t){this.setupSparkEmitters(t),this.setupSmokeEmitters(t)}},{key:"setupSparkEmitters",value:function(t){this.SparkEmitter?this.SparkEmitter.update(Math.ceil(t.width/1920*250),0,t.width,t.height,t.height,0):this.SparkEmitter=new p.b(!0,Math.ceil(t.width/1920*250),0,t.width,t.height,t.height,0,360,.2,.4,-.5,-1,-1,1,3e3,6e3,.5,.7,.2,.3)}},{key:"setupSmokeEmitters",value:function(t){this.SmokeEmitter?this.SmokeEmitter.update(Math.ceil(t.width/1920*250),0,t.width,t.height+30,t.height+50):this.SmokeEmitter=new p.b(!0,Math.ceil(t.width/1920*250),0,t.width,t.height+30,t.height+50,0,360,-.5,1,-1,-.1,-1,1,3e3,4e3,.9,1,.3,.5,!1,0,0,[8585185,16777215,16777215,16777215])}},{key:"setupEffects",value:function(t){this.addEffects(this.container,[new p.a(this.SmokeEmitter,[{image:f.Texture.fromFrame("smoke_001"),weight:3},{image:f.Texture.fromFrame("smoke_002"),weight:1},{image:f.Texture.fromFrame("smoke_003"),weight:1},{image:f.Texture.fromFrame("smoke_004"),weight:1}]),new p.a(this.SparkEmitter,[{image:f.Texture.fromFrame("spark_001"),weight:1}])])}}]),r}(m),x=function(t){n()(r,t);var e=v(r);function r(t){return l()(this,r),e.call(this,t)}return d()(r,[{key:"setupSparkEmitters",value:function(t){this.SparkEmitter?this.SparkEmitter.update(Math.ceil(t.width/1920*150),0,t.width,t.height,t.height,0):this.SparkEmitter=new p.b(!0,Math.ceil(t.width/1920*150),0,t.width,t.height,t.height,0,360,.2,.4,-.7,-1,-1,1,4e3,5e3,.7,1,.2,.3)}},{key:"setupSmokeEmitters",value:function(t){this.SmokeEmitter?this.SmokeEmitter.update(Math.ceil(t.width/1920*300),0,t.width,t.height+30,t.height+50):this.SmokeEmitter=new p.b(!0,Math.ceil(t.width/1920*300),0,t.width,t.height+30,t.height+50,0,360,.2,.4,-.4,-.4,-.9,1,5e3,6500,.7,1,.2,.3,!1,0,0,[16777215,16777215,16777215,16777215])}}]),r}(_),b=function(t){n()(r,t);var e=v(r);function r(t){return l()(this,r),e.call(this,t)}return d()(r,[{key:"setupSmokeEmitters",value:function(t){this.SmokeEmitter?this.SmokeEmitter.update(Math.ceil(t.width/1920*250),0,t.width,t.height+40,t.height+60):this.SmokeEmitter=new p.b(!0,Math.ceil(t.width/1920*250),0,t.width,t.height+40,t.height+60,0,360,.2,.4,-.3,-.7,-.5,.5,4e3,5e3,.9,1,.15,.25,!1,0,0,[16777215,16777215,16777215,16777215])}}]),r}(_),T=function(t){n()(r,t);var e=v(r);function r(t){return l()(this,r),e.call(this,t)}return d()(r,[{key:"setupSmokeEmitters",value:function(t){this.SmokeEmitter?this.SmokeEmitter.update(Math.ceil(t.width/1568*180),0,t.width,t.height+50,t.height+60):this.SmokeEmitter=new p.b(!0,Math.ceil(t.width/1568*180),0,t.width,t.height+50,t.height+60,0,360,.2,.3,-.2,-.4,-1,1,4e3,6e3,.9,1,.3,.4,!1,0,0,[16777215,16777215,16777215,16777215])}},{key:"setupSparkEmitters",value:function(t){this.SparkEmitter?this.SparkEmitter.update(Math.ceil(t.width/1568*100),0,t.width,t.height,t.height,0):this.SparkEmitter=new p.b(!0,Math.ceil(t.width/1568*100),0,t.width,t.height,t.height,0,360,.2,.4,-.5,-1,-1,1,3e3,6e3,.5,.7,.2,.3)}}]),r}(_),w=function(t){n()(r,t);var e=v(r);function r(t){return l()(this,r),e.call(this,t)}return d()(r,[{key:"setupEmitters",value:function(t){this.SmokeTopEmitter||(this.SmokeTopEmitter=new p.b(!0,50,
1100,400,237,243,0,360,.2,.4,-.3,-.8,-1,1,4e3,5e3,.9,1,.17,.35,!1,0,0,[16777215,16777215,16777215,16777215])),this.SmokeLeftEmitter||(this.SmokeLeftEmitter=new p.b(!0,50,100,130,200,450,0,360,.2,.3,-.4,-.8,-1,1,4e3,5e3,.9,1,.2,.28,!1,0,0,[16777215,16777215,16777215,16777215])),this.SparkEmitter||(this.SparkEmitter=new p.b(!0,50,100,430,200,450,0,360,.7,1,-.7,-1.1,-1,1,2e3,4e3,.9,1,.5,1)),this.FrameTopEmitter||(this.FrameTopEmitter=new p.b(!0,50,100,395,192,196,0,360,0,0,-.2,-.2,-.2,.2,900,1e3,.3,.3,.2,.2)),this.FrameRightEmitter||(this.FrameRightEmitter=new p.b(!0,50,350,370,200,450,0,360,.1,.1,-.4,-.1,-.2,.2,800,1500,.5,.6,.1,.25))}},{key:"setupEffects",value:function(t){this.addEffects(this.container,[new p.a(this.SmokeTopEmitter,[{image:f.Texture.fromFrame("smoke_001"),weight:3},{image:f.Texture.fromFrame("smoke_002"),weight:1},{image:f.Texture.fromFrame("smoke_003"),weight:1},{image:f.Texture.fromFrame("smoke_004"),weight:1}]),new p.a(this.SmokeLeftEmitter,[{image:f.Texture.fromFrame("smoke_001"),weight:3},{image:f.Texture.fromFrame("smoke_002"),weight:1},{image:f.Texture.fromFrame("smoke_003"),weight:1},{image:f.Texture.fromFrame("smoke_004"),weight:1}]),new p.a(this.SparkEmitter,[{image:f.Texture.fromFrame("spark_001"),weight:1}]),new p.a(this.FrameTopEmitter,[{image:f.Texture.fromFrame("frame_001"),weight:1}]),new p.a(this.FrameRightEmitter,[{image:f.Texture.fromFrame("frame_001"),weight:1}])])}}]),r}(m),E=function(t){n()(r,t);var e=v(r);function r(t){return l()(this,r),e.call(this,t)}return d()(r,[{key:"setupEmitters",value:function(t){var e=t.width/4,r=t.width-e,i=t.height/3,n=t.height-i;this.SmokeEmitter?this.SmokeEmitter.update(80,e+10,r-10,i,n,!0):this.SmokeEmitter=new p.b(!0,80,e+10,r-10,i,n,0,360,-.1,.1,-.1,.1,-.5,.5,3e3,4500,.5,.7,1,1),this.SparkEmitter?this.SparkEmitter.update(60,e,r,i,n,!0):this.SparkEmitter=new p.b(!0,60,e,r,i,n,0,360,-.5,.5,-.5,.5,-.5,.5,3e3,5e3,.9,1,.5,1)}},{key:"setupEffects",value:function(t){this.addEffects(this.container,[new p.a(this.SmokeEmitter,[{image:f.Texture.fromFrame("smoke_001"),weight:3},{image:f.Texture.fromFrame("smoke_002"),weight:1},{image:f.Texture.fromFrame("smoke_003"),weight:1},{image:f.Texture.fromFrame("smoke_004"),weight:1}]),new p.a(this.SparkEmitter,[{image:f.Texture.fromFrame("spark_001"),weight:1}])])}}]),r}(m),S=function(t){n()(r,t);var e=v(r);function r(t){return l()(this,r),e.call(this,t)}return d()(r,[{key:"setupEmitters",value:function(t){var e=t.width-50,r=t.height/2,i=t.height-r;this.SmokeEmitter=new p.b(!0,70,50,e,r,i,0,360,-.4,.4,-.3,.3,-.5,.5,3e3,4500,.5,.7,1,1)}},{key:"setupEffects",value:function(t){this.addEffects(this.container,[new p.a(this.SmokeEmitter,[{image:f.Texture.fromFrame("smoke_001"),weight:3},{image:f.Texture.fromFrame("smoke_002"),weight:1},{image:f.Texture.fromFrame("smoke_003"),weight:1},{image:f.Texture.fromFrame("smoke_004"),weight:1}])])}}]),r}(m),M=function(t){n()(r,t);var e=v(r);function r(t){return l()(this,r),e.call(this,t)}return d()(r,[{key:"setupEmitters",value:function(t){this.SmokeEmitter=new p.b(!0,50,60,80,240,420,0,360,.6,.9,-.1,.2,-.5,.5,5e3,6e3,.5,.7,1,1),this.SparkEmitter=new p.b(!0,50,0,100,150,450,0,360,.7,1,-.7,-1.1,-1,1,2e3,4e3,.9,1,.5,1)}},{key:"setupEffects",value:function(t){this.addEffects(this.container,[new p.a(this.SmokeEmitter,[{image:f.Texture.fromFrame("smoke_001"),weight:3},{image:f.Texture.fromFrame("smoke_002"),weight:1},{image:f.Texture.fromFrame("smoke_003"),weight:1},{image:f.Texture.fromFrame("smoke_004"),weight:1}]),new p.a(this.SparkEmitter,[{image:f.Texture.fromFrame("spark_001"),weight:1}])])}}]),r}(m),O=function(t){n()(r,t);var e=v(r);function r(t){return l()(this,r),e.call(this,t)}return d()(r,[{key:"setupEmitters",value:function(t){this.SmokeEmitter=new p.b(!0,50,370,400,300,520,0,360,-.7,-1,-.1,-.2,-.5,.5,4e3,5500,.5,.7,1,1),this.SparkEmitter=new p.b(!0,50,410,450,250,550,0,360,-.7,-1,-.5,-.7,-1,1,3e3,4500,.9,1,.5,1)}}]),r}(M);!function(){setTimeout(function(t){new w(document.querySelector(".l-header__effects-card-back")),new x(document.querySelector(".l-header__effects-front")),new M(document.querySelector(".l-top-background-effects__right")),new O(document.querySelector(".l-top-background-effects__left")),new S(document.querySelector(".l-top-background-effects__middle")),new E(document.querySelector(".l-features__effects canvas")),new T(document.querySelector(".l-big-feature__effects-front")),new b(document.querySelector(".s-play-footer__bg"))}.bind(this,!1),100)}()},qSyC:function(t,e,r){(function(i){var n,s,o,a,h=r("cDf5");!function(r){"object"==h(e)&&void 0!==t?t.exports=r():(s=[],void 0===(o="function"==typeof(n=r)?n.apply(e,s):n)||(t.exports=o))}((function(){return function t(e,r,i){function n(o,h){if(!r[o]){if(!e[o]){if(!h&&"function"==typeof a&&a)return a(o,!0);if(s)return s(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[o]={exports:{}};e[o][0].call(l.exports,(function(t){return n(e[o][1][t]||t)}),l,l.exports,t,e,r,i)}return r[o].exports}for(var s="function"==typeof a&&a,o=0;o<i.length;o++)n(i[o]);return n}({1:[function(t,e,r){"use strict";function i(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t<e)},r.max=function(t,e){return t^(t^e)&-(t<e)},r.isPow2=function(t){return!(t&t-1||!t)},r.log2=function(t){var e,r;return e=(t>65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},r.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},r.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=i,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,i=e,n=7;for(r>>>=1;r;r>>>=1)i<<=1,i|=1&r,--n;t[e]=i<<n&255}}(n),r.reverse=function(t){return n[255&t]<<24|n[t>>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},r.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},r.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>i(t)+1}},{}],2:[function(t,e,r){},{}],3:[function(t,e,r){"use strict";function i(t,e,r){r=r||2;var i,s,a,h,u,l,d,f=e&&e.length,p=f?e[0]*r:t.length,g=n(t,0,p,r,!0),y=[];if(!g)return y;if(f&&(g=c(t,e,g,r)),t.length>80*r){i=a=t[0],s=h=t[1];for(var v=r;v<p;v+=r)(u=t[v])<i&&(i=u),(l=t[v+1])<s&&(s=l),u>a&&(a=u),l>h&&(h=l);d=0!==(d=Math.max(a-i,h-s))?1/d:0}return o(g,y,r,i,s,d),y}function n(t,e,r,i,n){var s,o;if(n===O(t,e,r,i)>0)for(s=e;s<r;s+=i)o=E(s,t[s],t[s+1],o);else for(s=r-i;s>=e;s-=i)o=E(s,t[s],t[s+1],o);return o&&x(o,o.next)&&(S(o),o=o.next),o}function s(t,e){if(!t)return t;e||(e=t);var r,i=t;do{if(r=!1,i.steiner||!x(i,i.next)&&0!==_(i.prev,i,i.next))i=i.next;else{if(S(i),(i=e=i.prev)===i.next)break;r=!0}}while(r||i!==e);return e}function o(t,e,r,i,n,c,d){if(t){!d&&c&&p(t,i,n,c);for(var f,g,y=t;t.prev!==t.next;
vendor: 3,503 bytes, line 1
1)if(f=t.prev,g=t.next,c?h(t,i,n,c):a(t))e.push(f.i/r),e.push(t.i/r),e.push(g.i/r),S(t),t=g.next,y=g.next;else if((t=g)===y){d?1===d?o(t=u(t,e,r),e,r,i,n,c,2):2===d&&l(t,e,r,i,n,c):o(s(t),e,r,i,n,c,1);break}}}function a(t){var e=t.prev,r=t,i=t.next;if(_(e,r,i)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(v(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&_(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function h(t,e,r,i){var n=t.prev,s=t,o=t.next;if(_(n,s,o)>=0)return!1;for(var a=n.x<s.x?n.x<o.x?n.x:o.x:s.x<o.x?s.x:o.x,h=n.y<s.y?n.y<o.y?n.y:o.y:s.y<o.y?s.y:o.y,u=n.x>s.x?n.x>o.x?n.x:o.x:s.x>o.x?s.x:o.x,l=n.y>s.y?n.y>o.y?n.y:o.y:s.y>o.y?s.y:o.y,c=g(a,h,e,r,i),d=g(u,l,e,r,i),f=t.prevZ,p=t.nextZ;f&&f.z>=c&&p&&p.z<=d;){if(f!==t.prev&&f!==t.next&&v(n.x,n.y,s.x,s.y,o.x,o.y,f.x,f.y)&&_(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,p!==t.prev&&p!==t.next&&v(n.x,n.y,s.x,s.y,o.x,o.y,p.x,p.y)&&_(p.prev,p,p.next)>=0)return!1;p=p.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&v(n.x,n.y,s.x,s.y,o.x,o.y,f.x,f.y)&&_(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;p&&p.z<=d;){if(p!==t.prev&&p!==t.next&&v(n.x,n.y,s.x,s.y,o.x,o.y,p.x,p.y)&&_(p.prev,p,p.next)>=0)return!1;p=p.nextZ}return!0}function u(t,e,r){var i=t;do{var n=i.prev,s=i.next.next;!x(n,s)&&b(n,i,i.next,s)&&T(n,s)&&T(s,n)&&(e.push(n.i/r),e.push(i.i/r),e.push(s.i/r),S(i),S(i.next),i=t=s),i=i.next}while(i!==t);return i}function l(t,e,r,i,n,a){var h=t;do{for(var u=h.next.next;u!==h.prev;){if(h.i!==u.i&&m(h,u)){var l=w(h,u);return h=s(h,h.next),l=s(l,l.next),o(h,e,r,i,n,a),void o(l,e,r,i,n,a)}u=u.next}h=h.next}while(h!==t)}function c(t,e,r,i){var o,a,h,u=[];for(o=0,a=e.length;o<a;o++)(h=n(t,e[o]*i,o<a-1?e[o+1]*i:t.length,i,!1))===h.next&&(h.steiner=!0),u.push(y(h));for(u.sort(d),o=0;o<u.length;o++)f(u[o],r),r=s(r,r.next);return r}function d(t,e){return t.x-e.x}function f(t,e){if(e=function(t,e){var r,i=e,n=t.x,s=t.y,o=-1/0;do{if(s<=i.y&&s>=i.next.y&&i.next.y!==i.y){var a=i.x+(s-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=n&&a>o){if(o=a,a===n){if(s===i.y)return i;if(s===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!r)return null;if(n===o)return r.prev;var h,u=r,l=r.x,c=r.y,d=1/0;for(i=r.next;i!==u;)n>=i.x&&i.x>=l&&n!==i.x&&v(s<c?n:o,s,l,c,s<c?o:n,s,i.x,i.y)&&((h=Math.abs(s-i.y)/(n-i.x))<d||h===d&&i.x>r.x)&&T(i,t)&&(r=i,d=h),i=i.next;return r}(t,e)){var r=w(e,t);s(r,r.next)}}function p(t,e,r,i){var n=t;do{null===n.z&&(n.z=g(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,r,i,n,s,o,a,h,u=1;do{for(r=t,t=null,s=null,o=0;r;){for(o++,i=r,a=0,e=0;e<u&&(a++,i=i.nextZ);e++);for(h=u;a>0||h>0&&i;)0!==a&&(0===h||!i||r.z<=i.z)?(n=r,r=r.nextZ,a--):(n=i,i=i.nextZ,h--),s?s.nextZ=n:t=n,n.prevZ=s,s=n;r=i}s.nextZ=null,u*=2}while(o>1)}(n)}function g(t,e,r,i,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function y(t){var e=t,r=t;do{e.x<r.x&&(r=e),e=e.next}while(e!==t);return r}function v(t,e,r,i,n,s,o,a){return(n-o)*(e-a)-(t-o)*(s-a)>=0&&(t-o)*(i-a)-(r-o)*(e-a)>=0&&(r-o)*(s-a)-(n-o)*(i-a)>=0}function m(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&b(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&T(t,e)&&T(e,t)&&function(t,e){var r=t,i=!1,n=(t.x+e.x)/2,s=(t.y+e.y)/2;do{r.y>s!=r.next.y>
1s&&r.next.y!==r.y&&n<(r.next.x-r.x)*(s-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next}while(r!==t);return i}(t,e)}function _(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,r,i){return!!(x(t,e)&&x(r,i)||x(t,i)&&x(r,e))||_(t,e,r)>0!=_(t,e,i)>0&&_(r,i,t)>0!=_(r,i,e)>0}function T(t,e){return _(t.prev,t,t.next)<0?_(t,e,t.next)>=0&&_(t,t.prev,e)>=0:_(t,e,t.prev)<0||_(t,t.next,e)<0}function w(t,e){var r=new M(t.i,t.x,t.y),i=new M(e.i,e.x,e.y),n=t.next,s=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,s.next=i,i.prev=s,i}function E(t,e,r,i){var n=new M(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function S(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 M(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function O(t,e,r,i){for(var n=0,s=e,o=r-i;s<r;s+=i)n+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return n}e.exports=i,e.exports.default=i,i.deviation=function(t,e,r,i){var n=e&&e.length,s=n?e[0]*r:t.length,o=Math.abs(O(t,0,s,r));if(n)for(var a=0,h=e.length;a<h;a++){var u=e[a]*r,l=a<h-1?e[a+1]*r:t.length;o-=Math.abs(O(t,u,l,r))}var c=0;for(a=0;a<i.length;a+=3){var d=i[a]*r,f=i[a+1]*r,p=i[a+2]*r;c+=Math.abs((t[d]-t[p])*(t[f+1]-t[d+1])-(t[d]-t[f])*(t[p+1]-t[d+1]))}return 0===o&&0===c?0:Math.abs((c-o)/o)},i.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},i=0,n=0;n<t.length;n++){for(var s=0;s<t[n].length;s++)for(var o=0;o<e;o++)r.vertices.push(t[n][s][o]);n>0&&(i+=t[n-1].length,r.holes.push(i))}return r}},{}],4:[function(t,e,r){"use strict";function i(){}function n(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function s(){this._events=new i,this._eventsCount=0}var o=Object.prototype.hasOwnProperty,a="~";Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(a=!1)),s.prototype.eventNames=function(){var t,e,r=[];if(0===this._eventsCount)return r;for(e in t=this._events)o.call(t,e)&&r.push(a?e.slice(1):e);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(t)):r},s.prototype.listeners=function(t,e){var r=a?a+t:t,i=this._events[r];if(e)return!!i;if(!i)return[];if(i.fn)return[i.fn];for(var n=0,s=i.length,o=new Array(s);n<s;n++)o[n]=i[n].fn;return o},s.prototype.emit=function(t,e,r,i,n,s){var o=a?a+t:t;if(!this._events[o])return!1;var h,u,l=this._events[o],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,r),!0;case 4:return l.fn.call(l.context,e,r,i),!0;case 5:return l.fn.call(l.context,e,r,i,n),!0;case 6:return l.fn.call(l.context,e,r,i,n,s),!0}for(u=1,h=new Array(c-1);u<c;u++)h[u-1]=arguments[u];l.fn.apply(l.context,h)}else{var d,f=l.length;for(u=0;u<f;u++)switch(l[u].once&&this.removeListener(t,l[u].fn,void 0,!0),c){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,e);break;case 3:l[u].fn.call(l[u].context,e,r);break;case 4:l[u].fn.call(l[u].context,e,r,i);break;default:if(!h)for(d=1,h=new Array(c-1);d<c;d++)h[d-1]=arguments[d];l[u].fn.apply(l[u].context,h)}}return!0},s.prototype.on=function(t,e,r){var i=new n(e,r||this),s=a?a+t:t;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],i]:this._events[s].push(i):(this._events[s]=i,this._eventsCount++),this},s.prototype.once=function(t,e,r){var i=new n(e,r||this,!0),s=a?a+t:t;return this._events[s]?this._events[s].fn?this._events[s]=[this._events[s],i]:this._events[s].push(i):(this._events[s]=i,this._eventsCount++),this},s.prototype.removeListener=function(t,e,r,n){var s=a?a+t:t;if(!this._events[s])return this;if(!e)return 0==--this._eventsCount?this._events=new i:delete this._events[s],this;var o=this._events[s];if(o.fn)o.fn!==e||n&&!o.once||r&&o.context!==r||(0==--this._eventsCount?this._events=new i:delete this._events[s]);else{for(var h=0,u=[],l=o.length;h<l;h++)(o[h].fn!==e||n&&!o[h].once||r&&o[h].context!==r)&&u.push(o[h]);u.length?this._events[s]=1===u.length?u[0]:u:0==--this._eventsCount?this._events=new i:delete this._events[s]}return this},s.prototype.removeAllListeners=function(t){var e;return t?(e=a?a+t:t,this._events[e]&&(0==--this._eventsCount?this._events=new i:delete this._events[e])):(this._events=new i,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prototype.setMaxListeners=function(){return this},s.prefixed=a,s.EventEmitter=s,void 0!==e&&(e.exports=s)},{}],5:[function(t,e,r){!function(t){var r=/iPhone/i,i=/iPod/i,n=/iPad/i,s=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,o=/Android/i,a=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,h=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,u=/Windows Phone/i,l=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,c=/BlackBerry/i,d=/BB10/i,f=/Opera Mini/i,p=/(CriOS|Chrome)(?=.*\bMobile\b)/i,g=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,y=new RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),v=function(t,e){return t.test(e)},m=function(t){var e=t||navigator.userAgent,m=e.split("[FBAN");if(void 0!==m[1]&&(e=m[0]),void 0!==(m=e.split("Twitter"))[1]&&(e=m[0]),this.apple={phone:v(r,e),ipod:v(i,e),tablet:!v(r,e)&&v(n,e),device:v(r,e)||v(i,e)||v(n,e)},this.amazon={phone:v(a,e),tablet:!v(a,e)&&v(h,e),device:v(a,e)||v(h,e)},this.android={phone:v(a,e)||v(s,e),tablet:!v(a,e)&&!v(s,e)&&(v(h,e)||v(o,e)),device:v(a,e)||v(h,e)||v(s,e)||v(o,e)}
1,this.windows={phone:v(u,e),tablet:v(l,e),device:v(u,e)||v(l,e)},this.other={blackberry:v(c,e),blackberry10:v(d,e),opera:v(f,e),firefox:v(g,e),chrome:v(p,e),device:v(c,e)||v(d,e)||v(f,e)||v(g,e)||v(p,e)},this.seven_inch=v(y,e),this.any=this.apple.device||this.android.device||this.windows.device||this.other.device||this.seven_inch,this.phone=this.apple.phone||this.android.phone||this.windows.phone,this.tablet=this.apple.tablet||this.android.tablet||this.windows.tablet,"undefined"==typeof window)return this},_=function(){var t=new m;return t.Class=m,t};void 0!==e&&e.exports&&"undefined"==typeof window?e.exports=m:void 0!==e&&e.exports&&"undefined"!=typeof window?e.exports=_():t.isMobile=_()}(this)},{}],6:[function(t,e,r){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){return t._head?(t._tail._next=e,e._prev=t._tail,t._tail=e):(t._head=e,t._tail=e),e._owner=t,e}Object.defineProperty(r,"__esModule",{value:!0});var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),o=function(){function t(e,r,n){void 0===r&&(r=!1),i(this,t),this._fn=e,this._once=r,this._thisArg=n,this._next=this._prev=this._owner=null}return s(t,[{key:"detach",value:function(){return null!==this._owner&&(this._owner.detach(this),!0)}}]),t}(),a=function(){function t(){i(this,t),this._head=this._tail=void 0}return s(t,[{key:"handlers",value:function(){var t=!(arguments.length<=0||void 0===arguments[0])&&arguments[0],e=this._head;if(t)return!!e;for(var r=[];e;)r.push(e),e=e._next;return r}},{key:"has",value:function(t){if(!(t instanceof o))throw new Error("MiniSignal#has(): First arg must be a MiniSignalBinding object.");return t._owner===this}},{key:"dispatch",value:function(){var t=this._head;if(!t)return!1;for(;t;)t._once&&this.detach(t),t._fn.apply(t._thisArg,arguments),t=t._next;return!0}},{key:"add",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof t)throw new Error("MiniSignal#add(): First arg must be a Function.");return n(this,new o(t,!1,e))}},{key:"once",value:function(t){var e=arguments.length<=1||void 0===arguments[1]?null:arguments[1];if("function"!=typeof t)throw new Error("MiniSignal#once(): First arg must be a Function.");return n(this,new o(t,!0,e))}},{key:"detach",value:function(t){if(!(t instanceof o))throw new Error("MiniSignal#detach(): First arg must be a MiniSignalBinding object.");return t._owner!==this?this:(t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t===this._head?(this._head=t._next,null===t._next&&(this._tail=null)):t===this._tail&&(this._tail=t._prev,this._tail._next=null),t._owner=null,this)}},{key:"detachAll",value:function(){var t=this._head;if(!t)return this;for(this._head=this._tail=null;t;)t._owner=null,t=t._next;return this}}]),t}();a.MiniSignalBinding=o,r.default=a,e.exports=r.default},{}],7:[function(t,e,r){"use strict";function i(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var n=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(t){i[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,a,h=i(t),u=1;u<arguments.length;u++){for(var l in r=Object(arguments[u]))s.call(r,l)&&(h[l]=r[l]);if(n){a=n(r);for(var c=0;c<a.length;c++)o.call(r,a[c])&&(h[a[c]]=r[a[c]])}}return h}},{}],8:[function(t,e,r){"use strict";e.exports=function(t,e){e=e||{};for(var r={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},i=r.parser[e.strictMode?"strict":"loose"].exec(t),n={},s=14;s--;)n[r.key[s]]=i[s]||"";return n[r.q.name]={}
1,n[r.key[12]].replace(r.q.parser,(function(t,e,i){e&&(n[r.q.name][e]=i)})),n}},{}],9:[function(t,e,r){(function(t){function e(t,e){for(var r=0,i=t.length-1;i>=0;i--){var n=t[i];"."===n?t.splice(i,1):".."===n?(t.splice(i,1),r++):r&&(t.splice(i,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function i(t,e){if(t.filter)return t.filter(e);for(var r=[],i=0;i<t.length;i++)e(t[i],i,t)&&r.push(t[i]);return r}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s=function(t){return n.exec(t).slice(1)};r.resolve=function(){for(var r="",n=!1,s=arguments.length-1;s>=-1&&!n;s--){var o=s>=0?arguments[s]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(r=o+"/"+r,n="/"===o.charAt(0))}return(n?"/":"")+(r=e(i(r.split("/"),(function(t){return!!t})),!n).join("/"))||"."},r.normalize=function(t){var n=r.isAbsolute(t),s="/"===o(t,-1);return(t=e(i(t.split("/"),(function(t){return!!t})),!n).join("/"))||n||(t="."),t&&s&&(t+="/"),(n?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(i(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},r.relative=function(t,e){function i(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var n=i(t.split("/")),s=i(e.split("/")),o=Math.min(n.length,s.length),a=o,h=0;h<o;h++)if(n[h]!==s[h]){a=h;break}var u=[];for(h=a;h<n.length;h++)u.push("..");return(u=u.concat(s.slice(a))).join("/")},r.sep="/",r.delimiter=":",r.dirname=function(t){var e=s(t),r=e[0],i=e[1];return r||i?(i&&(i=i.substr(0,i.length-1)),r+i):"."},r.basename=function(t,e){var r=s(t)[2];return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},r.extname=function(t){return s(t)[3]};var o="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,t("_process"))},{_process:27}],10:[function(t,e,r){var i=new ArrayBuffer(0),n=function(t,e,r,n){this.gl=t,this.buffer=t.createBuffer(),this.type=e||t.ARRAY_BUFFER,this.drawType=n||t.STATIC_DRAW,this.data=i,r&&this.upload(r),this._updateID=0};n.prototype.upload=function(t,e,r){r||this.bind();var i=this.gl;t=t||this.data,e=e||0,this.data.byteLength>=t.byteLength?i.bufferSubData(this.type,e,t):i.bufferData(this.type,t,this.drawType),this.data=t},n.prototype.bind=function(){this.gl.bindBuffer(this.type,this.buffer)},n.createVertexBuffer=function(t,e,r){return new n(t,t.ARRAY_BUFFER,e,r)},n.createIndexBuffer=function(t,e,r){return new n(t,t.ELEMENT_ARRAY_BUFFER,e,r)},n.create=function(t,e,r,i){return new n(t,e,r,i)},n.prototype.destroy=function(){this.gl.deleteBuffer(this.buffer)},e.exports=n},{}],11:[function(t,e,r){var i=t("./GLTexture"),n=function(t,e,r){this.gl=t,this.framebuffer=t.createFramebuffer(),this.stencil=null,this.texture=null,this.width=e||100,this.height=r||100};n.prototype.enableTexture=function(t){var e=this.gl;this.texture=t||new i(e),this.texture.bind(),this.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture.texture,0)},n.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)}},n.prototype.clear=function(t,e,r,i){this.bind();var n=this.gl;n.clearColor(t,e,r,i),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT)},n.prototype.bind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer)},n.prototype.unbind=function(){var t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,null)},n.prototype.resize=function(t,e){var r=this.gl;this.width=t,this.height=e,this.texture&&this.texture.uploadData(null,t,e),this.stencil&&(r.bindRenderbuffer(r.RENDERBUFFER,this.stencil),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t,e))},n.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},n.createRGBA=function(t,e,r,s){var o=i.fromData(t,null,e,r);o.enableNearestScaling(),o.enableWrapClamp();var a=new n(t,e,r);return a.enableTexture(o),a.unbind(),a},n.createFloat32=function(t,e,r,s){var o=new i.fromData(t,s,e,r);o.enableNearestScaling(),o.enableWrapClamp();var a=new n(t,e,r);return a.enableTexture(o),a.unbind(),a},e.exports=n},{"./GLTexture":13}],12:[function(t,e,r){var i=t("./shader/compileProgram"),n=t("./shader/extractAttributes"),s=t("./shader/extractUniforms"),o=t("./shader/setPrecision"),a=t("./shader/generateUniformAccessObject"),h=function(t,e,r,h,u){this.gl=t,h&&(e=o(e,h),r=o(r,h)),this.program=i(t,e,r,u),this.attributes=n(t,this.program),this.uniformData=s(t,this.program),this.uniforms=a(t,this.uniformData)};h.prototype.bind=function(){return this.gl.useProgram(this.program),this},h.prototype.destroy=function(){this.attributes=null,this.uniformData=null,this.uniforms=null,this.gl.deleteProgram(this.program)},e.exports=h},{"./shader/compileProgram":18,"./shader/extractAttributes":20,"./shader/extractUniforms":21,"./shader/generateUniformAccessObject":22,"./shader/setPrecision":26}],13:[function(t,e,r){var i=function(t,e,r,i,n){this.gl=t,this.texture=t.createTexture(),this.mipmap=!1,this.premultiplyAlpha=!1,this.width=e||-1,this.height=r||-1,this.format=i||t.RGBA,this.type=n||t.UNSIGNED_BYTE};i.prototype.upload=function(t){this.bind();var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);var r=t.videoWidth||t.width,i=t.videoHeight||t.height;i!==this.height||r!==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=r,this.height=i};var n=!1;i.prototype.uploadData=function(t,e,r){this.bind();var i=this.gl;
1if(t instanceof Float32Array){if(!n){if(!i.getExtension("OES_texture_float"))throw new Error("floating point textures not available");n=!0}this.type=i.FLOAT}else this.type=this.type||i.UNSIGNED_BYTE;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),e!==this.width||r!==this.height?i.texImage2D(i.TEXTURE_2D,0,this.format,e,r,0,this.format,this.type,t||null):i.texSubImage2D(i.TEXTURE_2D,0,0,0,e,r,this.format,this.type,t||null),this.width=e,this.height=r},i.prototype.bind=function(t){var e=this.gl;void 0!==t&&e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},i.prototype.unbind=function(){var t=this.gl;t.bindTexture(t.TEXTURE_2D,null)},i.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)},i.prototype.magFilter=function(t){var e=this.gl;this.bind(),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t?e.LINEAR:e.NEAREST)},i.prototype.enableMipmap=function(){var t=this.gl;this.bind(),this.mipmap=!0,t.generateMipmap(t.TEXTURE_2D)},i.prototype.enableLinearScaling=function(){this.minFilter(!0),this.magFilter(!0)},i.prototype.enableNearestScaling=function(){this.minFilter(!1),this.magFilter(!1)},i.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)},i.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)},i.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)},i.prototype.destroy=function(){this.gl.deleteTexture(this.texture)},i.fromSource=function(t,e,r){var n=new i(t);return n.premultiplyAlpha=r||!1,n.upload(e),n},i.fromData=function(t,e,r,n){var s=new i(t);return s.uploadData(e,r,n),s},e.exports=i},{}],14:[function(t,e,r){function i(t,e){if(this.nativeVaoExtension=null,i.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 r=t.getParameter(t.MAX_VERTEX_ATTRIBS);this.nativeState={tempAttribState:new Array(r),attribState:new Array(r)}}this.gl=t,this.attributes=[],this.indexBuffer=null,this.dirty=!1}var n=t("./setVertexAttribArrays");i.prototype.constructor=i,e.exports=i,i.FORCE_NATIVE=!1,i.prototype.bind=function(){if(this.nativeVao){if(this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.dirty)return this.dirty=!1,this.activate(),this;this.indexBuffer&&this.indexBuffer.bind()}else this.activate();return this},i.prototype.unbind=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(null),this},i.prototype.activate=function(){for(var t=this.gl,e=null,r=0;r<this.attributes.length;r++){var i=this.attributes[r];e!==i.buffer&&(i.buffer.bind(),e=i.buffer),t.vertexAttribPointer(i.attribute.location,i.attribute.size,i.type||t.FLOAT,i.normalized||!1,i.stride||0,i.start||0)}return n(t,this.attributes,this.nativeState),this.indexBuffer&&this.indexBuffer.bind(),this},i.prototype.addAttribute=function(t,e,r,i,n,s){return this.attributes.push({buffer:t,attribute:e,location:e.location,type:r||this.gl.FLOAT,normalized:i||!1,stride:n||0,start:s||0}),this.dirty=!0,this},i.prototype.addIndex=function(t){return this.indexBuffer=t,this.dirty=!0,this},i.prototype.clear=function(){return this.nativeVao&&this.nativeVaoExtension.bindVertexArrayOES(this.nativeVao),this.attributes.length=0,this.indexBuffer=null,this},i.prototype.draw=function(t,e,r){var i=this.gl;return this.indexBuffer?i.drawElements(t,e||this.indexBuffer.data.length,i.UNSIGNED_SHORT,2*(r||0)):i.drawArrays(t,r,e||this.get
1Size()),this},i.prototype.destroy=function(){this.gl=null,this.indexBuffer=null,this.attributes=null,this.nativeState=null,this.nativeVao&&this.nativeVaoExtension.deleteVertexArrayOES(this.nativeVao),this.nativeVaoExtension=null,this.nativeVao=null},i.prototype.getSize=function(){var t=this.attributes[0];return t.buffer.data.length/(t.stride/4||t.attribute.size)}},{"./setVertexAttribArrays":17}],15:[function(t,e,r){e.exports=function(t,e){var r=t.getContext("webgl",e)||t.getContext("experimental-webgl",e);if(!r)throw new Error("This browser does not support webGL. Try using the canvas renderer");return r}},{}],16:[function(t,e,r){var i={createContext:t("./createContext"),setVertexAttribArrays:t("./setVertexAttribArrays"),GLBuffer:t("./GLBuffer"),GLFramebuffer:t("./GLFramebuffer"),GLShader:t("./GLShader"),GLTexture:t("./GLTexture"),VertexArrayObject:t("./VertexArrayObject"),shader:t("./shader")};void 0!==e&&e.exports&&(e.exports=i),"undefined"!=typeof window&&(window.PIXI=window.PIXI||{},window.PIXI.glCore=i)},{"./GLBuffer":10,"./GLFramebuffer":11,"./GLShader":12,"./GLTexture":13,"./VertexArrayObject":14,"./createContext":15,"./setVertexAttribArrays":17,"./shader":23}],17:[function(t,e,r){e.exports=function(t,e,r){var i;if(r){var n=r.tempAttribState,s=r.attribState;for(i=0;i<n.length;i++)n[i]=!1;for(i=0;i<e.length;i++)n[e[i].attribute.location]=!0;for(i=0;i<s.length;i++)s[i]!==n[i]&&(s[i]=n[i],r.attribState[i]?t.enableVertexAttribArray(i):t.disableVertexAttribArray(i))}else for(i=0;i<e.length;i++){var o=e[i];t.enableVertexAttribArray(o.attribute.location)}}},{}],18:[function(t,e,r){var i=function(t,e,r){var i=t.createShader(e);return t.shaderSource(i,r),t.compileShader(i),t.getShaderParameter(i,t.COMPILE_STATUS)?i:(console.log(t.getShaderInfoLog(i)),null)};e.exports=function(t,e,r,n){var s=i(t,t.VERTEX_SHADER,e),o=i(t,t.FRAGMENT_SHADER,r),a=t.createProgram();if(t.attachShader(a,s),t.attachShader(a,o),n)for(var h in n)t.bindAttribLocation(a,n[h],h);return t.linkProgram(a),t.getProgramParameter(a,t.LINK_STATUS)||(console.error("Pixi.js Error: Could not initialize shader."),console.error("gl.VALIDATE_STATUS",t.getProgramParameter(a,t.VALIDATE_STATUS)),console.error("gl.getError()",t.getError()),""!==t.getProgramInfoLog(a)&&console.warn("Pixi.js Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(a)),t.deleteProgram(a),a=null),t.deleteShader(s),t.deleteShader(o),a}},{}],19:[function(t,e,r){var i=function(t){for(var e=new Array(t),r=0;r<e.length;r++)e[r]=!1;return e};e.exports=function(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"sampler2D":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"bool":return!1;case"bvec2":return i(2*e);case"bvec3":return i(3*e);case"bvec4":return i(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}}},{}],20:[function(t,e,r){var i=t("./mapType"),n=t("./mapSize"),s=function(t,e,r,i){gl.vertexAttribPointer(this.location,this.size,t||gl.FLOAT,e||!1,r||0,i||0)};e.exports=function(t,e){for(var r={},o=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),a=0;a<o;a++){var h=t.getActiveAttrib(e,a),u=i(t,h.type);r[h.name]={type:u,size:n(u),location:t.getAttribLocation(e,h.name),pointer:s}}return r}},{"./mapSize":24,"./mapType":25}],21:[function(t,e,r){var i=t("./mapType"),n=t("./defaultValue");e.exports=function(t,e){for(var r={},s=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),o=0;o<s;o++){var a=t.getActiveUniform(e,o),h=a.name.replace(/\[.*?\]/,""),u=i(t,a.type);r[h]={type:u,size:a.size,location:t.getUniformLocation(e,h),value:n(u,a.size)}}return r}},{"./defaultValue":19,"./mapType":25}],22:[function(t,e,r){function i(t,e){return function(r){this.data[t].value=r;var i=this.data[t].location;1===e.size?o[e.type](this.gl,i,r):a[e.type](this.gl,i,r)}}function n(t,e){for(var r=e,i=0;i<t.length-1;i++){var n=r[t[i]]||{data:{}};r[t[i]]=n,r=n}return r}var s=function(t){return function(){return this.data[t].value}},o={float:function(t,e,r){t.uniform1f(e,r)},vec2:function(t,e,r){t.uniform2f(e,r[0],r[1])},vec3:function(t,e,r){t.uniform3f(e,r[0],r[1],r[2])},vec4:function(t,e,r){t.uniform4f(e,r[0],r[1],r[2],r[3])},int:function(t,e,r){t.uniform1i(e,r)},ivec2:function(t,e,r){t.uniform2i(e,r[0],r[1])},ivec3:function(t,e,r){t.uniform3i(e,r[0],r[1],r[2])},ivec4:function(t,e,r){t.uniform4i(e,r[0],r[1],r[2],r[3])},bool:function(t,e,r){t.uniform1i(e,r)},bvec2:function(t,e,r){t.uniform2i(e,r[0],r[1])},bvec3:function(t,e,r){t.uniform3i(e,r[0],r[1],r[2])},bvec4:function(t,e,r){t.uniform4i(e,r[0],r[1],r[2],r[3])},mat2:function(t,e,r){t.uniformMatrix2fv(e,!1,r)},mat3:function(t,e,r){t.uniformMatrix3fv(e,!1,r)},mat4:function(t,e,r){t.uniformMatrix4fv(e,!1,r)},sampler2D:function(t,e,r){t.uniform1i(e,r)}},a={float:function(t,e,r){t.uniform1fv(e,r)},vec2:function(t,e,r){t.uniform2fv(e,r)},vec3:function(t,e,r){t.uniform3fv(e,r)},vec4:function(t,e,r){t.uniform4fv(e,r)},int:function(t,e,r){t.uniform1iv(e,r)},ivec2:function(t,e,r){t.uniform2iv(e,r)},ivec3:function(t,e,r){t.uniform3iv(e,r)},ivec4:function(t,e,r){t.uniform4iv(e,r)},bool:function(t,e,r){t.uniform1iv(e,r)},bvec2:function(t,e,r){t.uniform2iv(e,r)},bvec3:function(t,e,r){t.uniform3iv(e,r)},bvec4:function(t,e,r){t.uniform4iv(e,r)},sampler2D:function(t,e,r){t.uniform1iv(e,r)}};e.exports=function(t,e){var r={data:{}};r.gl=t;for(var o=Object.keys(e),a=0;a<o.length;a++){var h=o[a],u=h.split("."),l=u[u.length-1],c=n(u,r),d=e[h];c.data[l]=d,c.gl=t,Object.defineProperty(c,l,{get:s(l),set:i(l,d)})}return r}},{}],23:[function(t,e,r){e.exports={compileProgram:t("./compileProgram"),defaultValue:t("./defaultValue"),extractAttributes:t("./extractAttributes"),extractUniforms:t("./extractUniforms"),generateUniformAccessObject:t("./generateUniformAccessObject"),setPrecision:t("./setPrecision"),mapSize:t("./mapSize"),mapType:t("./mapType")}},{"./compileProgram":18,"./defaultValue":19,"./extractAttributes":20,"./extractUniforms":21,"./generateUniformAccessObject":22,"./mapSize":24,"./mapType":25,"./setPrecision":26}],24:[function(t,e,r){var i={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};e.exports=function(t){return i[t]}},{}],25:[function(t,e,r){var i=null,n={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D"};e.exports=function(t,e){if(!i){var r=Object.keys(n);i={};for(var s=0;s<r.length;++s){var o=r[s];i[t[o]]=n[o]}}return i[e]}},{}],26:[function(t,e,r){e.exports=function(t,e){return"precision"!==t.substring(0,9)?"precision "+e+" float;\n"+t:t}},{}],27:[function(t,e,r){function i(){throw new Error("setTimeout has not been defined")}function n(){throw new Error("clearTimeout has not been defined")}function s(t){if(l===setTimeout)return setTimeout(t,0);if((l===i||!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(){g&&f&&(g=!1,f.length?p=f.concat(p):y=-1,p.length&&a())}function a(){if(!g){var t=s(o);g=!0;for(var e=p.length;e;){for(f=p,p=[];++y<e;)f&&f[y].run();y=-1,e=p.length}f=null,g=!1,function(t){if(c===clearTimeout)return clearTimeout(t);if((c===n||!c)&&clearTimeout)return c=clearTimeout,clearTimeout(t);try{c(t)}catch(e){try{return c.call(null,t)}catch(e){return c.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function u(){}var l,c,d=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:i}catch(t){l=i}try{c="function"==typeof clearTimeout?clearTimeout:n}catch(t){c=n}}();var f,p=[],g=!1,y=-1;d.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];
1p.push(new h(t,e)),1!==p.length||g||s(a)},h.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=u,d.addListener=u,d.once=u,d.off=u,d.removeListener=u,d.removeAllListeners=u,d.emit=u,d.prependListener=u,d.prependOnceListener=u,d.listeners=function(t){return[]},d.binding=function(t){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(t){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},{}],28:[function(t,e,r){(function(t){!function(i){function n(t){throw new RangeError(D[t])}function s(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i}function o(t,e){var r=t.split("@"),i="";return r.length>1&&(i=r[0]+"@",t=r[1]),i+s((t=t.replace(P,".")).split("."),e).join(".")}function a(t){for(var e,r,i=[],n=0,s=t.length;n<s;)(e=t.charCodeAt(n++))>=55296&&e<=56319&&n<s?56320==(64512&(r=t.charCodeAt(n++)))?i.push(((1023&e)<<10)+(1023&r)+65536):(i.push(e),n--):i.push(e);return i}function u(t){return s(t,(function(t){var e="";return t>65535&&(e+=k((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+k(t)})).join("")}function l(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:b}function c(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function d(t,e,r){var i=0;for(t=r?L(t/S):t>>1,t+=L(t/e);t>I*w>>1;i+=b)t=L(t/I);return L(i+(I+1)*t/(t+E))}function f(t){var e,r,i,s,o,a,h,c,f,p,g=[],y=t.length,v=0,m=O,_=M;for((r=t.lastIndexOf(R))<0&&(r=0),i=0;i<r;++i)t.charCodeAt(i)>=128&&n("not-basic"),g.push(t.charCodeAt(i));for(s=r>0?r+1:0;s<y;){for(o=v,a=1,h=b;s>=y&&n("invalid-input"),((c=l(t.charCodeAt(s++)))>=b||c>L((x-v)/a))&&n("overflow"),v+=c*a,!(c<(f=h<=_?T:h>=_+w?w:h-_));h+=b)a>L(x/(p=b-f))&&n("overflow"),a*=p;_=d(v-o,e=g.length+1,0==o),L(v/e)>x-m&&n("overflow"),m+=L(v/e),v%=e,g.splice(v++,0,m)}return u(g)}function p(t){var e,r,i,s,o,h,u,l,f,p,g,y,v,m,_,E=[];for(y=(t=a(t)).length,e=O,r=0,o=M,h=0;h<y;++h)(g=t[h])<128&&E.push(k(g));for(i=s=E.length,s&&E.push(R);i<y;){for(u=x,h=0;h<y;++h)(g=t[h])>=e&&g<u&&(u=g);for(u-e>L((x-r)/(v=i+1))&&n("overflow"),r+=(u-e)*v,e=u,h=0;h<y;++h)if((g=t[h])<e&&++r>x&&n("overflow"),g==e){for(l=r,f=b;!(l<(p=f<=o?T:f>=o+w?w:f-o));f+=b)_=l-p,m=b-p,E.push(k(c(p+_%m,0))),l=L(_/m);E.push(k(c(l,0))),o=d(r,v,i==s),r=0,++i}++r,++e}return E.join("")}var g="object"==h(r)&&r&&!r.nodeType&&r,y="object"==h(e)&&e&&!e.nodeType&&e,v="object"==h(t)&&t;v.global!==v&&v.window!==v&&v.self!==v||(i=v);var m,_,x=2147483647,b=36,T=1,w=26,E=38,S=700,M=72,O=128,R="-",C=/^xn--/,A=/[^\x20-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,D={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=b-T,L=Math.floor,k=String.fromCharCode;if(m={version:"1.4.1",ucs2:{decode:a,encode:u},decode:f,encode:p,toASCII:function(t){return o(t,(function(t){return A.test(t)?"xn--"+p(t):t}))},toUnicode:function(t){return o(t,(function(t){return C.test(t)?f(t.slice(4).toLowerCase()):t}))}},g&&y)if(e.exports==g)y.exports=m;else for(_ in m)m.hasOwnProperty(_)&&(g[_]=m[_]);else i.punycode=m}(this)}).call(this,void 0!==i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],29:[function(t,e,r){"use strict";function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,s){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;var a=/\+/g;t=t.split(e);var h=1e3;s&&"number"==typeof s.maxKeys&&(h=s.maxKeys);var u=t.length;h>0&&u>h&&(u=h);for(var l=0;l<u;++l){var c,d,f,p,g=t[l].replace(a,"%20"),y=g.indexOf(r);y>=0?(c=g.substr(0,y),d=g.substr(y+1)):(c=g,d=""),f=decodeURIComponent(c),p=decodeURIComponent(d),i(o,f)?n(o[f])?o[f].push(p):o[f]=[o[f],p]:o[f]=p}return o};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],30:[function(t,e,r){"use strict";function i(t,e){if(t.map)return t.map(e);for(var r=[],i=0;i<t.length;i++)r.push(e(t[i],i));return r}var n=function(t){switch(h(t)){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==h(t)?i(o(t),(function(o){var a=encodeURIComponent(n(o))+r;return s(t[o])?i(t[o],(function(t){return a+encodeURIComponent(n(t))})).join(e):a+encodeURIComponent(n(t[o]))}
1)).join(e):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(t)):""};var s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},o=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},{}],31:[function(t,e,r){"use strict";r.decode=r.parse=t("./decode"),r.encode=r.stringify=t("./encode")},{"./decode":29,"./encode":30}],32:[function(t,e,r){"use strict";e.exports=function(t,e,r){var i,n=t.length;if(!(e>=n||0===r)){var s=n-(r=e+r>n?n-e:r);for(i=e;i<s;++i)t[i]=t[i+r];t.length=s}}},{}],33:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==h(Symbol.iterator)?function(t){return h(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":h(t)},s=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),o=i(t("mini-signals")),a=i(t("parse-uri")),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("./async")),l=i(t("./Resource")),c=/(#[\w-]+)?$/,d=function(){function t(){var e=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.baseUrl=r,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,r){return e._loadResource(t,r)},this._queue=u.queue(this._boundLoadResource,i),this._queue.pause(),this.resources={},this.onProgress=new o.default,this.onError=new o.default,this.onLoad=new o.default,this.onStart=new o.default,this.onComplete=new o.default}return t.prototype.add=function(t,e,r,i){if(Array.isArray(t)){for(var s=0;s<t.length;++s)this.add(t[s]);return this}if("object"===(void 0===t?"undefined":n(t))&&(i=e||t.callback||t.onComplete,r=t,e=t.url,t=t.name||t.key||t.url),"string"!=typeof e&&(i=r,r=e,e=t),"string"!=typeof e)throw new Error("No url passed to add resource to loader.");if("function"==typeof r&&(i=r,r=null),this.loading&&(!r||!r.parentResource))throw new Error("Cannot add resources while the loader is running.");if(this.resources[t])throw new Error('Resource named "'+t+'" already exists.');if(e=this._prepareUrl(e),this.resources[t]=new l.default(t,e,r),"function"==typeof i&&this.resources[t].onAfterMiddleware.once(i),this.loading){for(var o=r.parentResource,a=[],h=0;h<o.children.length;++h)o.children[h].isComplete||a.push(o.children[h]);var u=o.progressChunk*(a.length+1)/(a.length+2);o.children.push(this.resources[t]),o.progressChunk=u;for(var c=0;c<a.length;++c)a[c].progressChunk=u;this.resources[t].progressChunk=u}return this._queue.push(this.resources[t]),this},t.prototype.pre=function(t){return this._beforeMiddleware.push(t),this},t.prototype.use=function(t){return this._afterMiddleware.push(t),this},t.prototype.reset=function(){for(var t in this.progress=0,this.loading=!1,this._queue.kill(),this._queue.pause(),this.resources){var e=this.resources[t];e._onLoadBinding&&e._onLoadBinding.detach(),e.isLoading&&e.abort()}return this.resources={},this},t.prototype.load=function(t){if("function"==typeof t&&this.onComplete.once(t),this.loading)return this;if(this._queue.idle())this._onStart(),this._onComplete();else{for(var e=100/this._queue._tasks.length,r=0;r<this._queue._tasks.length;++r)this._queue._tasks[r].data.progressChunk=e;this._onStart(),this._queue.resume()}return this},t.prototype._prepareUrl=function(t){var e=(0,a.default)(t,{strictMode:!0}),r=void 0;if(r=e.protocol||!e.path||0===t.indexOf("//")?t:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&"/"!==t.charAt(0)?this.baseUrl+"/"+t:this.baseUrl+t,this.defaultQueryString){var i=c.exec(r)[0];-1!==(r=r.substr(0,r.length-i.length)).indexOf("?")?r+="&"+this.defaultQueryString:r+="?"+this.defaultQueryString,r+=i}return r},t.prototype._loadResource=function(t,e){var r=this;t._dequeue=e,u.eachSeries(this._beforeMiddleware,(function(e,i){e.call(r,t,(function(){i(t.isComplete?{}:null)}))}),(function(){t.isComplete?r._onLoad(t):(t._onLoadBinding=t.onComplete.once(r._onLoad,r),t.load())}),!0)},t.prototype._onStart=function(){this.progress=0,this.loading=!0,this.onStart.dispatch(this)},t.prototype._onComplete=function(){this.progress=100,this.loading=!1,this.onComplete.dispatch(this,this.resources)},t.prototype._onLoad=function(t){var e=this;t._onLoadBinding=null,this._resourcesParsing.push(t),t._dequeue(),u.eachSeries(this._afterMiddleware,(function(r,i){r.call(e,t,i)}),(function(){t.onAfterMiddleware.dispatch(t),e.progress+=t.progressChunk,e.onProgress.dispatch(e,t),t.error?e.onError.dispatch(t.error,e,t):e.onLoad.dispatch(e,t),e._resourcesParsing.splice(e._resourcesParsing.indexOf(t),1),e._queue.idle()&&0===e._resourcesParsing.length&&e._onComplete()}),!0)}
1,s(t,[{key:"concurrency",get:function(){return this._queue.concurrency},set:function(t){this._queue.concurrency=t}}]),t}();r.default=d},{"./Resource":34,"./async":35,"mini-signals":6,"parse-uri":8}],34:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(){}function s(t,e,r){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=r)}function o(t){return t.toString().replace("object ","")}r.__esModule=!0;var a=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),h=i(t("parse-uri")),u=i(t("mini-signals")),l=!(!window.XDomainRequest||"withCredentials"in new XMLHttpRequest),c=null,d=function(){function t(e,r,i){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"string"!=typeof e||"string"!=typeof r)throw new Error("Both name and url are required for constructing a resource.");i=i||{},this._flags=0,this._setFlag(t.STATUS_FLAGS.DATA_URL,0===r.indexOf("data:")),this.name=e,this.url=r,this.extension=this._getExtension(),this.data=null,this.crossOrigin=!0===i.crossOrigin?"anonymous":i.crossOrigin,this.loadType=i.loadType||this._determineLoadType(),this.xhrType=i.xhrType,this.metadata=i.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=t.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=n,this._onLoadBinding=null,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this._boundXdrOnTimeout=this._xdrOnTimeout.bind(this),this.onStart=new u.default,this.onProgress=new u.default,this.onComplete=new u.default,this.onAfterMiddleware=new u.default}return t.setExtensionLoadType=function(e,r){s(t._loadTypeMap,e,r)},t.setExtensionXhrType=function(e,r){s(t._xhrTypeMap,e,r)},t.prototype.complete=function(){if(this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null)),this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},t.prototype.abort=function(e){if(!this.error){if(this.error=new Error(e),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(this.data.src)this.data.src=t.EMPTY_GIF;else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this.complete()}},t.prototype.load=function(e){var r=this;if(!this.isLoading){if(this.isComplete)return void(e&&setTimeout((function(){return e(r)}),1));switch(e&&this.onComplete.once(e),this._setFlag(t.STATUS_FLAGS.LOADING,!0),this.onStart.dispatch(this),!1!==this.crossOrigin&&"string"==typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case t.LOAD_TYPE.IMAGE:this.type=t.TYPE.IMAGE,this._loadElement("image");break;case t.LOAD_TYPE.AUDIO:this.type=t.TYPE.AUDIO,this._loadSourceElement("audio");break;case t.LOAD_TYPE.VIDEO:this.type=t.TYPE.VIDEO,this._loadSourceElement("video");break;case t.LOAD_TYPE.XHR:default:l&&this.crossOrigin?this._loadXdr():this._loadXhr()}}},t.prototype._hasFlag=function(t){return!!(this._flags&t)},t.prototype._setFlag=function(t,e){this._flags=e?this._flags|t:this._flags&~t},t.prototype._loadElement=function(t){this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===t&&void 0!==window.Image?this.data=new Image:this.data=document.createElement(t),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1)},t.prototype._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===t&&void 0!==window.Audio?this.data=new Audio:this.data=document.createElement(t),null!==this.data){if(!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var e=this.metadata.mimeType,r=0;r<this.url.length;++r)this.data.appendChild(this._createSource(t,this.url[r],Array.isArray(e)?e[r]:e));else{var i=this.metadata.mimeType;this.data.appendChild(this._createSource(t,this.url,Array.isArray(i)?i[0]:i))}this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load()}else this.abort("Unsupported element: "+t)},t.prototype._loadXhr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var e=this.xhr=new XMLHttpRequest;e.open("GET",this.url,!0),this.xhrType===t.XHR_RESPONSE_TYPE.JSON||this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT?e.responseType=t.XHR_RESPONSE_TYPE.TEXT:e.responseType=this.xhrType,e.addEventListener("error",this._boundXhrOnError,!1),e.addEventListener("abort",this._boundXhrOnAbort,!1),e.addEventListener("progress",this._boundOnProgress,!1),e.addEventListener("load",this._boundXhrOnLoad,!1),e.send()},t.prototype._loadXdr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var t=this.xhr=new XDomainRequest;t.timeout=5e3,t.onerror=this._boundXhrOnError,t.ontimeout=this._boundXdrOnTimeout,t.onprogress=this._boundOnProgress,t.onload=this._boundXhrOnLoad,t.open("GET",this.url,!0),setTimeout((function(){return t.send()}),1)},t.prototype._createSource=function(t,e,r){r||(r=t+"/"+this._getExtension(e));var i=document.createElement("source");return i.src=e,i.type=r,i},t.prototype._onError=function(t){this.abort("Failed to load element using: "+t.target.nodeName)},t.prototype._onProgress=function(t){t&&t.lengthComputable&&this.onProgress.dispatch(this,t.loaded/t.total)},t.prototype._xhrOnError=function(){var t=this.xhr;this.abort(o(t)+" Request failed. Status: "+t.status+', text: "'+t.
1statusText+'"')},t.prototype._xhrOnAbort=function(){this.abort(o(this.xhr)+" Request was aborted by the user.")},t.prototype._xdrOnTimeout=function(){this.abort(o(this.xhr)+" Request timed out.")},t.prototype._xhrOnLoad=function(){var e=this.xhr,r="",i=void 0===e.status?200:e.status;if(""!==e.responseType&&"text"!==e.responseType&&void 0!==e.responseType||(r=e.responseText),0===i&&(r.length>0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?i=200:1223===i&&(i=204),2==(i/100|0)){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=r,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(r),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 n=new DOMParser;this.data=n.parseFromString(r,"text/xml")}else{var s=document.createElement("div");s.innerHTML=r,this.data=s}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: "+t)}else this.data=e.response||r;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},t.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";e=e||window.location,c||(c=document.createElement("a")),c.href=t;var r=!(t=(0,h.default)(c.href,{strictMode:!0})).port&&""===e.port||t.port===e.port,i=t.protocol?t.protocol+":":"";return t.host===e.hostname&&r&&i===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 r=t.indexOf("/");e=t.substring(r+1,t.indexOf(";",r))}else{var i=t.indexOf("?"),n=t.indexOf("#"),s=Math.min(i>-1?i:t.length,n>-1?n:t.length);e=(t=t.substring(0,s)).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"}},a(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}();r.default=d,d.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},d.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},d.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},d.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},d._loadTypeMap={gif:d.LOAD_TYPE.IMAGE,png:d.LOAD_TYPE.IMAGE,bmp:d.LOAD_TYPE.IMAGE,jpg:d.LOAD_TYPE.IMAGE,jpeg:d.LOAD_TYPE.IMAGE,tif:d.LOAD_TYPE.IMAGE,tiff:d.LOAD_TYPE.IMAGE,webp:d.LOAD_TYPE.IMAGE,tga:d.LOAD_TYPE.IMAGE,svg:d.LOAD_TYPE.IMAGE,"svg+xml":d.LOAD_TYPE.IMAGE,mp3:d.LOAD_TYPE.AUDIO,ogg:d.LOAD_TYPE.AUDIO,wav:d.LOAD_TYPE.AUDIO,mp4:d.LOAD_TYPE.VIDEO,webm:d.LOAD_TYPE.VIDEO},d._xhrTypeMap={xhtml:d.XHR_RESPONSE_TYPE.DOCUMENT,html:d.XHR_RESPONSE_TYPE.DOCUMENT,htm:d.XHR_RESPONSE_TYPE.DOCUMENT,xml:d.XHR_RESPONSE_TYPE.DOCUMENT,tmx:d.XHR_RESPONSE_TYPE.DOCUMENT,svg:d.XHR_RESPONSE_TYPE.DOCUMENT,tsx:d.XHR_RESPONSE_TYPE.DOCUMENT,gif:d.XHR_RESPONSE_TYPE.BLOB,png:d.XHR_RESPONSE_TYPE.BLOB,bmp:d.XHR_RESPONSE_TYPE.BLOB,jpg:d.XHR_RESPONSE_TYPE.BLOB,jpeg:d.XHR_RESPONSE_TYPE.BLOB,tif:d.XHR_RESPONSE_TYPE.BLOB,tiff:d.XHR_RESPONSE_TYPE.BLOB,webp:d.XHR_RESPONSE_TYPE.BLOB,tga:d.XHR_RESPONSE_TYPE.BLOB,json:d.XHR_RESPONSE_TYPE.JSON,text:d.XHR_RESPONSE_TYPE.TEXT,txt:d.XHR_RESPONSE_TYPE.TEXT,ttf:d.XHR_RESPONSE_TYPE.BUFFER,otf:d.XHR_RESPONSE_TYPE.BUFFER},d.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="},{"mini-signals":6,"parse-uri":8}],35:[function(t,e,r){"use strict";function i(){}function n(t){return function(){if(null===t)throw new Error("Callback was already called.");var e=t;t=null,e.apply(this,arguments)}}
1r.__esModule=!0,r.eachSeries=function(t,e,r,i){var n=0,s=t.length;!function o(a){a||n===s?r&&r(a):i?setTimeout((function(){e(t[n++],o)}),1):e(t[n++],o)}()},r.queue=function(t,e){function r(t,e,r){if(null!=r&&"function"!=typeof r)throw new Error("task callback must be a function");if(a.started=!0,null==t&&a.idle())setTimeout((function(){return a.drain()}),1);else{var n={data:t,callback:"function"==typeof r?r:i};e?a._tasks.unshift(n):a._tasks.push(n),setTimeout((function(){return a.process()}),1)}}function s(t){return function(){o-=1,t.callback.apply(t,arguments),null!=arguments[0]&&a.error(arguments[0],t.data),o<=a.concurrency-a.buffer&&a.unsaturated(),a.idle()&&a.drain(),a.process()}}if(null==e)e=1;else if(0===e)throw new Error("Concurrency must not be zero");var o=0,a={_tasks:[],concurrency:e,saturated:i,unsaturated:i,buffer:e/4,empty:i,drain:i,error:i,started:!1,paused:!1,push:function(t,e){r(t,!1,e)},kill:function(){o=0,a.drain=i,a.started=!1,a._tasks=[]},unshift:function(t,e){r(t,!0,e)},process:function(){for(;!a.paused&&o<a.concurrency&&a._tasks.length;){var e=a._tasks.shift();0===a._tasks.length&&a.empty(),(o+=1)===a.concurrency&&a.saturated(),t(e.data,n(s(e)))}},length:function(){return a._tasks.length},running:function(){return o},idle:function(){return a._tasks.length+o===0},pause:function(){!0!==a.paused&&(a.paused=!0)},resume:function(){if(!1!==a.paused){a.paused=!1;for(var t=1;t<=a.concurrency;t++)a.process()}}};return a}},{}],36:[function(t,e,r){"use strict";r.__esModule=!0,r.encodeBinary=function(t){for(var e="",r=0;r<t.length;){for(var n=[0,0,0],s=[0,0,0,0],o=0;o<n.length;++o)r<t.length?n[o]=255&t.charCodeAt(r++):n[o]=0;switch(s[0]=n[0]>>2,s[1]=(3&n[0])<<4|n[1]>>4,s[2]=(15&n[1])<<2|n[2]>>6,s[3]=63&n[2],r-(t.length-1)){case 2:s[3]=64,s[2]=64;break;case 1:s[3]=64}for(var a=0;a<s.length;++a)e+=i.charAt(s[a])}return e};var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},{}],37:[function(t,e,r){"use strict";var i=t("./Loader").default,n=t("./Resource").default,s=t("./async"),o=t("./b64");i.Resource=n,i.async=s,i.base64=o,e.exports=i,e.exports.default=i},{"./Loader":33,"./Resource":34,"./async":35,"./b64":36}],38:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==h(Symbol.iterator)?function(t){return h(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":h(t)};r.blobMiddlewareFactory=function(){return function(t,e){if(t.data){if(t.xhr&&t.xhrType===s.default.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var r=function(){var r=a.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=r,t.type=s.default.TYPE.IMAGE,t.data.onload=function(){a.revokeObjectURL(r),t.data.onload=null,e()},{v:void 0}}();if("object"===(void 0===r?"undefined":n(r)))return r.v}}else{var i=t.xhr.getResponseHeader("content-type");if(i&&0===i.indexOf("image"))return t.data=new Image,t.data.src="data:"+i+";base64,"+o.default.encodeBinary(t.xhr.responseText),t.type=s.default.TYPE.IMAGE,void(t.data.onload=function(){t.data.onload=null,e()})}e()}else e()}};var s=i(t("../../Resource")),o=i(t("../../b64")),a=window.URL||window.webkitURL},{"../../Resource":34,"../../b64":36}],39:[function(t,e,r){"use strict";function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function n(t,e,r){if(t&&o.isObject(t)&&t instanceof i)return t;var n=new i;return n.parse(t,e,r),n}var s=t("punycode"),o=t("./util");r.parse=n,r.resolve=function(t,e){return n(t,!1,!0).resolve(e)},r.resolveObject=function(t,e){return t?n(t,!1,!0).resolveObject(e):e},r.format=function(t){return o.isString(t)&&(t=n(t)),t instanceof i?t.format():i.prototype.format.call(t)},r.Url=i;var a=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,l=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),d=["'"].concat(c),f=["%","/","?",";","#"].concat(d),p=["/","?","#"],g=/^[+a-z0-9A-Z_-]{0,63}$/,y=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},x=t("querystring");i.prototype.parse=function(t,e,r){if(!o.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+h(t));var i=t.indexOf("?"),n=-1!==i&&i<t.indexOf("#")?"?":"#",u=t.split(n);u[0]=u[0].replace(/\\/g,"/");var c=t=u.join(n);if(c=c.trim(),!r&&1===t.split("#").length){var b=l.exec(c);if(b)return this.path=c,this.href=c,this.pathname=b[1],b[2]?(this.search=b[2],this.query=e?x.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var T=a.exec(c);if(T){var w=(T=T[0]).toLowerCase();this.protocol=w,c=c.substr(T.length)}if(r||T||c.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===c.substr(0,2);!E||T&&m[T]||(c=c.substr(2),this.slashes=!0)}if(!m[T]&&(E||T&&!_[T])){for(var S=-1,M=0;M<p.length;
vendor: 6,024 bytes, line 1
1M++){-1!==(C=c.indexOf(p[M]))&&(-1===S||C<S)&&(S=C)}var O,R;-1!==(R=-1===S?c.lastIndexOf("@"):c.lastIndexOf("@",S))&&(O=c.slice(0,R),c=c.slice(R+1),this.auth=decodeURIComponent(O)),S=-1;for(M=0;M<f.length;M++){var C;-1!==(C=c.indexOf(f[M]))&&(-1===S||C<S)&&(S=C)}-1===S&&(S=c.length),this.host=c.slice(0,S),c=c.slice(S),this.parseHost(),this.hostname=this.hostname||"";var A="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!A)for(var P=this.hostname.split(/\./),D=(M=0,P.length);M<D;M++){var I=P[M];if(I&&!I.match(g)){for(var L="",k=0,N=I.length;k<N;k++)I.charCodeAt(k)>127?L+="x":L+=I[k];if(!L.match(g)){var B=P.slice(0,M),F=P.slice(M+1),U=I.match(y);U&&(B.push(U[1]),F.unshift(U[2])),F.length&&(c="/"+F.join(".")+c),this.hostname=B.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),A||(this.hostname=s.toASCII(this.hostname));var j=this.port?":"+this.port:"",X=this.hostname||"";this.host=X+j,this.href+=this.host,A&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==c[0]&&(c="/"+c))}if(!v[w])for(M=0,D=d.length;M<D;M++){var G=d[M];if(-1!==c.indexOf(G)){var W=encodeURIComponent(G);W===G&&(W=escape(G)),c=c.split(G).join(W)}}var V=c.indexOf("#");-1!==V&&(this.hash=c.substr(V),c=c.slice(0,V));var H=c.indexOf("?");if(-1!==H?(this.search=c.substr(H),this.query=c.substr(H+1),e&&(this.query=x.parse(this.query)),c=c.slice(0,H)):e&&(this.search="",this.query={}),c&&(this.pathname=c),_[w]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){j=this.pathname||"";var Y=this.search||"";this.path=j+Y}return this.href=this.format(),this},i.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",i=this.hash||"",n=!1,s="";this.host?n=t+this.host:this.hostname&&(n=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(n+=":"+this.port)),this.query&&o.isObject(this.query)&&Object.keys(this.query).length&&(s=x.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||_[e])&&!1!==n?(n="//"+(n||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):n||(n=""),i&&"#"!==i.charAt(0)&&(i="#"+i),a&&"?"!==a.charAt(0)&&(a="?"+a),e+n+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(a=a.replace("#","%23"))+i},i.prototype.resolve=function(t){return this.resolveObject(n(t,!1,!0)).format()},i.prototype.resolveObject=function(t){if(o.isString(t)){var e=new i;e.parse(t,!1,!0),t=e}for(var r=new i,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var h=Object.keys(t),u=0;u<h.length;u++){var l=h[u];"protocol"!==l&&(r[l]=t[l])}return _[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!_[t.protocol]){for(var c=Object.keys(t),d=0;d<c.length;d++){var f=c[d];r[f]=t[f]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||m[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var g=r.pathname||"",y=r.search||"";r.path=g+y}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),x=t.host||t.pathname&&"/"===t.pathname.charAt(0),b=x||v||r.host&&t.pathname,T=b,w=r.pathname&&r.pathname.split("/")||[],E=(p=t.pathname&&t.pathname.split("/")||[],r.protocol&&!_[r.protocol]);if(E&&(r.hostname="",r.port=null,r.host&&(""===w[0]?w[0]=r.host:w.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),b=b&&(""===p[0]||""===w[0])),x)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,w=p;else if(p.length)w||(w=[]),w.pop(),w=w.concat(p),r.search=t.search,r.query=t.query;else if(!o.isNullOrUndefined(t.search)){if(E)r.hostname=r.host=w.shift(),(C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift());return r.search=t.search,r.query=t.query,o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!w.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var S=w.slice(-1)[0],M=(r.host||t.host||w.length>1)&&("."===S||".."===S)||""===S,O=0,R=w.length;R>=0;R--)"."===(S=w[R])?w.splice(R,1):".."===S?(w.splice(R,1),O++):O&&(w.splice(R,1),O--);if(!b&&!T)for(;O--;O)w.unshift("..");!b||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),M&&"/"!==w.join("/").substr(-1)&&w.push("");var C,A=""===w[0]||w[0]&&"/"===w[0].charAt(0);E&&(r.hostname=r.host=A?"":w.length?w.shift():"",(C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift()));return(b=b||r.host&&w.length)&&!A&&w.unshift(""),w.length?r.pathname=w.join("/"):(r.pathname=null,r.path=null),o.isNull(r.pathname)&&o.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},i.prototype.parseHost=function(){var t=this.host,e=u.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":40,punycode:28,querystring:31}],40:[function(t,e,r){"use strict";e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==h(t)&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],41:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}
1r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),s=t("./autoDetectRenderer"),o=i(t("./display/Container")),a=t("./ticker"),h=i(t("./settings")),u=t("./const"),l=function(){function t(e,r,i,n,u){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),"number"==typeof e&&(e=Object.assign({width:e,height:r||h.default.RENDER_OPTIONS.height,forceCanvas:!!n,sharedTicker:!!u},i)),this._options=e=Object.assign({autoStart:!0,sharedTicker:!1,forceCanvas:!1,sharedLoader:!1},e),this.renderer=(0,s.autoDetectRenderer)(e),this.stage=new o.default,this._ticker=null,this.ticker=e.sharedTicker?a.shared:new a.Ticker,e.autoStart&&this.start()}return t.prototype.render=function(){this.renderer.render(this.stage)},t.prototype.stop=function(){this._ticker.stop()},t.prototype.start=function(){this._ticker.start()},t.prototype.destroy=function(t){var e=this._ticker;this.ticker=null,e.destroy(),this.stage.destroy(),this.stage=null,this.renderer.destroy(t),this.renderer=null,this._options=null},n(t,[{key:"ticker",set:function(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,u.UPDATE_PRIORITY.LOW)},get:function(){return this._ticker}},{key:"view",get:function(){return this.renderer.view}},{key:"screen",get:function(){return this.renderer.screen}}]),t}();r.default=l},{"./autoDetectRenderer":43,"./const":44,"./display/Container":46,"./settings":99,"./ticker":119}],42:[function(t,e,r){"use strict";function i(t,e){if(t instanceof Array){if("precision"!==t[0].substring(0,9)){var r=t.slice(0);return r.unshift("precision "+e+" float;"),r}}else if("precision"!==t.trim().substring(0,9))return"precision "+e+" float;\n"+t;return t}
1r.__esModule=!0;var n=t("pixi-gl-core"),s=function(t){return t&&t.__esModule?t:{default:t}}(t("./settings")),o=function(t){function e(r,n,o,a,u){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this,r,i(n,u||s.default.PRECISION_VERTEX),i(o,u||s.default.PRECISION_FRAGMENT),void 0,a))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e}(n.GLShader);r.default=o},{"./settings":99,"pixi-gl-core":16}],43:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0,r.autoDetectRenderer=function(t,e,r,i){var a=t&&t.forceCanvas;return void 0!==i&&(a=i),!a&&n.isWebGLSupported()?new o.default(t,e,r):new s.default(t,e,r)};var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("./utils")),s=i(t("./renderers/canvas/CanvasRenderer")),o=i(t("./renderers/webgl/WebGLRenderer"))},{"./renderers/canvas/CanvasRenderer":75,"./renderers/webgl/WebGLRenderer":82,"./utils":123}],44:[function(t,e,r){"use strict";r.__esModule=!0,r.VERSION="4.7.0",r.PI_2=2*Math.PI,r.RAD_TO_DEG=180/Math.PI,r.DEG_TO_RAD=Math.PI/180,r.RENDERER_TYPE={UNKNOWN:0,WEBGL:1,CANVAS:2},r.BLEND_MODES={NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,NORMAL_NPM:17,ADD_NPM:18,SCREEN_NPM:19},r.DRAW_MODES={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},r.SCALE_MODES={LINEAR:0,NEAREST:1},r.WRAP_MODES={CLAMP:0,REPEAT:1,MIRRORED_REPEAT:2},r.GC_MODES={AUTO:0,MANUAL:1},r.URL_FILE_EXTENSION=/\.(\w{3,4})(?:$|\?|#)/i,r.DATA_URI=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;(charset=[\w-]+|base64))?,(.*)/i,r.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,r.SHAPES={POLY:0,RECT:1,CIRC:2,ELIP:3,RREC:4},r.PRECISION={LOW:"lowp",MEDIUM:"mediump",HIGH:"highp"},r.TRANSFORM_MODE={STATIC:0,DYNAMIC:1},r.TEXT_GRADIENT={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1},r.UPDATE_PRIORITY={INTERACTION:50,HIGH:25,NORMAL:0,LOW:-25,UTILITY:-50}},{}],45:[function(t,e,r){"use strict";r.__esModule=!0;var i=t("../math"),n=function(){function t(){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(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)).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,r=this.minY,i=this.maxX,n=this.maxY,s=t[0],o=t[1];e=s<e?s:e,r=o<r?o:r,i=s>i?s:i,n=o>n?o:n,e=(s=t[2])<e?s:e,r=(o=t[3])<r?o:r,i=s>i?s:i,n=o>
1n?o:n,e=(s=t[4])<e?s:e,r=(o=t[5])<r?o:r,i=s>i?s:i,n=o>n?o:n,e=(s=t[6])<e?s:e,r=(o=t[7])<r?o:r,i=s>i?s:i,n=o>n?o:n,this.minX=e,this.minY=r,this.maxX=i,this.maxY=n},t.prototype.addFrame=function(t,e,r,i,n){var s=t.worldTransform,o=s.a,a=s.b,h=s.c,u=s.d,l=s.tx,c=s.ty,d=this.minX,f=this.minY,p=this.maxX,g=this.maxY,y=o*e+h*r+l,v=a*e+u*r+c;d=y<d?y:d,f=v<f?v:f,p=y>p?y:p,g=v>g?v:g,d=(y=o*i+h*r+l)<d?y:d,f=(v=a*i+u*r+c)<f?v:f,p=y>p?y:p,g=v>g?v:g,d=(y=o*e+h*n+l)<d?y:d,f=(v=a*e+u*n+c)<f?v:f,p=y>p?y:p,g=v>g?v:g,d=(y=o*i+h*n+l)<d?y:d,f=(v=a*i+u*n+c)<f?v:f,p=y>p?y:p,g=v>g?v:g,this.minX=d,this.minY=f,this.maxX=p,this.maxY=g},t.prototype.addVertices=function(t,e,r,i){for(var n=t.worldTransform,s=n.a,o=n.b,a=n.c,h=n.d,u=n.tx,l=n.ty,c=this.minX,d=this.minY,f=this.maxX,p=this.maxY,g=r;g<i;g+=2){var y=e[g],v=e[g+1],m=s*y+a*v+u,_=h*v+o*y+l;c=m<c?m:c,d=_<d?_:d,f=m>f?m:f,p=_>p?_:p}this.minX=c,this.minY=d,this.maxX=f,this.maxY=p},t.prototype.addBounds=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<r?t.minY:r,this.maxX=t.maxX>i?t.maxX:i,this.maxY=t.maxY>n?t.maxY:n},t.prototype.addBoundsMask=function(t,e){var r=t.minX>e.minX?t.minX:e.minX,i=t.minY>e.minY?t.minY:e.minY,n=t.maxX<e.maxX?t.maxX:e.maxX,s=t.maxY<e.maxY?t.maxY:e.maxY;if(r<=n&&i<=s){var o=this.minX,a=this.minY,h=this.maxX,u=this.maxY;this.minX=r<o?r:o,this.minY=i<a?i:a,this.maxX=n>h?n:h,this.maxY=s>u?s:u}},t.prototype.addBoundsArea=function(t,e){var r=t.minX>e.x?t.minX:e.x,i=t.minY>e.y?t.minY:e.y,n=t.maxX<e.x+e.width?t.maxX:e.x+e.width,s=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(r<=n&&i<=s){var o=this.minX,a=this.minY,h=this.maxX,u=this.maxY;this.minX=r<o?r:o,this.minY=i<a?i:a,this.maxX=n>h?n:h,this.maxY=s>u?s:u}},t}();r.default=n},{"../math":68}],46:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),n=t("../utils"),s=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this));return r.children=[],r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.onChildrenChange=function(){},e.prototype.addChild=function(t){var e=arguments.length;if(e>1)for(var r=0;r<e;r++)this.addChild(arguments[r]);else t.parent&&t.parent.removeChild(t),t.parent=this,t.transform._parentID=-1,this.children.push(t),this._boundsID++,this.onChildrenChange(this.children.length-1),t.emit("added",this);return t},e.prototype.addChildAt=function(t,e){if(e<0||e>this.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 r=this.getChildIndex(t),i=this.getChildIndex(e);this.children[r]=e,this.children[i]=t,this.onChildrenChange(r<i?r:i)}},e.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(-1===e)throw new Error("The supplied DisplayObject must be a child of the caller");return e},e.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var r=this.getChildIndex(t);(0,n.removeItems)(this.children,r,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 r=0;r<e;r++)this.removeChild(arguments[r]);else{var i=this.children.indexOf(t);if(-1===i)return null;t.parent=null,t.transform._parentID=-1,(0,n.removeItems)(this.children,i,1),this._boundsID++,this.onChildrenChange(i),t.emit("removed",this)}return t},e.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,(0,n.removeItems)(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),e},e.prototype.removeChildren=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments[1],r=t,i="number"==typeof e?e:this.children.length,n=i-r,s=void 0;if(n>0&&n<=i){s=this.children.splice(r,n);for(var o=0;o<s.length;++o)s[o].parent=null,s[o].transform&&(s[o].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(var a=0;a<s.length;++a)s[a].emit("removed",this);return s}if(0===n&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t<e;++t){var r=this.children[t];r.visible&&r.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var e=this.children[t];e.visible&&e.renderable&&(e.calculateBounds(),e._mask?(e._mask.calculateBounds(),this._bounds.addBoundsMask(e._bounds,e._mask._bounds)):e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds))}this._lastBoundsID=this._boundsID},e.prototype._calculateBounds=function(){},e.prototype.renderWebGL=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this._filters)this.renderAdvancedWebGL(t);else{this._renderWebGL(t);for(var e=0,r=this.children.length;e<r;++e)this.children[e].renderWebGL(t)}},e.prototype.renderAdvancedWebGL=function(t){t.flush();var e=this._filters,r=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var i=0;i<e.length;i++)e[i].enabled&&this._enabledFilters.push(e[i]);this._enabledFilters.length&&t.filterManager.pushFilter(this,this._enabledFilters)}r&&t.maskManager.pushMask(this,this._mask),this._renderWebGL(t);for(var n=0,s=this.children.length;n<s;n++)this.children[n].renderWebGL(t);t.flush(),r&&t.maskManager.popMask(this,this._mask),e&&this._enabledFilters&&this._enabledFilters.length&&t.filterManager.popFilter()},e.prototype._renderWebGL=function(t){},e.prototype._renderCanvas=function(t){},e.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable){this._mask&&t.maskManager.pushMask(this._mask),this._renderCanvas(t);for(var e=0,r=this.children.length;e<r;++e)this.children[e].renderCanvas(t);this._mask&&t.maskManager.popMask(t)}},e.prototype.destroy=function(e){t.prototype.destroy.call(this);var r="boolean"==typeof e?e:e&&e.children,i=this.removeChildren(0,this.children.length);if(r)for(var n=0;n<i.length;++n)i[n].destroy(e)},i(e,[{key:"width",get:function(){return this.scale.x*this.getLocalBounds().width}
1,set:function(t){var e=this.getLocalBounds().width;this.scale.x=0!==e?t/e:1,this._width=t}},{key:"height",get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var e=this.getLocalBounds().height;this.scale.y=0!==e?t/e:1,this._height=t}}]),e}(function(t){return t&&t.__esModule?t:{default:t}}(t("./DisplayObject")).default);r.default=s,s.prototype.containerUpdateTransform=s.prototype.updateTransform},{"../utils":123,"./DisplayObject":47}],47:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),s=i(t("eventemitter3")),o=t("../const"),a=i(t("../settings")),u=i(t("./TransformStatic")),l=i(t("./Transform")),c=i(t("./Bounds")),d=t("../math"),f=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this)),i=a.default.TRANSFORM_MODE===o.TRANSFORM_MODE.STATIC?u.default:l.default;return r.tempDisplayObjectParent=null,r.transform=new i,r.alpha=1,r.visible=!0,r.renderable=!0,r.parent=null,r.worldAlpha=1,r.filterArea=null,r._filters=null,r._enabledFilters=null,r._bounds=new c.default,r._boundsID=0,r._lastBoundsID=-1,r._boundsRect=null,r._localBoundsRect=null,r._mask=null,r._destroyed=!1,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.updateTransform=function(){this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha,this._bounds.updateID++},e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._boundsID!==this._lastBoundsID&&this.calculateBounds(),e||(this._boundsRect||(this._boundsRect=new d.Rectangle),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){var e=this.transform,r=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform,t||(this._localBoundsRect||(this._localBoundsRect=new d.Rectangle),t=this._localBoundsRect);var i=this.getBounds(!1,t);return this.parent=r,this.transform=e,i},e.prototype.toGlobal=function(t,e){return arguments.length>2&&void 0!==arguments[2]&&arguments[2]||(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,r,i){return e&&(t=e.toGlobal(t,r,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,r)},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,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0;return this.position.x=t,this.position.y=e,this.scale.x=r||1,this.scale.y=i||1,this.rotation=n,this.skew.x=s,this.skew.y=o,this.pivot.x=a,this.pivot.y=h,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},n(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.isMask=!1),this._mask=t,this._mask&&(this._mask.renderable=!1,this._mask.isMask=!0)}},{key:"filters",get:function(){return this._filters&&this._filters.slice()},set:function(t){this._filters=t&&t.slice()}}]),e}(s.default);r.default=f,f.prototype.displayObjectUpdateTransform=f.prototype.updateTransform},{"../const":44,"../math":68,"../settings":99,"./Bounds":45,"./Transform":48,"./TransformStatic":50,eventemitter3:4}],48:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),n=t("../math"),s=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this));return r.position=new n.Point(0,0),r.scale=new n.Point(1,1),r.skew=new n.ObservablePoint(r.updateSkew,r,0,0),r.pivot=new n.Point(0,0),r._rotation=0,r._cx=1,r._sx=0,r._cy=0,r._sy=1,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew._y),this._sx=Math.sin(this._rotation+this.skew._y),this._cy=-Math.sin(this._rotation-this.skew._x),this._sy=Math.cos(this._rotation-this.skew._x)},e.prototype.updateLocalTransform=function(){var t=this.localTransform;t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d)},e.prototype.updateTransform=function(t){var e=this.localTransform;e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d);var r=t.worldTransform,i=this.worldTransform;i.a=e.a*r.a+e.b*r.c,i.b=e.a*r.b+e.b*r.d,i.c=e.c*r.a+e.d*r.c,i.d=e.c*r.b+e.d*r.d,i.tx=e.tx*r.a+e.ty*r.c+r.tx,i.ty=e.tx*r.b+e.ty*r.d+r.ty,this._worldID++},e.prototype.setFromMatrix=function(t){t.decompose(this)},i(e,[{key:"rotation",get:function(){return this._rotation},set:function(t){this._rotation=t,this.updateSkew()}}]),e}(function(t){return t&&t.__esModule?t:{default:t}}(t("./TransformBase")).default);r.default=s},{"../math":68,"./TransformBase":49}],49:[function(t,e,r){"use strict";r.__esModule=!0;var i=t("../math"),n=function(){function t(){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.worldTransform=new i.Matrix,this.localTransform=new i.Matrix,this._worldID=0,this._parentID=0}return t.prototype.updateLocalTransform=function(){},t.prototype.updateTransform=function(t){var e=t.worldTransform,r=this.worldTransform,i=this.localTransform;r.a=i.a*e.a+i.b*e.c,r.b=i.a*e.b+i.b*e.d,r.c=i.c*e.a+i.d*e.c,r.d=i.c*e.b+i.d*e.d,r.tx=i.tx*e.a+i.ty*e.c+e.tx,r.ty=i.tx*e.b+i.ty*e.d+e.ty,this._worldID++},t}();r.default=n,n.prototype.updateWorldTransform=n.prototype.updateTransform,n.IDENTITY=new n},{"../math":68}],50:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),n=t("../math"),s=function(t){function e(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var r=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this));return r.position=new n.ObservablePoint(r.onChange,r,0,0),r.scale=new n.ObservablePoint(r.onChange,r,1,1),r.pivot=new n.ObservablePoint(r.onChange,r,0,0),r.skew=new n.ObservablePoint(r.updateSkew,r,0,0),r._rotation=0,r._cx=1,r._sx=0,r._cy=0,r._sy=1,r._localID=0,r._currentLocalID=0,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.onChange=function(){this._localID++},e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew._y),this._sx=Math.sin(this._rotation+this.skew._y),this._cy=-Math.sin(this._rotation-this.skew._x),this._sy=Math.cos(this._rotation-this.skew._x),this._localID++},e.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale._x,t.b=this._sx*this.scale._x,t.c=this._cy*this.scale._y,t.d=this._sy*this.scale._y,t.tx=this.position._x-(this.pivot._x*t.a+this.pivot._y*t.c),t.ty=this.position._y-(this.pivot._x*t.b+this.pivot._y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},e.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale._x,e.b=this._sx*this.scale._x,e.c=this._cy*this.scale._y,e.d=this._sy*this.scale._y,e.tx=this.position._x-(this.pivot._x*e.a+this.pivot._y*e.c),e.ty=this.position._y-(this.pivot._x*e.b+this.pivot._y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var r=t.worldTransform,i=this.worldTransform;i.a=e.a*r.a+e.b*r.c,i.b=e.a*r.b+e.b*r.d,i.c=e.c*r.a+e.d*r.c,i.d=e.c*r.b+e.d*r.d,i.tx=e.tx*r.a+e.ty*r.c+r.tx,i.ty=e.tx*r.b+e.ty*r.d+r.ty,this._parentID=t._worldID,this._worldID++}},e.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},i(e,[{key:"rotation",get:function(){return this._rotation},set:function(t){this._rotation=t,this.updateSkew()}}]),e}(function(t){return t&&t.__esModule?t:{default:t}}(t("./TransformBase")).default);r.default=s},{"../math":68,"./TransformBase":49}],51:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}
1r.__esModule=!0;var n=i(t("../display/Container")),s=i(t("../textures/RenderTexture")),o=i(t("../textures/Texture")),a=i(t("./GraphicsData")),u=i(t("../sprites/Sprite")),l=t("../math"),c=t("../utils"),d=t("../const"),f=i(t("../display/Bounds")),p=i(t("./utils/bezierCurveTo")),g=i(t("../renderers/canvas/CanvasRenderer")),y=void 0,v=new l.Matrix,m=new l.Point,_=new Float32Array(4),x=new Float32Array(4),b=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]&&arguments[0];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this));return i.fillAlpha=1,i.lineWidth=0,i.nativeLines=r,i.lineColor=0,i.graphicsData=[],i.tint=16777215,i._prevTint=16777215,i.blendMode=d.BLEND_MODES.NORMAL,i.currentPath=null,i._webGL={},i.isMask=!1,i.boundsPadding=0,i._localBounds=new f.default,i.dirty=0,i.fastRectDirty=-1,i.clearDirty=0,i.boundsDirty=-1,i.cachedSpriteDirty=!1,i._spriteRect=null,i._fastRect=!1,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.clone=function(){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 r=0;r<this.graphicsData.length;++r)t.graphicsData.push(this.graphicsData[r].clone());return t.currentPath=t.graphicsData[t.graphicsData.length-1],t.updateLocalBounds(),t},e.prototype.lineStyle=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;if(this.lineWidth=t,this.lineColor=e,this.lineAlpha=r,this.currentPath)if(this.currentPath.shape.points.length){var i=new l.Polygon(this.currentPath.shape.points.slice(-2));i.closed=!1,this.drawShape(i)}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 r=new l.Polygon([t,e]);return r.closed=!1,this.drawShape(r),this},e.prototype.lineTo=function(t,e){return this.currentPath.shape.points.push(t,e),this.dirty++,this},e.prototype.quadraticCurveTo=function(t,e,r,i){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var n=this.currentPath.shape.points,s=0,o=0;0===n.length&&this.moveTo(0,0);for(var a=n[n.length-2],h=n[n.length-1],u=1;u<=20;++u){var l=u/20;s=a+(t-a)*l,o=h+(e-h)*l,n.push(s+(t+(r-t)*l-s)*l,o+(e+(i-e)*l-o)*l)}return this.dirty++,this},e.prototype.bezierCurveTo=function(t,e,r,i,n,s){this.currentPath?0===this.currentPath.shape.points.length&&(this.currentPath.shape.points=[0,0]):this.moveTo(0,0);var o=this.currentPath.shape.points,a=o[o.length-2],h=o[o.length-1];return o.length-=2,(0,p.default)(a,h,t,e,r,i,n,s,o),this.dirty++,this},e.prototype.arcTo=function(t,e,r,i,n){this.currentPath?0===this.currentPath.shape.points.length&&this.currentPath.shape.points.push(t,e):this.moveTo(t,e);var s=this.currentPath.shape.points,o=s[s.length-2],a=s[s.length-1]-e,h=o-t,u=i-e,l=r-t,c=Math.abs(a*l-h*u);if(c<1e-8||0===n)s[s.length-2]===t&&s[s.length-1]===e||s.push(t,e);else{var d=a*a+h*h,f=u*u+l*l,p=a*u+h*l,g=n*Math.sqrt(d)/c,y=n*Math.sqrt(f)/c,v=g*p/d,m=y*p/f,_=g*l+y*h,x=g*u+y*a,b=h*(y+v),T=a*(y+v),w=l*(g+m),E=u*(g+m),S=Math.atan2(T-x,b-_),M=Math.atan2(E-x,w-_);this.arc(_+t,x+e,n,S,M,h*u>l*a)}return this.dirty++,this},e.prototype.arc=function(t,e,r,i,n){var s=arguments.length>5&&void 0!==arguments[5]&&arguments[5];if(i===n)return this;!s&&n<=i?n+=d.PI_2:s&&i<=n&&(i+=d.PI_2);var o=n-i,a=40*Math.ceil(Math.abs(o)/d.PI_2);if(0===o)return this;var h=t+Math.cos(i)*r,u=e+Math.sin(i)*r,l=this.currentPath?this.currentPath.shape.points:null;l?l[l.length-2]===h&&l[l.length-1]===u||l.push(h,u):(this.moveTo(h,u),l=this.currentPath.shape.points);for(var c=o/(2*a),f=2*c,p=Math.cos(c),g=Math.sin(c),y=a-1,v=y%1/y,m=0;m<=y;++m){var _=m+v*m,x=c+i+f*_,b=Math.cos(x),T=-Math.sin(x);l.push((p*b+g*T)*r+t,(p*-T+g*b)*r+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,r,i){return this.drawShape(new l.Rectangle(t,e,r,i)),this},e.prototype.drawRoundedRect=function(t,e,r,i,n){return this.drawShape(new l.RoundedRectangle(t,e,r,i,n)),this},e.prototype.drawCircle=function(t,e,r){return this.drawShape(new l.Cir
1cle(t,e,r)),this},e.prototype.drawEllipse=function(t,e,r,i){return this.drawShape(new l.Ellipse(t,e,r,i)),this},e.prototype.drawPolygon=function(t){var e=t,r=!0;if(e instanceof l.Polygon&&(r=e.closed,e=e.points),!Array.isArray(e)){e=new Array(arguments.length);for(var i=0;i<e.length;++i)e[i]=arguments[i]}var n=new l.Polygon(e);return n.closed=r,this.drawShape(n),this},e.prototype.drawStar=function(t,e,r,i,n){var s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;n=n||i/2;for(var o=-1*Math.PI/2+s,a=2*r,h=d.PI_2/a,u=[],l=0;l<a;l++){var c=l%2?n:i,f=l*h+o;u.push(t+c*Math.cos(f),e+c*Math.sin(f))}return this.drawPolygon(u)},e.prototype.clear=function(){return(this.lineWidth||this.filling||this.graphicsData.length>0)&&(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===d.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 u.default(new o.default(o.default.WHITE)));var r=this._spriteRect;if(16777215===this.tint)r.tint=this.graphicsData[0].fillColor;else{var i=_,n=x;(0,c.hex2rgb)(this.graphicsData[0].fillColor,i),(0,c.hex2rgb)(this.tint,n),i[0]*=n[0],i[1]*=n[1],i[2]*=n[2],r.tint=(0,c.rgb2hex)(i)}r.alpha=this.graphicsData[0].fillAlpha,r.worldAlpha=this.worldAlpha*r.alpha,r.blendMode=this.blendMode,r._texture._frame.width=e.width,r._texture._frame.height=e.height,r.transform.worldTransform=this.transform.worldTransform,r.anchor.set(-e.x/e.width,-e.y/e.height),r._onAnchorUpdate(),r._renderWebGL(t)},e.prototype._renderCanvas=function(t){!0!==this.isMask&&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,m);for(var e=this.graphicsData,r=0;r<e.length;++r){var i=e[r];if(i.fill&&i.shape&&i.shape.contains(m.x,m.y)){if(i.holes)for(var n=0;n<i.holes.length;n++){if(i.holes[n].contains(m.x,m.y))return!1}return!0}}return!1},e.prototype.updateLocalBounds=function(){var t=1/0,e=-1/0,r=1/0,i=-1/0;if(this.graphicsData.length)for(var n=0,s=0,o=0,a=0,h=0,u=0;u<this.graphicsData.length;u++){var l=this.graphicsData[u],c=l.type,f=l.lineWidth;if(n=l.shape,c===d.SHAPES.RECT||c===d.SHAPES.RREC)s=n.x-f/2,o=n.y-f/2,t=s<t?s:t,e=s+(a=n.width+f)>e?s+a:e,r=o<r?o:r,i=o+(h=n.height+f)>i?o+h:i;else if(c===d.SHAPES.CIRC)s=n.x,o=n.y,t=s-(a=n.radius+f/2)<t?s-a:t,e=s+a>e?s+a:e,r=o-(h=n.radius+f/2)<r?o-h:r,i=o+h>i?o+h:i;else if(c===d.SHAPES.ELIP)s=n.x,o=n.y,t=s-(a=n.width+f/2)<t?s-a:t,e=s+a>e?s+a:e,r=o-(h=n.height+f/2)<r?o-h:r,i=o+h>i?o+h:i;else for(var p=n.points,g=0,y=0,v=0,m=0,_=0,x=0,b=0,T=0,w=0;w+2<p.length;w+=2)s=p[w],o=p[w+1],g=p[w+2],y=p[w+3],v=Math.abs(g-s),m=Math.abs(y-o),h=f,(a=Math.sqrt(v*v+m*m))<1e-9||(t=(b=(g+s)/2)-(_=(h/a*m+v)/2)<t?b-_:t,e=b+_>e?b+_:e,r=(T=(y+o)/2)-(x=(h/a*v+m)/2)<r?T-x:r,i=T+x>i?T+x:i)}else t=0,e=0,r=0,i=0;var E=this.boundsPadding;this._localBounds.minX=t-E,this._localBounds.maxX=e+E,this._localBounds.minY=r-E,this._localBounds.maxY=i+E},e.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.points.length<=2&&this.graphicsData.pop(),this.currentPath=null;var e=new a.default(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.filling,this.nativeLines,t);return this.graphicsData.push(e),e.type===d.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,r=this.getLocalBounds(),i=s.default.create(r.width,r.height,t,e);y||(y=new g.default),this.transform.updateLocalTransform(),this.transform.localTransform.copy(v),v.invert(),v.tx-=r.x,v.ty-=r.y,y.render(this,i,!0,v);var n=o.default.fromCanvas(i.baseTexture._canvasRenderTarget.canvas,t,"graphics");
1return n.baseTexture.resolution=e,n.baseTexture.update(),n},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 r=0;r<this.graphicsData.length;++r)this.graphicsData[r].destroy();for(var i in this._webgl)for(var n=0;n<this._webgl[i].data.length;++n)this._webgl[i].data[n].destroy();this._spriteRect&&this._spriteRect.destroy(),this.graphicsData=null,this.currentPath=null,this._webgl=null,this._localBounds=null},e}(n.default);r.default=b,b._SPRITE_TEXTURE=null},{"../const":44,"../display/Bounds":45,"../display/Container":46,"../math":68,"../renderers/canvas/CanvasRenderer":75,"../sprites/Sprite":100,"../textures/RenderTexture":111,"../textures/Texture":113,"../utils":123,"./GraphicsData":52,"./utils/bezierCurveTo":54}],52:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(){function t(e,r,i,n,s,o,a,h){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.lineWidth=e,this.nativeLines=a,this.lineColor=r,this.lineAlpha=i,this._lineTint=r,this.fillColor=n,this.fillAlpha=s,this._fillTint=n,this.fill=o,this.holes=[],this.shape=h,this.type=h.type}return t.prototype.clone=function(){return new t(this.lineWidth,this.lineColor,this.lineAlpha,this.fillColor,this.fillAlpha,this.fill,this.nativeLines,this.shape)},t.prototype.addHole=function(t){this.holes.push(t)},t.prototype.destroy=function(){this.shape=null,this.holes=null},t}();r.default=i},{}],53:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t){return t&&t.__esModule?t:{default:t}}(t("../../renderers/canvas/CanvasRenderer")),n=t("../../const"),s=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.renderer=e}return t.prototype.render=function(t){var e=this.renderer,r=e.context,i=t.worldAlpha,s=t.transform.worldTransform,o=e.resolution;this._prevTint!==this.tint&&(this.dirty=!0),r.setTransform(s.a*o,s.b*o,s.c*o,s.d*o,s.tx*o,s.ty*o),t.dirty&&(this.updateGraphicsTint(t),t.dirty=!1),e.setBlendMode(t.blendMode);for(var a=0;a<t.graphicsData.length;a++){var h=t.graphicsData[a],u=h.shape,l=h._fillTint,c=h._lineTint;if(r.lineWidth=h.lineWidth,h.type===n.SHAPES.POLY){r.beginPath(),this.renderPolygon(u.points,u.closed,r);for(var d=0;d<h.holes.length;d++)this.renderPolygon(h.holes[d].points,!0,r);h.fill&&(r.globalAlpha=h.fillAlpha*i,r.fillStyle="#"+("00000"+(0|l).toString(16)).substr(-6),r.fill()),h.lineWidth&&(r.globalAlpha=h.lineAlpha*i,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke())}else if(h.type===n.SHAPES.RECT)(h.fillColor||0===h.fillColor)&&(r.globalAlpha=h.fillAlpha*i,r.fillStyle="#"+("00000"+(0|l).toString(16)).substr(-6),r.fillRect(u.x,u.y,u.width,u.height)),h.lineWidth&&(r.globalAlpha=h.lineAlpha*i,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.strokeRect(u.x,u.y,u.width,u.height));else if(h.type===n.SHAPES.CIRC)r.beginPath(),r.arc(u.x,u.y,u.radius,0,2*Math.PI),r.closePath(),h.fill&&(r.globalAlpha=h.fillAlpha*i,r.fillStyle="#"+("00000"+(0|l).toString(16)).substr(-6),r.fill()),h.lineWidth&&(r.globalAlpha=h.lineAlpha*i,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke());else if(h.type===n.SHAPES.ELIP){var f=2*u.width,p=2*u.height,g=u.x-f/2,y=u.y-p/2;r.beginPath();var v=f/2*.5522848,m=p/2*.5522848,_=g+f,x=y+p,b=g+f/2,T=y+p/2;r.moveTo(g,T),r.bezierCurveTo(g,T-m,b-v,y,b,y),r.bezierCurveTo(b+v,y,_,T-m,_,T),r.bezierCurveTo(_,T+m,b+v,x,b,x),r.bezierCurveTo(b-v,x,g,T+m,g,T),r.closePath(),h.fill&&(r.globalAlpha=h.fillAlpha*i,r.fillStyle="#"+("00000"+(0|l).toString(16)).substr(-6),r.fill()),h.lineWidth&&(r.globalAlpha=h.lineAlpha*i,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke())}else if(h.type===n.SHAPES.RREC){var w=u.x,E=u.y,S=u.width,M=u.height,O=u.radius,R=Math.min(S,M)/2|0;O=O>R?R:O,r.beginPath(),r.moveTo(w,E+O),r.lineTo(w,E+M-O),r.quadraticCurveTo(w,E+M,w+O,E+M),r.lineTo(w+S-O,E+M),r.quadraticCurveTo(w+S,E+M,w+S,E+M-O),r.lineTo(w+S,E+O),r.quadraticCurveTo(w+S,E,w+S-O,E),r.lineTo(w+O,E),r.quadraticCurveTo(w,E,w,E+O),r.closePath(),(h.fillColor||0===h.fillColor)&&(r.globalAlpha=h.fillAlpha*i,r.f
1illStyle="#"+("00000"+(0|l).toString(16)).substr(-6),r.fill()),h.lineWidth&&(r.globalAlpha=h.lineAlpha*i,r.strokeStyle="#"+("00000"+(0|c).toString(16)).substr(-6),r.stroke())}}},t.prototype.updateGraphicsTint=function(t){t._prevTint=t.tint;for(var e=(t.tint>>16&255)/255,r=(t.tint>>8&255)/255,i=(255&t.tint)/255,n=0;n<t.graphicsData.length;++n){var s=t.graphicsData[n],o=0|s.fillColor,a=0|s.lineColor;s._fillTint=((o>>16&255)/255*e*255<<16)+((o>>8&255)/255*r*255<<8)+(255&o)/255*i*255,s._lineTint=((a>>16&255)/255*e*255<<16)+((a>>8&255)/255*r*255<<8)+(255&a)/255*i*255}},t.prototype.renderPolygon=function(t,e,r){r.moveTo(t[0],t[1]);for(var i=1;i<t.length/2;++i)r.lineTo(t[2*i],t[2*i+1]);e&&r.closePath()},t.prototype.destroy=function(){this.renderer=null},t}();r.default=s,i.default.registerPlugin("graphics",s)},{"../../const":44,"../../renderers/canvas/CanvasRenderer":75}],54:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e,r,i,n,s,o,a){var h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:[],u=0,l=0,c=0,d=0,f=0;h.push(t,e);for(var p=1,g=0;p<=20;++p)c=(l=(u=1-(g=p/20))*u)*u,f=(d=g*g)*g,h.push(c*t+3*l*g*r+3*u*d*n+f*o,c*e+3*l*g*i+3*u*d*s+f*a);return h}},{}],55:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("../../utils"),s=t("../../const"),o=i(t("../../renderers/webgl/utils/ObjectRenderer")),a=i(t("../../renderers/webgl/WebGLRenderer")),u=i(t("./WebGLGraphicsData")),l=i(t("./shaders/PrimitiveShader")),c=i(t("./utils/buildPoly")),d=i(t("./utils/buildRectangle")),f=i(t("./utils/buildRoundedRectangle")),p=i(t("./utils/buildCircle")),g=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this,r));return i.graphicsDataPool=[],i.primitiveShader=null,i.gl=r.gl,i.CONTEXT_UID=0,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.onContextChange=function(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.primitiveShader=new l.default(this.gl)},e.prototype.destroy=function(){o.default.prototype.destroy.call(this);for(var t=0;t<this.graphicsDataPool.length;++t)this.graphicsDataPool[t].destroy();this.graphicsDataPool=null},e.prototype.render=function(t){var e=this.renderer,r=e.gl,i=void 0,s=t._webGL[this.CONTEXT_UID];s&&t.dirty===s.dirty||(this.updateGraphics(t),s=t._webGL[this.CONTEXT_UID]);var o=this.primitiveShader;e.bindShader(o),e.state.setBlendMode(t.blendMode);for(var a=0,h=s.data.length;a<h;a++){var u=(i=s.data[a]).shader;e.bindShader(u),u.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),u.uniforms.tint=(0,n.hex2rgb)(t.tint),u.uniforms.alpha=t.worldAlpha,e.bindVao(i.vao),i.nativeLines?r.drawArrays(r.LINES,0,i.points.length/6):i.vao.draw(r.TRIANGLE_STRIP,i.indices.length)}},e.prototype.updateGraphics=function(t){var e=this.renderer.gl,r=t._webGL[this.CONTEXT_UID];if(r||(r=t._webGL[this.CONTEXT_UID]={lastIndex:0,data:[],gl:e,clearDirty:-1,dirty:-1}),r.dirty=t.dirty,t.clearDirty!==r.clearDirty){r.clearDirty=t.clearDirty;for(var i=0;i<r.data.length;i++)this.graphicsDataPool.push(r.data[i]);r.data.length=0,r.lastIndex=0}for(var n=void 0,o=void 0,a=r.lastIndex;a<t.graphicsData.length;a++){var h=t.graphicsData[a];n=this.getWebGLData(r,0),h.nativeLines&&h.lineWidth&&(o=this.getWebGLData(r,0,!0),r.lastIndex++),h.type===s.SHAPES.POLY&&(0,c.default)(h,n,o),h.type===s.SHAPES.RECT?(0,d.default)(h,n,o):h.type===s.SHAPES.CIRC||h.type===s.SHAPES.ELIP?(0,p.default)(h,n,o):h.type===s.SHAPES.RREC&&(0,f.default)(h,n,o),r.lastIndex++}this.renderer.bindVao(null);for(var u=0;u<r.data.length;u++)(n=r.data[u]).dirty&&n.upload()},e.prototype.getWebGLData=function(t,e,r){var i=t.data[t.data.length-1];return(!i||i.nativeLines!==r||i.points.length>32e4)&&((i=this.graphicsDataPool.pop()||new u.default(this.renderer.gl,this.primitiveShader,this.renderer.state.attribsState)).nativeLines=r,i.reset(e),t.data.push(i)),i.dirty=!0,i},e}(o.default);r.default=g,a.default.registerPlugin("graphics",g)},{"../../const":44,"../../renderers/webgl/WebGLRenderer":82,"../../renderers/webgl/utils/ObjectRenderer":92,"../../utils":123,"./WebGLGraphicsData":56,"./shaders/PrimitiveShader":57,"./utils/buildCircle":58,"./utils/buildPoly":60,"./utils/buildRectangle":61,"./utils/buildRoundedRectangle":62}],56:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t){return t&&t.__esModule?t:{default:t}}(t("pixi-gl-core")),n=function(){function t(e,r,n){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.gl=e,this.color=[0,0,0],this.points=[],this.indices=[],this.buffer=i.default.GLBuffer.createVertexBuffer(e),this.indexBuffer=i.default.GLBuffer.createIndexBuffer(e),this.dirty=!0,this.nativeLines=!1,this.glPoints=null,this.glIndices=null,this.shader=r,this.vao=new i.default.VertexArrayObject(e,n).addIndex(this.indexBuffer).addAttribute(this.buffer,r.attributes.aVertexPosition,e.FLOAT,!1,24,0).addAttribute(this.buffer,r.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}();r.default=n},{"pixi-gl-core":16}],57:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t){function e(r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this,r,["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
1)).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 function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(t("../../../Shader")).default);r.default=i},{"../../../Shader":42}],58:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e,r){var o=t.shape,a=o.x,h=o.y,u=void 0,l=void 0;if(t.type===n.SHAPES.CIRC?(u=o.radius,l=o.radius):(u=o.width,l=o.height),0!==u&&0!==l){var c=Math.floor(30*Math.sqrt(o.radius))||Math.floor(15*Math.sqrt(o.width+o.height)),d=2*Math.PI/c;if(t.fill){var f=(0,s.hex2rgb)(t.fillColor),p=t.fillAlpha,g=f[0]*p,y=f[1]*p,v=f[2]*p,m=e.points,_=e.indices,x=m.length/6;_.push(x);for(var b=0;b<c+1;b++)m.push(a,h,g,y,v,p),m.push(a+Math.sin(d*b)*u,h+Math.cos(d*b)*l,g,y,v,p),_.push(x++,x++);_.push(x-1)}if(t.lineWidth){var T=t.points;t.points=[];for(var w=0;w<c+1;w++)t.points.push(a+Math.sin(d*w)*u,h+Math.cos(d*w)*l);(0,i.default)(t,e,r),t.points=T}}};var i=function(t){return t&&t.__esModule?t:{default:t}}(t("./buildLine")),n=t("../../../const"),s=t("../../../utils")},{"../../../const":44,"../../../utils":123,"./buildLine":59}],59:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e,r){t.nativeLines?function(t,e){var r=0,i=t.points;if(0!==i.length){var s=e.points,o=i.length/2,a=(0,n.hex2rgb)(t.lineColor),h=t.lineAlpha,u=a[0]*h,l=a[1]*h,c=a[2]*h;for(r=1;r<o;r++){var d=i[2*(r-1)],f=i[2*(r-1)+1],p=i[2*r],g=i[2*r+1];s.push(d,f),s.push(u,l,c,h),s.push(p,g),s.push(u,l,c,h)}}}(t,r):function(t,e){var r=t.points;if(0!==r.length){var s=new i.Point(r[0],r[1]),o=new i.Point(r[r.length-2],r[r.length-1]);if(s.x===o.x&&s.y===o.y){(r=r.slice()).pop(),r.pop();var a=(o=new i.Point(r[r.length-2],r[r.length-1])).x+.5*(s.x-o.x),h=o.y+.5*(s.y-o.y);r.unshift(a,h),r.push(a,h)}var u=e.points,l=e.indices,c=r.length/2,d=r.length,f=u.length/6,p=t.lineWidth/2,g=(0,n.hex2rgb)(t.lineColor),y=t.lineAlpha,v=g[0]*y,m=g[1]*y,_=g[2]*y,x=r[0],b=r[1],T=r[2],w=r[3],E=0,S=0,M=-(b-w),O=x-T,R=0,C=0,A=0,P=0,D=Math.sqrt(M*M+O*O);M/=D,O/=D,M*=p,O*=p,u.push(x-M,b-O,v,m,_,y),u.push(x+M,b+O,v,m,_,y);for(var I=1;I<c-1;++I){x=r[2*(I-1)],b=r[2*(I-1)+1],T=r[2*I],w=r[2*I+1],E=r[2*(I+1)],S=r[2*(I+1)+1],M=-(b-w),O=x-T,M/=D=Math.sqrt(M*M+O*O),O/=D,M*=p,O*=p,R=-(w-S),C=T-E,R/=D=Math.sqrt(R*R+C*C),C/=D;var L=-O+b-(-O+w),k=-M+T-(-M+x),N=(-M+x)*(-O+w)-(-M+T)*(-O+b),B=-(C*=p)+S-(-C+w),F=-(R*=p)+T-(-R+E),U=(-R+E)*(-C+w)-(-R+T)*(-C+S),j=L*F-B*k;if(Math.abs(j)<.1)j+=10.1,u.push(T-M,w-O,v,m,_,y),u.push(T+M,w+O,v,m,_,y);else{var X=(k*U-F*N)/j,G=(B*N-L*U)/j;(X-T)*(X-T)+(G-w)*(G-w)>196*p*p?(A=M-R,P=O-C,A/=D=Math.sqrt(A*A+P*P),P/=D,A*=p,P*=p,u.push(T-A,w-P),u.push(v,m,_,y),u.push(T+A,w+P),u.push(v,m,_,y),u.push(T-A,w-P),u.push(v,m,_,y),d++):(u.push(X,G),u.push(v,m,_,y),u.push(T-(X-T),w-(G-w)),u.push(v,m,_,y))}}x=r[2*(c-2)],b=r[2*(c-2)+1],T=r[2*(c-1)],M=-(b-(w=r[2*(c-1)+1])),O=x-T,M/=D=Math.sqrt(M*M+O*O),O/=D,M*=p,O*=p,u.push(T-M,w-O),u.push(v,m,_,y),u.push(T+M,w+O),u.push(v,m,_,y),l.push(f);for(var W=0;W<d;++W)l.push(f++);l.push(f-1)}}(t,e)};var i=t("../../../math"),n=t("../../../utils")},{"../../../math":68,"../../../utils":123}],60:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0,r.default=function(t,e,r){t.points=t.shape.points.slice();var i=t.points;if(t.fill&&i.length>=6){for(var a=[],h=t.holes,u=0;u<h.length;u++){var l=h[u];a.push(i.length/2),i=i.concat(l.points)}var c=e.points,d=e.indices,f=i.length/2,p=(0,s.hex2rgb)(t.fillColor),g=t.fillAlpha,y=p[0]*g,v=p[1]*g,m=p[2]*g,_=(0,o.default)(i,a,2);if(!_)return;for(var x=c.length/6,b=0;b<_.length;b+=3)d.push(_[b]+x),d.push(_[b]+x),d.push(_[b+1]+x),d.push(_[b+2]+x),d.push(_[b+2]+x);for(var T=0;T<f;T++)c.push(i[2*T],i[2*T+1],y,v,m,g)}t.lineWidth>0&&(0,n.default)(t,e,r)};var n=i(t("./buildLine")),s=t("../../../utils"),o=i(t("earcut"))},{"../../../utils":123,"./buildLine":59,earcut:3}],61:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e,r){var s=t.shape,o=s.x,a=s.y,h=s.width,u=s.height;if(t.fill){var l=(0,n.hex2rgb)(t.fillColor),c=t.fillAlpha,d=l[0]*c,f=l[1]*c,p=l[2]*c,g=e.points,y=e.indices,v=g.length/6;g.push(o,a),g.push(d,f,p,c),g.push(o+h,a),g.push(d,f,p,c),g.push(o,a+u),g.push(d,f,p,c),g.push(o+h,a+u),g.push(d,f,p,c),y.push(v,v,v+1,v+2,v+3,v+3)}if(t.lineWidth){var m=t.points;t.points=[o,a,o+h,a,o+h,a+u,o,a+u,o,a],(0,i.default)(t,e,r),t.points=m}};var i=function(t){return t&&t.__esModule?t:{default:t}}(t("./buildLine")),n=t("../../../utils")},{"../../../utils":123,"./buildLine":59}],62:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e,r){return t+(e-t)*r}function s(t,e,r,i,s,o){for(var a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:[],h=0,u=0,l=0,c=0,d=0,f=0,p=0,g=0;p<=20;++p)h=n(t,r,g=p/20),u=n(e,i,g),l=n(r,s,g),c=n(i,o,g),d=n(h,l,g),f=n(u,c,g),a.push(d,f);return a}
1r.__esModule=!0,r.default=function(t,e,r){var i=t.shape,n=i.x,u=i.y,l=i.width,c=i.height,d=i.radius,f=[];if(f.push(n,u+d),s(n,u+c-d,n,u+c,n+d,u+c,f),s(n+l-d,u+c,n+l,u+c,n+l,u+c-d,f),s(n+l,u+d,n+l,u,n+l-d,u,f),s(n+d,u,n,u,n,u+d+1e-10,f),t.fill){for(var p=(0,h.hex2rgb)(t.fillColor),g=t.fillAlpha,y=p[0]*g,v=p[1]*g,m=p[2]*g,_=e.points,x=e.indices,b=_.length/6,T=(0,o.default)(f,null,2),w=0,E=T.length;w<E;w+=3)x.push(T[w]+b),x.push(T[w]+b),x.push(T[w+1]+b),x.push(T[w+2]+b),x.push(T[w+2]+b);for(var S=0,M=f.length;S<M;S++)_.push(f[S],f[++S],y,v,m,g)}if(t.lineWidth){var O=t.points;t.points=f,(0,a.default)(t,e,r),t.points=O}};var o=i(t("earcut")),a=i(t("./buildLine")),h=t("../../../utils")},{"../../../utils":123,"./buildLine":59,earcut:3}],63:[function(t,e,r){"use strict";function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function n(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0,r.autoDetectRenderer=r.Application=r.Filter=r.SpriteMaskFilter=r.Quad=r.RenderTarget=r.ObjectRenderer=r.WebGLManager=r.Shader=r.CanvasRenderTarget=r.TextureUvs=r.VideoBaseTexture=r.BaseRenderTexture=r.RenderTexture=r.BaseTexture=r.TextureMatrix=r.Texture=r.Spritesheet=r.CanvasGraphicsRenderer=r.GraphicsRenderer=r.GraphicsData=r.Graphics=r.TextMetrics=r.TextStyle=r.Text=r.SpriteRenderer=r.CanvasTinter=r.CanvasSpriteRenderer=r.Sprite=r.TransformBase=r.TransformStatic=r.Transform=r.Container=r.DisplayObject=r.Bounds=r.glCore=r.WebGLRenderer=r.CanvasRenderer=r.ticker=r.utils=r.settings=void 0;var s=t("./const");Object.keys(s).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(r,t,{enumerable:!0,get:function(){return s[t]}})}));var o=t("./math");Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(r,t,{enumerable:!0,get:function(){return o[t]}})}));var a=t("pixi-gl-core");Object.defineProperty(r,"glCore",{enumerable:!0,get:function(){return n(a).default}});var h=t("./display/Bounds");Object.defineProperty(r,"Bounds",{enumerable:!0,get:function(){return n(h).default}});var u=t("./display/DisplayObject");Object.defineProperty(r,"DisplayObject",{enumerable:!0,get:function(){return n(u).default}});var l=t("./display/Container");Object.defineProperty(r,"Container",{enumerable:!0,get:function(){return n(l).default}});var c=t("./display/Transform");Object.defineProperty(r,"Transform",{enumerable:!0,get:function(){return n(c).default}});var d=t("./display/TransformStatic");Object.defineProperty(r,"TransformStatic",{enumerable:!0,get:function(){return n(d).default}});var f=t("./display/TransformBase");Object.defineProperty(r,"TransformBase",{enumerable:!0,get:function(){return n(f).default}});var p=t("./sprites/Sprite");Object.defineProperty(r,"Sprite",{enumerable:!0,get:function(){return n(p).default}});var g=t("./sprites/canvas/CanvasSpriteRenderer");Object.defineProperty(r,"CanvasSpriteRenderer",{enumerable:!0,get:function(){return n(g).default}});var y=t("./sprites/canvas/CanvasTinter");Object.defineProperty(r,"CanvasTinter",{enumerable:!0,get:function(){return n(y).default}});var v=t("./sprites/webgl/SpriteRenderer");Object.defineProperty(r,"SpriteRenderer",{enumerable:!0,get:function(){return n(v).default}});var m=t("./text/Text");Object.defineProperty(r,"Text",{enumerable:!0,get:function(){return n(m).default}});var _=t("./text/TextStyle");Object.defineProperty(r,"TextStyle",{enumerable:!0,get:function(){return n(_).default}});var x=t("./text/TextMetrics");Object.defineProperty(r,"TextMetrics",{enumerable:!0,get:function(){return n(x).default}});var b=t("./graphics/Graphics");Object.defineProperty(r,"Graphics",{enumerable:!0,get:function(){return n(b).default}});var T=t("./graphics/GraphicsData");Object.defineProperty(r,"GraphicsData",{enumerable:!0,get:function(){return n(T).default}});var w=t("./graphics/webgl/GraphicsRenderer");Object.defineProperty(r,"GraphicsRenderer",{enumerable:!0,get:function(){return n(w).default}});var E=t("./graphics/canvas/CanvasGraphicsRenderer");Object.defineProperty(r,"CanvasGraphicsRenderer",{enumerable:!0,get:function(){return n(E).default}});var S=t("./textures/Spritesheet");Object.defineProperty(r,"Spritesheet",{enumerable:!0,get:function(){return n(S).default}});var M=t("./textures/Texture");Object.defineProperty(r,"Texture",{enumerable:!0,get:function(){return n(M).default}});var O=t("./textures/TextureMatrix");Object.defineProperty(r,"TextureMatrix",{enumerable:!0,get:function(){return n(O).default}});var R=t("./textures/BaseTexture");Object.defineProperty(r,"BaseTexture",{enumerable:!0,get:function(){return n(R).default}});var C=t("./textures/RenderTexture");Object.defineProperty(r,"RenderTexture",{enumerable:!0,get:function(){return n(C).default}});var A=t("./textures/BaseRenderTexture");Object.defineProperty(r,"BaseRenderTexture",{enumerable:!0,get:function(){return n(A).default}});var P=t("./textures/VideoBaseTexture");Object.defineProperty(r,"VideoBaseTexture",{enumerable:!0,get:function(){return n(P).default}});var D=t("./textures/TextureUvs");Object.defineProperty(r,"TextureUvs",{enumerable:!0,get:function(){return n(D).default}});var I=t("./renderers/canvas/utils/CanvasRenderTarget");Object.defineProperty(r,"CanvasRenderTarget",{enumerable:!0,get:function(){return n(I).default}});var L=t("./Shader");Object.defineProperty(r,"Shader",{enumerable:!0,get:function(){return n(L).default}});var k=t("./renderers/webgl/managers/WebGLManager");Object.defineProperty(r,"WebGLManager",{enumerable:!0,get:function(){return n(k).default}});var N=t("./renderers/webgl/utils/ObjectRenderer");Object.defineProperty(r,"ObjectRenderer",{enumerable:!0,get:function(){return n(N).default}});var B=t("./renderers/webgl/utils/RenderTarget");Object.defineProperty(r,"RenderTarget",{enumerable:!0,get:function(){return n(B).default}});var F=t("./renderers/webgl/utils/Quad");Object.defineProperty(r,"Quad",{enumerable:!0,get:function(){return n(F).default}});var U=t("./renderers/webgl/filters/spriteMask/SpriteMaskFilter");Object.defineProperty(r,"SpriteMaskFilter",{enumerable:!0,get:function(){return n(U).default}});var j=t("./renderers/webgl/filters/Filter");Object.defineProperty(r,"Filter",{enumerable:!0,get:function(){return n(j).default}});var X=t("./Application");Object.defineProperty(r,"Application",{enumerable:!0,get:function(){return n(X).default}});var G=t("./autoDetectRenderer");Object.defineProperty(r,"autoDetectRenderer",{enumerable:!0,get:function(){return G.autoDetectRenderer}});var W=i(t("./utils")),V=i(t("./ticker")),H=n(t("./settings")),Y=n(t("./renderers/canvas/CanvasRenderer")),z=n(t("./renderers/webgl/WebGLRenderer"));r.settings=H.default,r.utils=W,r.ticker=V,r.CanvasRenderer=Y.default,r.WebGLRenderer=z.default},{"./Application":41,"./Shader":42,"./autoDetectRenderer":43,"./const":44,"./display/
1Bounds":45,"./display/Container":46,"./display/DisplayObject":47,"./display/Transform":48,"./display/TransformBase":49,"./display/TransformStatic":50,"./graphics/Graphics":51,"./graphics/GraphicsData":52,"./graphics/canvas/CanvasGraphicsRenderer":53,"./graphics/webgl/GraphicsRenderer":55,"./math":68,"./renderers/canvas/CanvasRenderer":75,"./renderers/canvas/utils/CanvasRenderTarget":77,"./renderers/webgl/WebGLRenderer":82,"./renderers/webgl/filters/Filter":84,"./renderers/webgl/filters/spriteMask/SpriteMaskFilter":87,"./renderers/webgl/managers/WebGLManager":91,"./renderers/webgl/utils/ObjectRenderer":92,"./renderers/webgl/utils/Quad":93,"./renderers/webgl/utils/RenderTarget":94,"./settings":99,"./sprites/Sprite":100,"./sprites/canvas/CanvasSpriteRenderer":101,"./sprites/canvas/CanvasTinter":102,"./sprites/webgl/SpriteRenderer":104,"./text/Text":106,"./text/TextMetrics":107,"./text/TextStyle":108,"./textures/BaseRenderTexture":109,"./textures/BaseTexture":110,"./textures/RenderTexture":111,"./textures/Spritesheet":112,"./textures/Texture":113,"./textures/TextureMatrix":114,"./textures/TextureUvs":115,"./textures/VideoBaseTexture":116,"./ticker":119,"./utils":123,"pixi-gl-core":16}],64:[function(t,e,r){"use strict";function i(t){return t<0?-1:t>0?1:0}r.__esModule=!0;var n=function(t){return t&&t.__esModule?t:{default:t}}(t("./Matrix")),s=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],o=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],a=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],h=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],u=[],l=[];!function(){for(var t=0;t<16;t++){var e=[];l.push(e);for(var r=0;r<16;r++)for(var c=i(s[t]*s[r]+a[t]*o[r]),d=i(o[t]*s[r]+h[t]*o[r]),f=i(s[t]*a[r]+a[t]*h[r]),p=i(o[t]*a[r]+h[t]*h[r]),g=0;g<16;g++)if(s[g]===c&&o[g]===d&&a[g]===f&&h[g]===p){e.push(g);break}}for(var y=0;y<16;y++){var v=new n.default;v.set(s[y],o[y],a[y],h[y],0,0),u.push(v)}}();var c={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 s[t]},uY:function(t){return o[t]},vX:function(t){return a[t]},vY:function(t){return h[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return l[t][e]},sub:function(t,e){return l[t][c.inv(e)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2==(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?c.S:c.N:2*Math.abs(e)<=Math.abs(t)?t>0?c.E:c.W:e>0?t>0?c.SE:c.SW:t>0?c.NE:c.NW},matrixAppendRotationInv:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=u[c.inv(e)];n.tx=r,n.ty=i,t.append(n)}};r.default=c},{"./Matrix":65}],65:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),n=function(t){return t&&t.__esModule?t:{default:t}}(t("./Point")),s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.a=e,this.b=r,this.c=i,this.d=n,this.tx=s,this.ty=o,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,r,i,n,s){return this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=s,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var r=e||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r},t.prototype.apply=function(t,e){e=e||new n.default;var r=t.x,i=t.y;return e.x=this.a*r+this.c*i+this.tx,e.y=this.b*r+this.d*i+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new n.default;var r=1/(this.a*this.d+this.c*-this.b),i=t.x,s=t.y;return e.x=this.d*r*i+-this.c*r*s+(this.ty*this.c-this.tx*this.d)*r,e.y=this.a*r*s+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,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),r=Math.sin(t),i=this.a,n=this.c,s=this.tx;return this.a=i*e-this.b*r,this.b=i*r+this.b*e,this.c=n*e-this.d*r,this.d=n*r+this.d*e,this.tx=s*e-this.t
1y*r,this.ty=s*r+this.ty*e,this},t.prototype.append=function(t){var e=this.a,r=this.b,i=this.c,n=this.d;return this.a=t.a*e+t.b*i,this.b=t.a*r+t.b*n,this.c=t.c*e+t.d*i,this.d=t.c*r+t.d*n,this.tx=t.tx*e+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*n+this.ty,this},t.prototype.setTransform=function(t,e,r,i,n,s,o,a,h){var u=Math.sin(o),l=Math.cos(o),c=Math.cos(h),d=Math.sin(h),f=-Math.sin(a),p=Math.cos(a),g=l*n,y=u*n,v=-u*s,m=l*s;return this.a=c*g+d*v,this.b=c*y+d*m,this.c=f*g+p*v,this.d=f*y+p*m,this.tx=t+(r*g+i*v),this.ty=e+(r*y+i*m),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*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,r=this.b,i=this.c,n=this.d,s=-Math.atan2(-i,n),o=Math.atan2(r,e);return Math.abs(s+o)<1e-5?(t.rotation=o,e<0&&n>=0&&(t.rotation+=t.rotation<=0?Math.PI:-Math.PI),t.skew.x=t.skew.y=0):(t.skew.x=s,t.skew.y=o),t.scale.x=Math.sqrt(e*e+r*r),t.scale.y=Math.sqrt(i*i+n*n),t.position.x=this.tx,t.position.y=this.ty,t},t.prototype.invert=function(){var t=this.a,e=this.b,r=this.c,i=this.d,n=this.tx,s=t*i-e*r;return this.a=i/s,this.b=-e/s,this.c=-r/s,this.d=t/s,this.tx=(r*this.ty-i*n)/s,this.ty=-(t*this.ty-e*n)/s,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},i(t,null,[{key:"IDENTITY",get:function(){return new t}},{key:"TEMP_MATRIX",get:function(){return new t}}]),t}();r.default=s},{"./Point":67}],66:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),n=function(){function t(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this._x=i,this._y=n,this.cb=e,this.scope=r}return t.prototype.set=function(t,e){var r=t||0,i=e||(0!==e?r:0);this._x===r&&this._y===i||(this._x=r,this._y=i,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}();r.default=n},{}],67:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.x=e,this.y=r}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}();r.default=i},{}],68:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("./Point");Object.defineProperty(r,"Point",{enumerable:!0,get:function(){return i(n).default}});var s=t("./ObservablePoint");Object.defineProperty(r,"ObservablePoint",{enumerable:!0,get:function(){return i(s).default}});var o=t("./Matrix");Object.defineProperty(r,"Matrix",{enumerable:!0,get:function(){return i(o).default}});var a=t("./GroupD8");Object.defineProperty(r,"GroupD8",{enumerable:!0,get:function(){return i(a).default}});var h=t("./shapes/Circle");
1Object.defineProperty(r,"Circle",{enumerable:!0,get:function(){return i(h).default}});var u=t("./shapes/Ellipse");Object.defineProperty(r,"Ellipse",{enumerable:!0,get:function(){return i(u).default}});var l=t("./shapes/Polygon");Object.defineProperty(r,"Polygon",{enumerable:!0,get:function(){return i(l).default}});var c=t("./shapes/Rectangle");Object.defineProperty(r,"Rectangle",{enumerable:!0,get:function(){return i(c).default}});var d=t("./shapes/RoundedRectangle");Object.defineProperty(r,"RoundedRectangle",{enumerable:!0,get:function(){return i(d).default}})},{"./GroupD8":64,"./Matrix":65,"./ObservablePoint":66,"./Point":67,"./shapes/Circle":69,"./shapes/Ellipse":70,"./shapes/Polygon":71,"./shapes/Rectangle":72,"./shapes/RoundedRectangle":73}],69:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t){return t&&t.__esModule?t:{default:t}}(t("./Rectangle")),n=t("../../const"),s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.x=e,this.y=r,this.radius=i,this.type=n.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 r=this.radius*this.radius,i=this.x-t,n=this.y-e;return(i*=i)+(n*=n)<=r},t.prototype.getBounds=function(){return new i.default(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},t}();r.default=s},{"../../const":44,"./Rectangle":72}],70:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t){return t&&t.__esModule?t:{default:t}}(t("./Rectangle")),n=t("../../const"),s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.x=e,this.y=r,this.width=i,this.height=s,this.type=n.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 r=(t-this.x)/this.width,i=(e-this.y)/this.height;return(r*=r)+(i*=i)<=1},t.prototype.getBounds=function(){return new i.default(this.x-this.width,this.y-this.height,this.width,this.height)},t}();r.default=s},{"../../const":44,"./Rectangle":72}],71:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t){return t&&t.__esModule?t:{default:t}}(t("../Point")),n=t("../../const"),s=function(){function t(){for(var e=arguments.length,r=Array(e),s=0;s<e;s++)r[s]=arguments[s];if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Array.isArray(r[0])&&(r=r[0]),r[0]instanceof i.default){for(var o=[],a=0,h=r.length;a<h;a++)o.push(r[a].x,r[a].y);r=o}this.closed=!0,this.points=r,this.type=n.SHAPES.POLY}return t.prototype.clone=function(){return new t(this.points.slice())},t.prototype.close=function(){var t=this.points;t[0]===t[t.length-2]&&t[1]===t[t.length-1]||t.push(t[0],t[1])},t.prototype.contains=function(t,e){for(var r=!1,i=this.points.length/2,n=0,s=i-1;n<i;s=n++){var o=this.points[2*n],a=this.points[2*n+1],h=this.points[2*s],u=this.points[2*s+1];a>e!=u>e&&t<(e-a)/(u-a)*(h-o)+o&&(r=!r)}return r},t}();r.default=s},{"../../const":44,"../Point":67}],72:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),n=t("../../const"),s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.x=Number(e),this.y=Number(r),this.width=Number(i),this.height=Number(s),this.type=n.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.x+this.width&&e>=this.y&&e<this.y+this.height},t.prototype.pad=function(t,e){t=t||0,e=e||(0!==e?t:0),this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e},t.prototype.fit=function(t){this.x<t.x&&(this.width+=this.x,this.width<0&&(this.width=0),this.x=t.x),this.y<t.y&&(this.height+=this.y,this.height<0&&(this.height=0),this.y=t.y),this.x+this.width>t.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),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),n=Math.max(this.y+this.height,t.y+t.height);this.x=e,this.width=r-e,this.y=i,this.height=n-i},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}();r.default=s},{"../../const":44}],73:[function(t,e,r){"use strict";r.__esModule=!0;var i=t("../../const"),n=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:20;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.x=e,this.y=r,this.width=n,this.height=s,this.radius=o,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 r=t-(this.x+this.radius),i=e-(this.y+this.radius),n=this.radius*this.radius;if(r*r+i*i<=n)return!0;
1if((r=t-(this.x+this.width-this.radius))*r+i*i<=n)return!0;if(r*r+(i=e-(this.y+this.height-this.radius))*i<=n)return!0;if((r=t-(this.x+this.radius))*r+i*i<=n)return!0}return!1},t}();r.default=n},{"../../const":44}],74:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),s=t("../utils"),o=t("../math"),a=t("../const"),u=i(t("../settings")),l=i(t("../display/Container")),c=i(t("../textures/RenderTexture")),d=i(t("eventemitter3")),f=new o.Matrix,p=function(t){function e(r,i,n,c){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var d=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this));return(0,s.sayHello)(r),"number"==typeof i&&(i=Object.assign({width:i,height:n||u.default.RENDER_OPTIONS.height},c)),i=Object.assign({},u.default.RENDER_OPTIONS,i),d.options=i,d.type=a.RENDERER_TYPE.UNKNOWN,d.screen=new o.Rectangle(0,0,i.width,i.height),d.view=i.view||document.createElement("canvas"),d.resolution=i.resolution||u.default.RESOLUTION,d.transparent=i.transparent,d.autoResize=i.autoResize||!1,d.blendModes=null,d.preserveDrawingBuffer=i.preserveDrawingBuffer,d.clearBeforeRender=i.clearBeforeRender,d.roundPixels=i.roundPixels,d._backgroundColor=0,d._backgroundColorRgba=[0,0,0,0],d._backgroundColorString="#000000",d.backgroundColor=i.backgroundColor||d._backgroundColor,d._tempDisplayObjectParent=new l.default,d._lastObjectRendered=d._tempDisplayObjectParent,d}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.resize=function(t,e){this.screen.width=t,this.screen.height=e,this.view.width=t*this.resolution,this.view.height=e*this.resolution,this.autoResize&&(this.view.style.width=t+"px",this.view.style.height=e+"px")},e.prototype.generateTexture=function(t,e,r,i){i=i||t.getLocalBounds();var n=c.default.create(0|i.width,0|i.height,e,r);return f.tx=-i.x,f.ty=-i.y,this.render(t,n,!1,f,!0),n},e.prototype.destroy=function(t){t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.type=a.RENDERER_TYPE.UNKNOWN,this.view=null,this.screen=null,this.resolution=0,this.transparent=!1,this.autoResize=!1,this.blendModes=null,this.options=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this.roundPixels=!1,this._backgroundColor=0,this._backgroundColorRgba=null,this._backgroundColorString=null,this._tempDisplayObjectParent=null,this._lastObjectRendered=null},n(e,[{key:"width",get:function(){return this.view.width}},{key:"height",get:function(){return this.view.height}},{key:"backgroundColor",get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=(0,s.hex2string)(t),(0,s.hex2rgb)(t,this._backgroundColorRgba)}}]),e}(d.default);r.default=p},{"../const":44,"../display/Container":46,"../math":68,"../settings":99,"../textures/RenderTexture":111,"../utils":123,eventemitter3:4}],75:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=i(t("../SystemRenderer")),s=i(t("./utils/CanvasMaskManager")),o=i(t("./utils/CanvasRenderTarget")),a=i(t("./utils/mapCanvasBlendModesToPixi")),u=t("../../utils"),l=t("../../const"),c=i(t("../../settings")),d=function(t){function e(r,i,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this,"Canvas",r,i,n));return o.type=l.RENDERER_TYPE.CANVAS,o.rootContext=o.view.getContext("2d",{alpha:o.transparent}),o.context=o.rootContext,o.refresh=!0,o.maskManager=new s.default(o),o.smoothProperty="imageSmoothingEnabled",o.rootContext.
1imageSmoothingEnabled||(o.rootContext.webkitImageSmoothingEnabled?o.smoothProperty="webkitImageSmoothingEnabled":o.rootContext.mozImageSmoothingEnabled?o.smoothProperty="mozImageSmoothingEnabled":o.rootContext.oImageSmoothingEnabled?o.smoothProperty="oImageSmoothingEnabled":o.rootContext.msImageSmoothingEnabled&&(o.smoothProperty="msImageSmoothingEnabled")),o.initPlugins(),o.blendModes=(0,a.default)(),o._activeBlendMode=null,o.renderingToScreen=!1,o.resize(o.options.width,o.options.height),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.render=function(t,e,r,i,n){if(this.view){this.renderingToScreen=!e,this.emit("prerender");var s=this.resolution;e?((e=e.baseTexture||e)._canvasRenderTarget||(e._canvasRenderTarget=new o.default(e.width,e.height,e.resolution),e.source=e._canvasRenderTarget.canvas,e.valid=!0),this.context=e._canvasRenderTarget.context,this.resolution=e._canvasRenderTarget.resolution):this.context=this.rootContext;var a=this.context;if(e||(this._lastObjectRendered=t),!n){var h=t.parent,u=this._tempDisplayObjectParent.transform.worldTransform;i?(i.copy(u),this._tempDisplayObjectParent.transform._worldID=-1):u.identity(),t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=h}a.save(),a.setTransform(1,0,0,1,0,0),a.globalAlpha=1,this._activeBlendMode=l.BLEND_MODES.NORMAL,a.globalCompositeOperation=this.blendModes[l.BLEND_MODES.NORMAL],navigator.isCocoonJS&&this.view.screencanvas&&(a.fillStyle="black",a.clear()),(void 0!==r?r:this.clearBeforeRender)&&this.renderingToScreen&&(this.transparent?a.clearRect(0,0,this.width,this.height):(a.fillStyle=this._backgroundColorString,a.fillRect(0,0,this.width,this.height)));var c=this.context;this.context=a,t.renderCanvas(this),this.context=c,a.restore(),this.resolution=s,this.emit("postrender")}},e.prototype.clear=function(t){var e=this.context;t=t||this._backgroundColorString,!this.transparent&&t?(e.fillStyle=t,e.fillRect(0,0,this.width,this.height)):e.clearRect(0,0,this.width,this.height)},e.prototype.setBlendMode=function(t){this._activeBlendMode!==t&&(this._activeBlendMode=t,this.context.globalCompositeOperation=this.blendModes[t])},e.prototype.destroy=function(e){this.destroyPlugins(),t.prototype.destroy.call(this,e),this.context=null,this.refresh=!0,this.maskManager.destroy(),this.maskManager=null,this.smoothProperty=null},e.prototype.resize=function(e,r){t.prototype.resize.call(this,e,r),this.smoothProperty&&(this.rootContext[this.smoothProperty]=c.default.SCALE_MODE===l.SCALE_MODES.LINEAR)},e.prototype.invalidateBlendMode=function(){this._activeBlendMode=this.blendModes.indexOf(this.context.globalCompositeOperation)},e}(n.default);r.default=d,u.pluginTarget.mixin(d)},{"../../const":44,"../../settings":99,"../../utils":123,"../SystemRenderer":74,"./utils/CanvasMaskManager":76,"./utils/CanvasRenderTarget":77,"./utils/mapCanvasBlendModesToPixi":79}],76:[function(t,e,r){"use strict";r.__esModule=!0;var i=t("../../../const"),n=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.renderer=e}return t.prototype.pushMask=function(t){var e=this.renderer;e.context.save();var r=t.alpha,i=t.transform.worldTransform,n=e.resolution;e.context.setTransform(i.a*n,i.b*n,i.c*n,i.d*n,i.tx*n,i.ty*n),t._texture||(this.renderGraphicsShape(t),e.context.clip()),t.worldAlpha=r},t.prototype.renderGraphicsShape=function(t){var e=this.renderer.context,r=t.graphicsData.length;if(0!==r){e.beginPath();for(var n=0;n<r;n++){var s=t.graphicsData[n],o=s.shape;if(s.type===i.SHAPES.POLY){var a=o.points;e.moveTo(a[0],a[1]);for(var h=1;h<a.length/2;h++)e.lineTo(a[2*h],a[2*h+1]);a[0]===a[a.length-2]&&a[1]===a[a.length-1]&&e.closePath()}else if(s.type===i.SHAPES.RECT)e.rect(o.x,o.y,o.width,o.height),e.closePath();else if(s.type===i.SHAPES.CIRC)e.arc(o.x,o.y,o.radius,0,2*Math.PI),e.closePath();else if(s.type===i.SHAPES.ELIP){var u=2*o.width,l=2*o.height,c=o.x-u/2,d=o.y-l/2,f=u/2*.5522848,p=l/2*.5522848,g=c+u,y=d+l,v=c+u/2,m=d+l/2;e.moveTo(c,m),e.bezierCurveTo(c,m-p,v-f,d,v,d),e.bezierCurveTo(v+f,d,g,m-p,g,m),e.bezierCurveTo(g,m+p,v+f,y,v,y),e.bezierCurveTo(v-f,y,c,m+p,c,m),e.closePath()}else if(s.type===i.SHAPES.RREC){var _=o.x,x=o.y,b=o.width,T=o.height,w=o.radius,E=Math.min(b,T)/2|0;w=w>E?E:w,e.moveTo(_,x+w),e.lineTo(_,x+T-w),e.quadraticCurveTo(_,x+T,_+w,x+T),e.lineTo(_+b-w,x+T),e.quadraticCurveTo(_+b,x+T,_+b,x+T-w),e.lineTo(_+b,x+w),e.quadraticCurveTo(_+b,x,_+b-w,x),e.lineTo(_+w,x),e.quadraticCurveTo(_,x,_,x+w),e.closePath()}}}}
1,t.prototype.popMask=function(t){t.context.restore(),t.invalidateBlendMode()},t.prototype.destroy=function(){},t}();r.default=n},{"../../../const":44}],77:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),n=function(t){return t&&t.__esModule?t:{default:t}}(t("../../../settings")),s=function(){function t(e,r,i){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=i||n.default.RESOLUTION,this.resize(e,r)}return t.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},t.prototype.resize=function(t,e){this.canvas.width=t*this.resolution,this.canvas.height=e*this.resolution},t.prototype.destroy=function(){this.context=null,this.canvas=null},i(t,[{key:"width",get:function(){return this.canvas.width},set:function(t){this.canvas.width=t}},{key:"height",get:function(){return this.canvas.height},set:function(t){this.canvas.height=t}}]),t}();r.default=s},{"../../../settings":99}],78:[function(t,e,r){"use strict";function i(t){var e=document.createElement("canvas");e.width=6,e.height=1;var r=e.getContext("2d");return r.fillStyle=t,r.fillRect(0,0,6,1),e}r.__esModule=!0,r.default=function(){if("undefined"==typeof document)return!1;var t=i("#ff00ff"),e=i("#ffff00"),r=document.createElement("canvas");r.width=6,r.height=1;var n=r.getContext("2d");n.globalCompositeOperation="multiply",n.drawImage(t,0,0),n.drawImage(e,2,0);var s=n.getImageData(2,0,1,1);if(!s)return!1;var o=s.data;return 255===o[0]&&0===o[1]&&0===o[2]}},{}],79:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,n.default)()?(t[i.BLEND_MODES.NORMAL]="source-over",t[i.BLEND_MODES.ADD]="lighter",t[i.BLEND_MODES.MULTIPLY]="multiply",t[i.BLEND_MODES.SCREEN]="screen",t[i.BLEND_MODES.OVERLAY]="overlay",t[i.BLEND_MODES.DARKEN]="darken",t[i.BLEND_MODES.LIGHTEN]="lighten",t[i.BLEND_MODES.COLOR_DODGE]="color-dodge",t[i.BLEND_MODES.COLOR_BURN]="color-burn",t[i.BLEND_MODES.HARD_LIGHT]="hard-light",t[i.BLEND_MODES.SOFT_LIGHT]="soft-light",t[i.BLEND_MODES.DIFFERENCE]="difference",t[i.BLEND_MODES.EXCLUSION]="exclusion",t[i.BLEND_MODES.HUE]="hue",t[i.BLEND_MODES.SATURATION]="saturate",t[i.BLEND_MODES.COLOR]="color",t[i.BLEND_MODES.LUMINOSITY]="luminosity"):(t[i.BLEND_MODES.NORMAL]="source-over",t[i.BLEND_MODES.ADD]="lighter",t[i.BLEND_MODES.MULTIPLY]="source-over",t[i.BLEND_MODES.SCREEN]="source-over",t[i.BLEND_MODES.OVERLAY]="source-over",t[i.BLEND_MODES.DARKEN]="source-over",t[i.BLEND_MODES.LIGHTEN]="source-over",t[i.BLEND_MODES.COLOR_DODGE]="source-over",t[i.BLEND_MODES.COLOR_BURN]="source-over",t[i.BLEND_MODES.HARD_LIGHT]="source-over",t[i.BLEND_MODES.SOFT_LIGHT]="source-over",t[i.BLEND_MODES.DIFFERENCE]="source-over",t[i.BLEND_MODES.EXCLUSION]="source-over",t[i.BLEND_MODES.HUE]="source-over",t[i.BLEND_MODES.SATURATION]="source-over",t[i.BLEND_MODES.COLOR]="source-over",t[i.BLEND_MODES.LUMINOSITY]="source-over"),t[i.BLEND_MODES.NORMAL_NPM]=t[i.BLEND_MODES.NORMAL],t[i.BLEND_MODES.ADD_NPM]=t[i.BLEND_MODES.ADD],t[i.BLEND_MODES.SCREEN_NPM]=t[i.BLEND_MODES.SCREEN],t};var i=t("../../../const"),n=function(t){return t&&t.__esModule?t:{default:t}}(t("./canUseNewCanvasBlendModes"))},{"../../../const":44,"./canUseNewCanvasBlendModes":78}],80:[function(t,e,r){"use strict";r.__esModule=!0;var i=t("../../const"),n=function(t){return t&&t.__esModule?t:{default:t}}(t("../../settings")),s=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.renderer=e,this.count=0,this.checkCount=0,this.maxIdle=n.default.GC_MAX_IDLE,this.checkCountMax=n.default.GC_MAX_CHECK_COUNT,this.mode=n.default.GC_MODE}return t.prototype.update=function(){this.count++,this.mode!==i.GC_MODES.MANUAL&&++this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())},t.prototype.run=function(){for(var t=this.renderer.textureManager,e=t._managedTextures,r=!1,i=0;i<e.length;i++){var n=e[i];!n._glRenderTargets&&this.count-n.touched>
1this.maxIdle&&(t.destroyTexture(n,!0),e[i]=null,r=!0)}if(r){for(var s=0,o=0;o<e.length;o++)null!==e[o]&&(e[s++]=e[o]);e.length=s}},t.prototype.unload=function(t){var e=this.renderer.textureManager;t._texture&&t._texture._glRenderTargets&&e.destroyTexture(t._texture,!0);for(var r=t.children.length-1;r>=0;r--)this.unload(t.children[r])},t}();r.default=s},{"../../const":44,"../../settings":99}],81:[function(t,e,r){"use strict";r.__esModule=!0;var i=t("pixi-gl-core"),n=t("../../const"),s=function(t){return t&&t.__esModule?t:{default:t}}(t("./utils/RenderTarget")),o=t("../../utils"),a=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(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 r=this.gl,o=!!t._glRenderTargets;if(!t.hasLoaded)return null;var a=this.renderer.boundTextures;if(void 0===e){e=0;for(var h=0;h<a.length;++h)if(a[h]===t){e=h;break}}a[e]=t,r.activeTexture(r.TEXTURE0+e);var u=t._glTextures[this.renderer.CONTEXT_UID];if(u)o?t._glRenderTargets[this.renderer.CONTEXT_UID].resize(t.width,t.height):u.upload(t.source);else{if(o){var l=new s.default(this.gl,t.width,t.height,t.scaleMode,t.resolution);l.resize(t.width,t.height),t._glRenderTargets[this.renderer.CONTEXT_UID]=l,u=l.texture}else(u=new i.GLTexture(this.gl,null,null,null,null)).bind(e),u.premultiplyAlpha=!0,u.upload(t.source);t._glTextures[this.renderer.CONTEXT_UID]=u,t.on("update",this.updateTexture,this),t.on("dispose",this.destroyTexture,this),this._managedTextures.push(t),t.isPowerOfTwo?(t.mipmap&&u.enableMipmap(),t.wrapMode===n.WRAP_MODES.CLAMP?u.enableWrapClamp():t.wrapMode===n.WRAP_MODES.REPEAT?u.enableWrapRepeat():u.enableWrapMirrorRepeat()):u.enableWrapClamp(),t.scaleMode===n.SCALE_MODES.NEAREST?u.enableNearestScaling():u.enableLinearScaling()}return u},t.prototype.destroyTexture=function(t,e){if((t=t.baseTexture||t).hasLoaded){var r=this.renderer.CONTEXT_UID,i=t._glTextures,n=t._glRenderTargets;if(i[r]&&(this.renderer.unbindTexture(t),i[r].destroy(),t.off("update",this.updateTexture,this),t.off("dispose",this.destroyTexture,this),delete i[r],!e)){var s=this._managedTextures.indexOf(t);-1!==s&&(0,o.removeItems)(this._managedTextures,s,1)}n&&n[r]&&(n[r].destroy(),delete n[r])}},t.prototype.removeAll=function(){for(var t=0;t<this._managedTextures.length;++t){var e=this._managedTextures[t];e._glTextures[this.renderer.CONTEXT_UID]&&delete e._glTextures[this.renderer.CONTEXT_UID]}},t.prototype.destroy=function(){for(var t=0;t<this._managedTextures.length;++t){var e=this._managedTextures[t];this.destroyTexture(e,!0),e.off("update",this.updateTexture,this),e.off("dispose",this.destroyTexture,this)}this._managedTextures=null},t}();r.default=a},{"../../const":44,"../../utils":123,"./utils/RenderTarget":94,"pixi-gl-core":16}],82:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=i(t("../SystemRenderer")),s=i(t("./managers/MaskManager")),o=i(t("./managers/StencilManager")),a=i(t("./managers/FilterManager")),u=i(t("./utils/RenderTarget")),l=i(t("./utils/ObjectRenderer")),c=i(t("./TextureManager")),d=i(t("../../textures/BaseTexture")),f=i(t("./TextureGarbageCollector")),p=i(t("./WebGLState")),g=i(t("./utils/mapWebGLDrawModesToPixi")),y=i(t("./utils/validateContext")),v=t("../../utils"),m=i(t("pixi-gl-core")),_=t("../../const"),x=0,b=function(t){function e(r,i,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this,"WebGL",r,i,n));return a.legacy=a.options.legacy,a.legacy&&(m.default.VertexArrayObject.FORCE_NATIVE=!0),a.type=_.RENDERER_TYPE.WEBGL,a.handleContextLost=a.handleContextLost.bind(a),a.handleContextRestored=a.handleContextRestored.bind(a),a.view.addEventListener("webglcontextlost",a.handleContextLost,!1),a.view.addEventListener("webglcontextrestored",a.handleContextRestored,!1),a._contextOptions={alpha:a.transparent,antialias:a.options.antialias,premultipliedAlpha:a.transparent&&"notMultiplied"!==a.transparent,stencil:!0,preserveDrawingBuffer:a.options.preserveDrawingBuffer,powerPreference:a.options.powerPreference},a._backgroundColorRgba[3]=a.transparent?0:1,a.maskManager=new s.default(a),a.stencilManager=new o.default(a),a.emptyRenderer=new l.default(a),a.currentRenderer=a.emptyRenderer,a.textureManager=null,a.filterManager=null,a.initPlugins(),a.options.context&&(0,y.default)(a.options.context),a.gl=a.options.context||m.default.createContext(a.view,a._contextOptions),a.CONTEXT_UID=x++,a.state=new p.default(a.gl),a.renderingToScreen=!0,a.boundTextures=null,a._activeShader=null,a._activeVao=null,a._activeRenderTarget=null,a._initContext(),a.drawModes=(0,g.default)(a.gl),a._nextTextureLocation=0,a.setBlendMode(0),a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype._initContext=function(){var t=this.gl;t.isContextLost()&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").restoreContext();var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this._activeShader=null,this._activeVao=null,this.boundTextures=new Array(e),this.emptyTextures=new Array(e),this.textureManager=new c.default(this),this.filterManager=new a.default(this),this.textureGC=new f.default(this),this.state.resetToDefault(),this.rootRen
1derTarget=new u.default(t,this.width,this.height,null,this.resolution,!0),this.rootRenderTarget.clearColor=this._backgroundColorRgba,this.bindRenderTarget(this.rootRenderTarget);var r=new m.default.GLTexture.fromData(t,null,1,1),i={_glTextures:{}};i._glTextures[this.CONTEXT_UID]={};for(var n=0;n<e;n++){var s=new d.default;s._glTextures[this.CONTEXT_UID]=r,this.boundTextures[n]=i,this.emptyTextures[n]=s,this.bindTexture(null,n)}this.emit("context",t),this.resize(this.screen.width,this.screen.height)},e.prototype.render=function(t,e,r,i,n){if(this.renderingToScreen=!e,this.emit("prerender"),this.gl&&!this.gl.isContextLost()){if(this._nextTextureLocation=0,e||(this._lastObjectRendered=t),!n){var s=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=s}this.bindRenderTexture(e,i),this.currentRenderer.start(),(void 0!==r?r:this.clearBeforeRender)&&this._activeRenderTarget.clear(),t.renderWebGL(this),this.currentRenderer.flush(),this.textureGC.update(),this.emit("postrender")}},e.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},e.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},e.prototype.resize=function(t,e){n.default.prototype.resize.call(this,t,e),this.rootRenderTarget.resize(t,e),this._activeRenderTarget===this.rootRenderTarget&&(this.rootRenderTarget.activate(),this._activeShader&&(this._activeShader.uniforms.projectionMatrix=this.rootRenderTarget.projectionMatrix.toArray(!0)))},e.prototype.setBlendMode=function(t){this.state.setBlendMode(t)},e.prototype.clear=function(t){this._activeRenderTarget.clear(t)},e.prototype.setTransform=function(t){this._activeRenderTarget.transform=t},e.prototype.clearRenderTexture=function(t,e){var r=t.baseTexture._glRenderTargets[this.CONTEXT_UID];return r&&r.clear(e),this},e.prototype.bindRenderTexture=function(t,e){var r=void 0;if(t){var i=t.baseTexture;i._glRenderTargets[this.CONTEXT_UID]||this.textureManager.updateTexture(i,0),this.unbindTexture(i),(r=i._glRenderTargets[this.CONTEXT_UID]).setFrame(t.frame)}else r=this.rootRenderTarget;return r.transform=e,this.bindRenderTarget(r),this},e.prototype.bindRenderTarget=function(t){return t!==this._activeRenderTarget&&(this._activeRenderTarget=t,t.activate(),this._activeShader&&(this._activeShader.uniforms.projectionMatrix=t.projectionMatrix.toArray(!0)),this.stencilManager.setMaskStack(t.stencilMaskStack)),this},e.prototype.bindShader=function(t,e){return this._activeShader!==t&&(this._activeShader=t,t.bind(),!1!==e&&(t.uniforms.projectionMatrix=this._activeRenderTarget.projectionMatrix.toArray(!0))),this},e.prototype.bindTexture=function(t,e,r){if((t=(t=t||this.emptyTextures[e]).baseTexture||t).touched=this.textureGC.count,r)e=e||0;else{for(var i=0;i<this.boundTextures.length;i++)if(this.boundTextures[i]===t)return i;void 0===e&&(this._nextTextureLocation++,this._nextTextureLocation%=this.boundTextures.length,e=this.boundTextures.length-this._nextTextureLocation-1)}var n=this.gl,s=t._glTextures[this.CONTEXT_UID];return s?(this.boundTextures[e]=t,n.activeTexture(n.TEXTURE0+e),n.bindTexture(n.TEXTURE_2D,s.texture)):this.textureManager.updateTexture(t,e),e},e.prototype.unbindTexture=function(t){var e=this.gl;t=t.baseTexture||t;for(var r=0;r<this.boundTextures.length;r++)this.boundTextures[r]===t&&(this.boundTextures[r]=this.emptyTextures[r],e.activeTexture(e.TEXTURE0+r),e.bindTexture(e.TEXTURE_2D,this.emptyTextures[r]._glTextures[this.CONTEXT_UID].texture));return this},e.prototype.createVao=function(){return new m.default.VertexArrayObject(this.gl,this.state.attribState)},e.prototype.bindVao=function(t){return this._activeVao===t?this:(t?t.bind():this._activeVao&&this._activeVao.unbind(),this._activeVao=t,this)},e.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer),this.bindVao(null),this._activeShader=null,this._activeRenderTarget=this.rootRenderTarget;for(var t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.emptyTextures[t];return this.rootRenderTarget.activate(),this.state.resetToDefault(),this},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this.textureManager.removeAll(),this.filterManager.destroy(!0),this._initContext()},e.prototype.destroy=function(e){this.destroyPlugins(),this.view.removeEventListener("webglcontextlost",this.handleContextLost),this.view.removeEventListener("webglcontextrestored",this.handleContextRestored),this.textureManager.destroy(),t.prototype.destroy.call(this,e),this.uid=0,this.maskManager.destroy(),this.stencilManager.destroy(),this.filterManager.destroy(),this.maskManager=null,this.filterManager=null,this.textureManager=null,this.currentRenderer=null,this.handleContextLost=null,this.handleContextRestored=null,this._contextOptions=null,this.gl.useProgram(null),this.gl.getExtension("WEBGL_lose_context")&&this.gl.getExtension("WEBGL_lose_context").loseContext(),this.gl=null},e}(n.default);r.default=b,v.pluginTarget.mixin(b)},{"../../const":44,"../../textures/BaseTexture":110,"../../utils":123,"../SystemRenderer":74,"./TextureGarbageCollector":80,"./TextureManager":81,"./WebGLState":83,"./managers/FilterManager":88,"./managers/MaskManager":89,"./managers/StencilManager":90,"./utils/ObjectRenderer":92,"./ut
1ils/RenderTarget":94,"./utils/mapWebGLDrawModesToPixi":97,"./utils/validateContext":98,"pixi-gl-core":16}],83:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t){return t&&t.__esModule?t:{default:t}}(t("./utils/mapWebGLBlendModesToPixi")),n=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.activeState=new Uint8Array(16),this.defaultState=new Uint8Array(16),this.defaultState[0]=1,this.stackIndex=0,this.stack=[],this.gl=e,this.maxAttribs=e.getParameter(e.MAX_VERTEX_ATTRIBS),this.attribState={tempAttribState:new Array(this.maxAttribs),attribState:new Array(this.maxAttribs)},this.blendModes=(0,i.default)(e),this.nativeVaoExtension=e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object")}return t.prototype.push=function(){var t=this.stack[this.stackIndex];t||(t=this.stack[this.stackIndex]=new Uint8Array(16)),++this.stackIndex;for(var e=0;e<this.activeState.length;e++)t[e]=this.activeState[e]},t.prototype.pop=function(){var t=this.stack[--this.stackIndex];this.setState(t)},t.prototype.setState=function(t){this.setBlend(t[0]),this.setDepthTest(t[1]),this.setFrontFace(t[2]),this.setCullFace(t[3]),this.setBlendMode(t[4])},t.prototype.setBlend=function(t){t=t?1:0,this.activeState[0]!==t&&(this.activeState[0]=t,this.gl[t?"enable":"disable"](this.gl.BLEND))},t.prototype.setBlendMode=function(t){if(t!==this.activeState[4]){this.activeState[4]=t;var e=this.blendModes[t];2===e.length?this.gl.blendFunc(e[0],e[1]):this.gl.blendFuncSeparate(e[0],e[1],e[2],e[3])}},t.prototype.setDepthTest=function(t){t=t?1:0,this.activeState[1]!==t&&(this.activeState[1]=t,this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST))},t.prototype.setCullFace=function(t){t=t?1:0,this.activeState[3]!==t&&(this.activeState[3]=t,this.gl[t?"enable":"disable"](this.gl.CULL_FACE))},t.prototype.setFrontFace=function(t){t=t?1:0,this.activeState[2]!==t&&(this.activeState[2]=t,this.gl.frontFace(this.gl[t?"CW":"CCW"]))},t.prototype.resetAttributes=function(){for(var t=0;t<this.attribState.tempAttribState.length;t++)this.attribState.tempAttribState[t]=0;for(var e=0;e<this.attribState.attribState.length;e++)this.attribState.attribState[e]=0;for(var r=1;r<this.maxAttribs;r++)this.gl.disableVertexAttribArray(r)},t.prototype.resetToDefault=function(){this.nativeVaoExtension&&this.nativeVaoExtension.bindVertexArrayOES(null),this.resetAttributes();for(var t=0;t<this.activeState.length;++t)this.activeState[t]=32;this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.setState(this.defaultState)},t}();r.default=n},{"./utils/mapWebGLBlendModesToPixi":96}],84:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),s=i(t("./extractUniformsFromSrc")),o=t("../../../utils"),a=t("../../../const"),h=i(t("../../../settings")),u={},l=function(){function t(e,r,i){for(var n in function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.vertexSrc=e||t.defaultVertexSrc,this.fragmentSrc=r||t.defaultFragmentSrc,this._blendMode=a.BLEND_MODES.NORMAL,this.uniformData=i||(0,s.default)(this.vertexSrc,this.fragmentSrc,"projectionMatrix|uSampler"),this.uniforms={},this.uniformData)this.uniforms[n]=this.uniformData[n].value,this.uniformData[n].type&&(this.uniformData[n].type=this.uniformData[n].type.toLowerCase());this.glShaders={},u[this.vertexSrc+this.fragmentSrc]||(u[this.vertexSrc+this.fragmentSrc]=(0,o.uid)()),this.glShaderKey=u[this.vertexSrc+this.fragmentSrc],this.padding=4,this.resolution=h.default.RESOLUTION,this.enabled=!0,this.autoFit=!0}return t.prototype.apply=function(t,e,r,i,n){t.applyFilter(this,e,r,i)},n(t,[{key:"blendMode",get:function(){return this._blendMode},set:function(t){this._blendMode=t}}],[{key:"defaultVertexSrc",get:function(){return["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","uniform mat3 projectionMatrix;","uniform mat3 filterMatrix;","varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","void main(void){"," gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0
1)).xy, 0.0, 1.0);"," vFilterCoord = ( filterMatrix * vec3( aTextureCoord, 1.0) ).xy;"," vTextureCoord = aTextureCoord ;","}"].join("\n")}},{key:"defaultFragmentSrc",get:function(){return["varying vec2 vTextureCoord;","varying vec2 vFilterCoord;","uniform sampler2D uSampler;","uniform sampler2D filterSampler;","void main(void){"," vec4 masky = texture2D(filterSampler, vFilterCoord);"," vec4 sample = texture2D(uSampler, vTextureCoord);"," vec4 color;"," if(mod(vFilterCoord.x, 1.0) > 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}();r.default=l},{"../../../const":44,"../../../settings":99,"../../../utils":123,"./extractUniformsFromSrc":85}],85:[function(t,e,r){"use strict";function i(t){for(var e=new RegExp("^(projectionMatrix|uSampler|filterArea|filterClamp)$"),r={},i=void 0,s=t.replace(/\s+/g," ").split(/\s*;\s*/),o=0;o<s.length;o++){var a=s[o].trim();if(a.indexOf("uniform")>-1){var h=a.split(" "),u=h[1],l=h[2],c=1;l.indexOf("[")>-1&&(i=l.split(/\[|]/),l=i[0],c*=Number(i[1])),l.match(e)||(r[l]={value:n(u,c),name:l,type:u})}}return r}r.__esModule=!0,r.default=function(t,e,r){var n=i(t),s=i(e);return Object.assign(n,s)};var n=function(t){return t&&t.__esModule?t:{default:t}}(t("pixi-gl-core")).default.shader.defaultValue},{"pixi-gl-core":16}],86:[function(t,e,r){"use strict";r.__esModule=!0,r.calculateScreenSpaceMatrix=function(t,e,r){var i=t.identity();return i.translate(e.x/r.width,e.y/r.height),i.scale(r.width,r.height),i},r.calculateNormalizedScreenSpaceMatrix=function(t,e,r){var i=t.identity();i.translate(e.x/r.width,e.y/r.height);var n=r.width/e.width,s=r.height/e.height;return i.scale(n,s),i},r.calculateSpriteMatrix=function(t,e,r,n){var s=n._texture.orig,o=t.set(r.width,0,0,r.height,e.x,e.y),a=n.worldTransform.copy(i.Matrix.TEMP_MATRIX);return a.invert(),o.prepend(a),o.scale(1/s.width,1/s.height),o.translate(n.anchor.x,n.anchor.y),o};var i=t("../../../math")},{"../../../math":68}],87:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=i(t("../Filter")),s=t("../../../../math"),o=i((t("path"),t("../../../../textures/TextureMatrix"))),a=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=new s.Matrix,n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(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
1)).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 sampler2D mask;\nuniform float alpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n float clip = step(3.5,\n step(maskClamp.x, vMaskCoord.x) +\n step(maskClamp.y, vMaskCoord.y) +\n step(vMaskCoord.x, maskClamp.z) +\n step(vMaskCoord.y, maskClamp.w));\n\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 r.renderable=!1,n.maskSprite=r,n.maskMatrix=i,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.apply=function(t,e,r){var i=this.maskSprite,n=this.maskSprite.texture;n.valid&&(n.transform||(n.transform=new o.default(n,0)),n.transform.update(),this.uniforms.mask=n,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,i).prepend(n.transform.mapCoord),this.uniforms.alpha=i.worldAlpha,this.uniforms.maskClamp=n.transform.uClampFrame,t.applyFilter(this,e,r))},e}(n.default);r.default=a},{"../../../../math":68,"../../../../textures/TextureMatrix":114,"../Filter":84,path:9}],88:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.__esModule=!0;var s=i(t("./WebGLManager")),o=i(t("../utils/RenderTarget")),a=i(t("../utils/Quad")),u=t("../../../math"),l=i(t("../../../Shader")),c=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../filters/filterTransforms")),d=i(t("bit-twiddle")),f=function t(){n(this,t),this.renderTarget=null,this.sourceFrame=new u.Rectangle,this.destinationFrame=new u.Rectangle,this.filters=[],this.target=null,this.resolution=1},p=function(t){function e(r){n(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this,r));return i.gl=i.renderer.gl,i.quad=new a.default(i.gl,r.state.attribState),i.shaderCache={},i.pool={},i.filterData=null,i.managedFilters=[],i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.pushFilter=function(t,e){var r=this.renderer,i=this.filterData;if(!i){i=this.renderer._activeRenderTarget.filterStack;var n=new f;n.sourceFrame=n.destinationFrame=this.renderer._activeRenderTarget.size,n.renderTarget=r._activeRenderTarget,this.renderer._activeRenderTarget.filterData=i={index:0,stack:[n]},this.filterData=i}var s=i.stack[++i.index];s||(s=i.stack[i.index]=new f);var o=e[0].resolution,a=0|e[0].padding,h=t.filterArea||t.getBounds(!0),u=s.sourceFrame,l=s.destinationFrame;u.x=(h.x*o|0)/o,u.y=(h.y*o|0)/o,u.width=(h.width*o|0)/o,u.height=(h.height*o|0)/o,i.stack[0].renderTarget.transform||e[0].autoFit&&u.fit(i.stack[0].destinationFrame),u.pad(a),l.width=u.width,l.height=u.height;var c=this.getPotRenderTarget(r.gl,u.width,u.height,o);s.target=t,s.filters=e,s.resolution=o,s.renderTarget=c,c.setFrame(l,u),r.bindRenderTarget(c),c.clear()},e.prototype.popFilter=function(){var t=this.filterData,e=t.stack[t.index-1],r=t.stack[t.index];this.quad.map(r.renderTarget.size,r.sourceFrame).upload();var i=r.filters;if(1===i.length)i[0].apply(this,r.renderTarget,e.renderTarget,!1,r),this.freePotRenderTarget(r.renderTarget);else{var n=r.renderTarget,s=this.getPotRenderTarget(this.renderer.gl,r.sourceFrame.width,r.sourceFrame.height,r.resolution);
1s.setFrame(r.destinationFrame,r.sourceFrame),s.clear();var o=0;for(o=0;o<i.length-1;++o){i[o].apply(this,n,s,!0,r);var a=n;n=s,s=a}i[o].apply(this,n,e.renderTarget,!1,r),this.freePotRenderTarget(n),this.freePotRenderTarget(s)}0==--t.index&&(this.filterData=null)},e.prototype.applyFilter=function(t,e,r,i){var n=this.renderer,s=n.gl,o=t.glShaders[n.CONTEXT_UID];o||(t.glShaderKey?(o=this.shaderCache[t.glShaderKey])||(o=new l.default(this.gl,t.vertexSrc,t.fragmentSrc),t.glShaders[n.CONTEXT_UID]=this.shaderCache[t.glShaderKey]=o,this.managedFilters.push(t)):(o=t.glShaders[n.CONTEXT_UID]=new l.default(this.gl,t.vertexSrc,t.fragmentSrc),this.managedFilters.push(t)),n.bindVao(null),this.quad.initVao(o)),n.bindVao(this.quad.vao),n.bindRenderTarget(r),i&&(s.disable(s.SCISSOR_TEST),n.clear(),s.enable(s.SCISSOR_TEST)),r===n.maskManager.scissorRenderTarget&&n.maskManager.pushScissorMask(null,n.maskManager.scissorData),n.bindShader(o);var a=this.renderer.emptyTextures[0];this.renderer.boundTextures[0]=a,this.syncUniforms(o,t),n.state.setBlendMode(t.blendMode),s.activeTexture(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,e.texture.texture),this.quad.vao.draw(this.renderer.gl.TRIANGLES,6,0),s.bindTexture(s.TEXTURE_2D,a._glTextures[this.renderer.CONTEXT_UID].texture)},e.prototype.syncUniforms=function(t,e){var r=e.uniformData,i=e.uniforms,n=1,s=void 0;if(t.uniforms.filterArea){s=this.filterData.stack[this.filterData.index];var o=t.uniforms.filterArea;o[0]=s.renderTarget.size.width,o[1]=s.renderTarget.size.height,o[2]=s.sourceFrame.x,o[3]=s.sourceFrame.y,t.uniforms.filterArea=o}if(t.uniforms.filterClamp){s=s||this.filterData.stack[this.filterData.index];var a=t.uniforms.filterClamp;a[0]=0,a[1]=0,a[2]=(s.sourceFrame.width-1)/s.renderTarget.size.width,a[3]=(s.sourceFrame.height-1)/s.renderTarget.size.height,t.uniforms.filterClamp=a}for(var h in r){var u=r[h].type;if("sampler2d"===u&&0!==i[h]){if(i[h].baseTexture)t.uniforms[h]=this.renderer.bindTexture(i[h].baseTexture,n);else{t.uniforms[h]=n;var l=this.renderer.gl;this.renderer.boundTextures[n]=this.renderer.emptyTextures[n],l.activeTexture(l.TEXTURE0+n),i[h].texture.bind()}n++}else if("mat3"===u)void 0!==i[h].a?t.uniforms[h]=i[h].toArray(!0):t.uniforms[h]=i[h];else if("vec2"===u)if(void 0!==i[h].x){var c=t.uniforms[h]||new Float32Array(2);c[0]=i[h].x,c[1]=i[h].y,t.uniforms[h]=c}else t.uniforms[h]=i[h];else"float"===u?t.uniforms.data[h].value!==r[h]&&(t.uniforms[h]=i[h]):t.uniforms[h]=i[h]}},e.prototype.getRenderTarget=function(t,e){var r=this.filterData.stack[this.filterData.index],i=this.getPotRenderTarget(this.renderer.gl,r.sourceFrame.width,r.sourceFrame.height,e||r.resolution);return i.setFrame(r.destinationFrame,r.sourceFrame),i},e.prototype.returnRenderTarget=function(t){this.freePotRenderTarget(t)},e.prototype.calculateScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return c.calculateScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size)},e.prototype.calculateNormalizedScreenSpaceMatrix=function(t){var e=this.filterData.stack[this.filterData.index];return c.calculateNormalizedScreenSpaceMatrix(t,e.sourceFrame,e.renderTarget.size,e.destinationFrame)},e.prototype.calculateSpriteMatrix=function(t,e){var r=this.filterData.stack[this.filterData.index];return c.calculateSpriteMatrix(t,r.sourceFrame,r.renderTarget.size,e)},e.prototype.destroy=function(){for(var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.renderer,r=this.managedFilters,i=0;i<r.length;i++)t||r[i].glShaders[e.CONTEXT_UID].destroy(),delete r[i].glShaders[e.CONTEXT_UID];this.shaderCache={},t?this.pool={}:this.emptyPool()},e.prototype.getPotRenderTarget=function(t,e,r,i){var n=(65535&(e=d.default.nextPow2(e*i)))<<16|65535&(r=d.default.nextPow2(r*i));this.pool[n]||(this.pool[n]=[]);var s=this.pool[n].pop();if(!s){var a=this.renderer.boundTextures[0];t.activeTexture(t.TEXTURE0),s=new o.default(t,e,r,null,1),t.bindTexture(t.TEXTURE_2D,a._glTextures[this.renderer.CONTEXT_UID].texture)}return s.resolution=i,s.defaultFrame.width=s.size.width=e/i,s.defaultFrame.height=s.size.height=r/i,s},e.prototype.emptyPool=function(){for(var t in this.pool){var e=this.pool[t];if(e)for(var r=0;r<e.length;r++)e[r].destroy(!0)}this.pool={}},e.prototype.freePotRenderTarget=function(t){var e=(65535&t.size.width*t.resolution)<<16|65535&t.size.height*t.resolution;this.pool[e].push(t)},e}(s.default);r.default=p},{"../../../Shader":42,"../../../math":68,"../filters/filterTransforms":86,"../utils/Quad":93,"../utils/
1RenderTarget":94,"./WebGLManager":91,"bit-twiddle":1}],89:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=i(t("./WebGLManager")),s=i(t("../filters/spriteMask/SpriteMaskFilter")),o=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this,r));return i.scissor=!1,i.scissorData=null,i.scissorRenderTarget=null,i.enableScissor=!0,i.alphaMaskPool=[],i.alphaMaskIndex=0,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.pushMask=function(t,e){if(e.texture)this.pushSpriteMask(t,e);else if(this.enableScissor&&!this.scissor&&this.renderer._activeRenderTarget.root&&!this.renderer.stencilManager.stencilMaskStack.length&&e.isFastRect()){var r=e.worldTransform,i=Math.atan2(r.b,r.a);(i=Math.round(i*(180/Math.PI)))%90?this.pushStencilMask(e):this.pushScissorMask(t,e)}else this.pushStencilMask(e)},e.prototype.popMask=function(t,e){e.texture?this.popSpriteMask(t,e):this.enableScissor&&!this.renderer.stencilManager.stencilMaskStack.length?this.popScissorMask(t,e):this.popStencilMask(t,e)},e.prototype.pushSpriteMask=function(t,e){var r=this.alphaMaskPool[this.alphaMaskIndex];r||(r=this.alphaMaskPool[this.alphaMaskIndex]=[new s.default(e)]),r[0].resolution=this.renderer.resolution,r[0].maskSprite=e,t.filterArea=e.getBounds(!0),this.renderer.filterManager.pushFilter(t,r),this.alphaMaskIndex++},e.prototype.popSpriteMask=function(){this.renderer.filterManager.popFilter(),this.alphaMaskIndex--},e.prototype.pushStencilMask=function(t){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.pushStencil(t)},e.prototype.popStencilMask=function(){this.renderer.currentRenderer.stop(),this.renderer.stencilManager.popStencil()},e.prototype.pushScissorMask=function(t,e){e.renderable=!0;var r=this.renderer._activeRenderTarget,i=e.getBounds();i.fit(r.size),e.renderable=!1,this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST);var n=this.renderer.resolution;this.renderer.gl.scissor(i.x*n,(r.root?r.size.height-i.y-i.height:i.y)*n,i.width*n,i.height*n),this.scissorRenderTarget=r,this.scissorData=e,this.scissor=!0},e.prototype.popScissorMask=function(){this.scissorRenderTarget=null,this.scissorData=null,this.scissor=!1;var t=this.renderer.gl;t.disable(t.SCISSOR_TEST)},e}(n.default);r.default=o},{"../filters/spriteMask/SpriteMaskFilter":87,"./WebGLManager":91}],90:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t){return t&&t.__esModule?t:{default:t}}(t("./WebGLManager")),n=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this,r));return i.stencilMaskStack=null,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.setMaskStack=function(t){this.stencilMaskStack=t;var e=this.renderer.gl;0===t.length?e.disable(e.STENCIL_TEST):e.enable(e.STENCIL_TEST)},e.prototype.pushStencil=function(t){this.renderer.setObjectRenderer(this.renderer.plugins.graphics),this.renderer._activeRenderTarget.attachStencilBuffer();var e=this.renderer.gl,r=this.stencilMaskStack.length;0===r&&e.enable(e.STENCIL_TEST),this.stencilMaskStack.push(t),e.colorMask(!1,!1,!1,!1),e.stencilFunc(e.EQUAL,r,this._getBitwiseMask()),e.stencilOp(e.KEEP,e.KEEP,e.INCR),this.renderer.plugins.graphics.render(t),this._useCurrent()},e.prototype.popStencil=function(){this.renderer.setObjectRenderer(this.renderer.plugins.graphics);var t=this.renderer.gl,e=this.stencilMaskStack.pop();0===this.stencilMaskStack.length?(t.disable(t.STENCIL_TEST),t.clear(t.STENCIL_BUFFER_BIT),t.clearStencil(0)):(t.colorMask(!1,!1,!1,!1),t.stencilOp(t.KEEP,t.KEEP,t.DECR),this.renderer.plugins.graphics.render(e),this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;
1t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.stencilMaskStack.length,this._getBitwiseMask()),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e.prototype._getBitwiseMask=function(){return(1<<this.stencilMaskStack.length)-1},e.prototype.destroy=function(){i.default.prototype.destroy.call(this),this.stencilMaskStack.stencilStack=null},e}(i.default);r.default=n},{"./WebGLManager":91}],91:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.renderer=e,this.renderer.on("context",this.onContextChange,this)}return t.prototype.onContextChange=function(){},t.prototype.destroy=function(){this.renderer.off("context",this.onContextChange,this),this.renderer=null},t}();r.default=i},{}],92:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.start=function(){},e.prototype.stop=function(){this.flush()},e.prototype.flush=function(){},e.prototype.render=function(t){},e}(function(t){return t&&t.__esModule?t:{default:t}}(t("../managers/WebGLManager")).default);r.default=i},{"../managers/WebGLManager":91}],93:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=i(t("pixi-gl-core")),s=i(t("../../../utils/createIndicesForQuads")),o=function(){function t(e,r){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.gl=e,this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.interleaved=new Float32Array(16);for(var i=0;i<4;i++)this.interleaved[4*i]=this.vertices[2*i],this.interleaved[4*i+1]=this.vertices[2*i+1],this.interleaved[4*i+2]=this.uvs[2*i],this.interleaved[4*i+3]=this.uvs[2*i+1];this.indices=(0,s.default)(1),this.vertexBuffer=n.default.GLBuffer.createVertexBuffer(e,this.interleaved,e.STATIC_DRAW),this.indexBuffer=n.default.GLBuffer.createIndexBuffer(e,this.indices,e.STATIC_DRAW),this.vao=new n.default.VertexArrayObject(e,r)}return t.prototype.initVao=function(t){this.vao.clear().addIndex(this.indexBuffer).addAttribute(this.vertexBuffer,t.attributes.aVertexPosition,this.gl.FLOAT,!1,16,0).addAttribute(this.vertexBuffer,t.attributes.aTextureCoord,this.gl.FLOAT,!1,16,8)},t.prototype.map=function(t,e){var r=0,i=0;return this.uvs[0]=r,this.uvs[1]=i,this.uvs[2]=r+e.width/t.width,this.uvs[3]=i,this.uvs[4]=r+e.width/t.width,this.uvs[5]=i+e.height/t.height,this.uvs[6]=r,this.uvs[7]=i+e.height/t.height,r=e.x,i=e.y,this.vertices[0]=r,this.vertices[1]=i,this.vertices[2]=r+e.width,this.vertices[3]=i,this.vertices[4]=r+e.width,this.vertices[5]=i+e.height,this.vertices[6]=r,this.vertices[7]=i+e.height,this},t.prototype.upload=function(){for(var t=0;t<4;t++)this.interleaved[4*t]=this.vertices[2*t],this.interleaved[4*t+1]=this.vertices[2*t+1],this.interleaved[4*t+2]=this.uvs[2*t],this.interleaved[4*t+3]=this.uvs[2*t+1];return this.vertexBuffer.upload(this.interleaved),this},t.prototype.destroy=function(){var t=this.gl;t.deleteBuffer(this.vertexBuffer),t.deleteBuffer(this.indexBuffer)},t}();r.default=o},{"../../../utils/createIndicesForQuads":121,"pixi-gl-core":16}],94:[function(t,e,r){"use strict";r.__esModule=!0;var i=t("../../../math"),n=t("../../../const"),s=function(t){return t&&t.__esModule?t:{default:t}}(t("../../../settings")),o=t("pixi-gl-core"),a=function(){function t(e,r,a,h,u,l){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.gl=e,this.frameBuffer=null,this.texture=null,this.clearColor=[0,0,0,0],this.size=new i.Rectangle(0,0,1,1),this.resolution=u||s.default.RESOLUTION,this.projectionMatrix=new i.Matrix,this.transform=null,this.frame=null,this.defaultFrame=new i.Rectangle,this.destinationFrame=null,this.sourceFrame=null,this.stencilBuffer=null,this.stencilMaskStack=[],this.filterData=null,this.scaleMode=void 0!==h?h:s.default.SCALE_MODE,this.root=l,this.root?(this.frameBuffer=new o.GLFramebuffer(e,100,100),this.frameBuffer.framebuffer=null):(this.frameBuffer=o.GLFramebuffer.createRGBA(e,100,100),this.scaleMode===n.SCALE_MODES.NEAREST?this.frameBuffer.texture.enableNearestScaling():this.frameBuffer.texture.enableLinearScaling(),this.texture=this.frameBuffer.texture),this.setFrame
1(),this.resize(r,a)}return t.prototype.clear=function(t){var e=t||this.clearColor;this.frameBuffer.clear(e[0],e[1],e[2],e[3])},t.prototype.attachStencilBuffer=function(){this.root||this.frameBuffer.enableStencil()},t.prototype.setFrame=function(t,e){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=e||this.sourceFrame||this.destinationFrame},t.prototype.activate=function(){var t=this.gl;this.frameBuffer.bind(),this.calculateProjection(this.destinationFrame,this.sourceFrame),this.transform&&this.projectionMatrix.append(this.transform),this.destinationFrame!==this.sourceFrame?(t.enable(t.SCISSOR_TEST),t.scissor(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)):t.disable(t.SCISSOR_TEST),t.viewport(0|this.destinationFrame.x,0|this.destinationFrame.y,this.destinationFrame.width*this.resolution|0,this.destinationFrame.height*this.resolution|0)},t.prototype.calculateProjection=function(t,e){var r=this.projectionMatrix;e=e||t,r.identity(),this.root?(r.a=1/t.width*2,r.d=-1/t.height*2,r.tx=-1-e.x*r.a,r.ty=1-e.y*r.d):(r.a=1/t.width*2,r.d=1/t.height*2,r.tx=-1-e.x*r.a,r.ty=-1-e.y*r.d)},t.prototype.resize=function(t,e){if(t|=0,e|=0,this.size.width!==t||this.size.height!==e){this.size.width=t,this.size.height=e,this.defaultFrame.width=t,this.defaultFrame.height=e,this.frameBuffer.resize(t*this.resolution,e*this.resolution);var r=this.frame||this.size;this.calculateProjection(r)}},t.prototype.destroy=function(){this.frameBuffer.destroy(),this.frameBuffer=null,this.texture=null},t}();r.default=a},{"../../../const":44,"../../../math":68,"../../../settings":99,"pixi-gl-core":16}],95:[function(t,e,r){"use strict";function i(t){for(var e="",r=0;r<t;++r)r>0&&(e+="\nelse "),r<t-1&&(e+="if(test == "+r+".0){}");return e}r.__esModule=!0,r.default=function(t,e){var r=!e;if(r){var o=document.createElement("canvas");o.width=1,o.height=1,e=n.default.createContext(o)}for(var a=e.createShader(e.FRAGMENT_SHADER);;){var h=s.replace(/%forloop%/gi,i(t));if(e.shaderSource(a,h),e.compileShader(a),e.getShaderParameter(a,e.COMPILE_STATUS))break;t=t/2|0}return r&&e.getExtension("WEBGL_lose_context")&&e.getExtension("WEBGL_lose_context").loseContext(),t};var n=function(t){return t&&t.__esModule?t:{default:t}}(t("pixi-gl-core")),s=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n")},{"pixi-gl-core":16}],96:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){var e=arguments.length>1&&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[i.BLEND_MODES.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[i.BLEND_MODES.ADD_NPM]=[t.SRC_ALPHA,t.DST_ALPHA,t.ONE,t.DST_ALPHA],e[i.BLEND_MODES.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_COLOR],e};var i=t("../../../const")},{"../../../const":44}],97:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(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};var i=t("../../../const")},{"../../../const":44}],98:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")}},{}],99:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}
1r.__esModule=!0;var n=i(t("./utils/maxRecommendedTextures")),s=i(t("./utils/canUploadSameBuffer"));r.default={TARGET_FPMS:.06,MIPMAP_TEXTURES:!0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:(0,n.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)(),MESH_CANVAS_PADDING:0}},{"./utils/canUploadSameBuffer":120,"./utils/maxRecommendedTextures":125}],100:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),s=t("../math"),o=t("../utils"),a=t("../const"),u=i(t("../textures/Texture")),l=i(t("../display/Container")),c=new s.Point,d=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this));return i._anchor=new s.ObservablePoint(i._onAnchorUpdate,i),i._texture=null,i._width=0,i._height=0,i._tint=null,i._tintRGB=null,i.tint=16777215,i.blendMode=a.BLEND_MODES.NORMAL,i.shader=null,i.cachedTint=16777215,i.texture=r||u.default.EMPTY,i.vertexData=new Float32Array(8),i.vertexTrimmedData=null,i._transformID=-1,i._textureID=-1,i._transformTrimmedID=-1,i._textureTrimmedID=-1,i.pluginName="sprite",i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this.cachedTint=16777215,this._width&&(this.scale.x=(0,o.sign)(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=(0,o.sign)(this.scale.y)*this._height/this._texture.orig.height)},e.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},e.prototype.calculateVertices=function(){if(this._transformID!==this.transform._worldID||this._textureID!==this._texture._updateID){this._transformID=this.transform._worldID,this._textureID=this._texture._updateID;var t=this._texture,e=this.transform.worldTransform,r=e.a,i=e.b,n=e.c,s=e.d,o=e.tx,a=e.ty,h=this.vertexData,u=t.trim,l=t.orig,c=this._anchor,d=0,f=0,p=0,g=0;u?(d=(f=u.x-c._x*l.width)+u.width,p=(g=u.y-c._y*l.height)+u.height):(d=(f=-c._x*l.width)+l.width,p=(g=-c._y*l.height)+l.height),h[0]=r*f+n*g+o,h[1]=s*g+i*f+a,h[2]=r*d+n*g+o,h[3]=s*g+i*d+a,h[4]=r*d+n*p+o,h[5]=s*p+i*d+a,h[6]=r*f+n*p+o,h[7]=s*p+i*f+a}},e.prototype.calculateTrimmedVertices=function(){if(this.vertexTrimmedData){if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var t=this._texture,e=this.vertexTrimmedData,r=t.orig,i=this._anchor,n=this.transform.worldTransform,s=n.a,o=n.b,a=n.c,h=n.d,u=n.tx,l=n.ty,c=-i._x*r.width,d=c+r.width,f=-i._y*r.height,p=f+r.height;e[0]=s*c+a*f+u,e[1]=h*f+o*c+l,e[2]=s*d+a*f+u,e[3]=h*f+o*d+l,e[4]=s*d+a*p+u,e[5]=h*p+o*d+l,e[6]=s*c+a*p+u,e[7]=h*p+o*c+l},e.prototype._renderWebGL=function(t){this.calculateVertices(),t.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._renderCanvas=function(t){t.plugins[this.pluginName].render(this)},e.prototype._calculateBounds=function(){var t=this._texture.trim,e=this._texture.orig;!t||t.width===e.width&&t.height===e.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._texture.orig.width*-this._anchor._x,this._bounds.minY=this._texture.orig.height*-this._anchor._y,this._bounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._bounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new s.Rectangle),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,c);var e=this._texture.orig.width,r=this._texture.orig.height,i=-e*this.anchor.x,n=0;return c.x>=i&&c.x<i+e&&(n=-r*this.anchor.y,c.y>=n&&c.y<n+r)},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._anchor=null,"boolean"==typeof e?e:e&&e.texture){var r="boolean"==typeof e?e:e&&e.baseTexture;this._texture.destroy(!!r)}
1this._texture=null,this.shader=null},e.from=function(t){return new e(u.default.from(t))},e.fromFrame=function(t){var r=o.TextureCache[t];if(!r)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return new e(r)},e.fromImage=function(t,r,i){return new e(u.default.fromImage(t,r,i))},n(e,[{key:"width",get:function(){return Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){var e=(0,o.sign)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t}},{key:"height",get:function(){return Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){var e=(0,o.sign)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t}},{key:"anchor",get:function(){return this._anchor},set:function(t){this._anchor.copy(t)}},{key:"tint",get:function(){return this._tint},set:function(t){this._tint=t,this._tintRGB=(t>>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}(l.default);r.default=d},{"../const":44,"../display/Container":46,"../math":68,"../textures/Texture":113,"../utils":123}],101:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=i(t("../../renderers/canvas/CanvasRenderer")),s=t("../../const"),o=t("../../math"),a=i(t("./CanvasTinter")),h=new o.Matrix,u=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.renderer=e}return t.prototype.render=function(t){var e=t._texture,r=this.renderer,i=e._frame.width,n=e._frame.height,u=t.transform.worldTransform,l=0,c=0;if(!(e.orig.width<=0||e.orig.height<=0)&&e.baseTexture.source&&(r.setBlendMode(t.blendMode),e.valid)){r.context.globalAlpha=t.worldAlpha;var d=e.baseTexture.scaleMode===s.SCALE_MODES.LINEAR;r.smoothProperty&&r.context[r.smoothProperty]!==d&&(r.context[r.smoothProperty]=d),e.trim?(l=e.trim.width/2+e.trim.x-t.anchor.x*e.orig.width,c=e.trim.height/2+e.trim.y-t.anchor.y*e.orig.height):(l=(.5-t.anchor.x)*e.orig.width,c=(.5-t.anchor.y)*e.orig.height),e.rotate&&(u.copy(h),u=h,o.GroupD8.matrixAppendRotationInv(u,e.rotate,l,c),l=0,c=0),l-=i/2,c-=n/2,r.roundPixels?(r.context.setTransform(u.a,u.b,u.c,u.d,u.tx*r.resolution|0,u.ty*r.resolution|0),l|=0,c|=0):r.context.setTransform(u.a,u.b,u.c,u.d,u.tx*r.resolution,u.ty*r.resolution);var f=e.baseTexture.resolution;16777215!==t.tint?(t.cachedTint===t.tint&&t.tintedTexture.tintId===t._texture._updateID||(t.cachedTint=t.tint,t.tintedTexture=a.default.getTintedTexture(t,t.tint)),r.context.drawImage(t.tintedTexture,0,0,i*f,n*f,l*r.resolution,c*r.resolution,i*r.resolution,n*r.resolution)):r.context.drawImage(e.baseTexture.source,e._frame.x*f,e._frame.y*f,i*f,n*f,l*r.resolution,c*r.resolution,i*r.resolution,n*r.resolution)}},t.prototype.destroy=function(){this.renderer=null},t}();r.default=u,n.default.registerPlugin("sprite",u)},{"../../const":44,"../../math":68,"../../renderers/canvas/CanvasRenderer":75,"./CanvasTinter":102}],102:[function(t,e,r){"use strict";r.__esModule=!0;var i=t("../../utils"),n={getTintedTexture:function(t,e){var r=t._texture,i="#"+("00000"+(0|(e=n.roundColor(e))).toString(16)).substr(-6);r.tintCache=r.tintCache||{};var s=r.tintCache[i],o=void 0;if(s){if(s.tintId===r._updateID)return r.tintCache[i];o=r.tintCache[i]}else o=n.canvas||document.createElement("canvas");if(n.tintMethod(r,e,o),o.tintId=r._updateID,n.convertTintToImage){var a=new Image;a.src=o.toDataURL(),r.tintCache[i]=a}else r.tintCache[i]=o,n.canvas=null;return o},tintWithMultiply:function(t,e,r){var i=r.getContext("2d"),n=t._frame.clone(),s=t.baseTexture.resolution;n.x*=s,n.y*=s,n.width*=s,n.height*=s,r.width=Math.ceil(n.width),r.height=Math.ceil(n.height),i.save(),i.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),i.fillRect(0,0,n.width,n.height),i.globalCompositeOperation="multiply",i.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.globalCompositeOperation="destination-atop",i.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.restore(
1)},tintWithOverlay:function(t,e,r){var i=r.getContext("2d"),n=t._frame.clone(),s=t.baseTexture.resolution;n.x*=s,n.y*=s,n.width*=s,n.height*=s,r.width=Math.ceil(n.width),r.height=Math.ceil(n.height),i.save(),i.globalCompositeOperation="copy",i.fillStyle="#"+("00000"+(0|e).toString(16)).substr(-6),i.fillRect(0,0,n.width,n.height),i.globalCompositeOperation="destination-atop",i.drawImage(t.baseTexture.source,n.x,n.y,n.width,n.height,0,0,n.width,n.height),i.restore()},tintWithPerPixel:function(t,e,r){var n=r.getContext("2d"),s=t._frame.clone(),o=t.baseTexture.resolution;s.x*=o,s.y*=o,s.width*=o,s.height*=o,r.width=Math.ceil(s.width),r.height=Math.ceil(s.height),n.save(),n.globalCompositeOperation="copy",n.drawImage(t.baseTexture.source,s.x,s.y,s.width,s.height,0,0,s.width,s.height),n.restore();for(var a=(0,i.hex2rgb)(e),h=a[0],u=a[1],l=a[2],c=n.getImageData(0,0,s.width,s.height),d=c.data,f=0;f<d.length;f+=4)d[f+0]*=h,d[f+1]*=u,d[f+2]*=l;n.putImageData(c,0,0)},roundColor:function(t){var e=n.cacheStepsPerColorChannel,r=(0,i.hex2rgb)(t);return r[0]=Math.min(255,r[0]/e*e),r[1]=Math.min(255,r[1]/e*e),r[2]=Math.min(255,r[2]/e*e),(0,i.rgb2hex)(r)}
1,cacheStepsPerColorChannel:8,convertTintToImage:!1,canUseMultiply:(0,function(t){return t&&t.__esModule?t:{default:t}}(t("../../renderers/canvas/utils/canUseNewCanvasBlendModes")).default)(),tintMethod:0};n.tintMethod=n.canUseMultiply?n.tintWithMultiply:n.tintWithPerPixel,r.default=n},{"../../renderers/canvas/utils/canUseNewCanvasBlendModes":78,"../../utils":123}],103:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.vertices=new ArrayBuffer(e),this.float32View=new Float32Array(this.vertices),this.uint32View=new Uint32Array(this.vertices)}return t.prototype.destroy=function(){this.vertices=null,this.positions=null,this.uvs=null,this.colors=null},t}();r.default=i},{}],104:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=i(t("../../renderers/webgl/utils/ObjectRenderer")),s=i(t("../../renderers/webgl/WebGLRenderer")),o=i(t("../../utils/createIndicesForQuads")),a=i(t("./generateMultiTextureShader")),u=i(t("../../renderers/webgl/utils/checkMaxIfStatmentsInShader")),l=i(t("./BatchBuffer")),c=i(t("../../settings")),d=t("../../utils"),f=i(t("pixi-gl-core")),p=i(t("bit-twiddle")),g=0,y=0,v=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this,r));i.vertSize=5,i.vertByteSize=4*i.vertSize,i.size=c.default.SPRITE_BATCH_SIZE,i.buffers=[];for(var n=1;n<=p.default.nextPow2(i.size);n*=2)i.buffers.push(new l.default(4*n*i.vertByteSize));i.indices=(0,o.default)(i.size),i.shader=null,i.currentIndex=0,i.groups=[];for(var s=0;s<i.size;s++)i.groups[s]={textures:[],textureCount:0,ids:[],size:0,start:0,blend:0};return i.sprites=[],i.vertexBuffers=[],i.vaos=[],i.vaoMax=2,i.vertexCount=0,i.renderer.on("prerender",i.onPrerender,i),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.renderer.legacy?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),c.default.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=(0,u.default)(this.MAX_TEXTURES,t)),this.shader=(0,a.default)(t,this.MAX_TEXTURES),this.indexBuffer=f.default.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW),this.renderer.bindVao(null);for(var e=this.shader.attributes,r=0;r<this.vaoMax;r++){var i=this.vertexBuffers[r]=f.default.GLBuffer.createVertexBuffer(t,null,t.STREAM_DRAW),n=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(i,e.aVertexPosition,t.FLOAT,!1,this.vertByteSize,0).addAttribute(i,e.aTextureCoord,t.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(i,e.aColor,t.UNSIGNED_BYTE,!0,this.vertByteSize,12);e.aTextureId&&n.addAttribute(i,e.aTextureId,t.FLOAT,!1,this.vertByteSize,16),this.vaos[r]=n}this.vao=this.vaos[0],this.currentBlendMode=99999,this.boundTextures=new Array(this.MAX_TEXTURES)},e.prototype.onPrerender=function(){this.vertexCount=0},e.prototype.render=function(t){this.currentIndex>=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,r=p.default.nextPow2(this.currentIndex),i=p.default.log2(r),n=this.buffers[i],s=this.sprites,o=this.groups,a=n.float32View,h=n.uint32View,u=this.boundTextures,l=this.renderer.boundTextures,v=this.renderer.textureGC.count,m=0,_=void 0,x=void 0,b=1,T=0,w=o[0],E=void 0,S=void 0,M=d.premultiplyBlendMode[s[0]._texture.baseTexture.premultipliedAlpha?1:0][s[0].blendMode];w.textureCount=0,w.start=0,w.blend=M,g++;var O=void 0;for(O=0;O<e;++O){var R=l[O];R._enabled!==g?(u[O]=R,R._virtalBoundId=O,R._enabled=g):u[O]=this.renderer.emptyTextures[O]}for(g++,O=0;O<this.currentIndex;++O){var C=s[O];_=C._texture.baseTexture;var A=d.premultiplyBlendMode[Number(_.premultipliedAlpha)][C.blendMode];if(M!==A&&(M=A,x=null,T=e,g++),x!==_&&(x=_,_._enabled!==g)){if(T===e&&(g++,w.size=O-w.start,T=0,(w=o[b++]).blend=M,w.textureCount=0,w.start=O),_.touched=v,-1===_._virtalBoundId)for(var P=0;P<e;++P){var D=(P+y)%e,I=u[D];if(I._enabled!==g){y++,I._virtalBoundId=-1,_._virtalBoundId=D,u[D]=_;break}}_._enabled=g,w.textureCount++,w.ids[T]=_._virtalBoundId,w.textures[T++]=_}if(E=C.vertexData,S=C._texture._uvs.uvsUint32,this.renderer.roundPixels){var L=this.renderer.resolution;a[m]=(E[0]*L|0)/L,a[m+1]=(E[1]*L|0)/L,a[m+5]=(E[2]*L|0)/L,a[m+6]=(E[3]*L|0)/L,a[m+10]=(E[4]*L|0)/L,a[m+11]=(E[5]*L|0)/L,a[m+15]=(E[6]*L|0)/L,a[m+16]=(E[7]*L|0)/L}else a[m]=E[0],a[m+1]=E[1],a[m+5]=E[2],a[m+6]=E[3],a[m+10]=E[4],a[m+11]=E[5],a[m+15]=E[6],a[m+16]=E[7];h[m+2]=S[0],h[m+7]=S[1],h[m+12]=S[2],h[m+17]=S[3];var k=Math.min(C.worldAlpha,1),N=k<1&&_.premultipliedAlpha?(0,d.premultiplyTint)(C._tintRGB,k):C._tintRGB+(255*k<<24);h[m+3]=h[m+8]=h[m+13]=h[m+18]=N,a[m+4]=a[m+9]=a[m+14]=a[m+19]=_._virtalBoundId,m+=20}if(w.size=O-w.start,c.default.CAN_UPLOAD_SAME_BUFFER)this.vertexBuffers[this.vertexCount].upload(n.vertices,0,!0);else{if(this.vaoMax<=this.vertexCount){this.vaoMax++;var B=this.shader.attributes,F=this.vertexBuffers[this.vertexCount]=f.default.GLBuffer.createVertexBuffer(t,null,t.STREAM_DRAW),U=this.renderer.createVao().addIndex(this.indexBuffer).addAttribute(F,B.aVertexPosition,t.FLOAT,!1,this.vertByteSize,0).addAttribute(F,B.aTextureCoord,t.UNSIGNED_SHORT,!0,this.vertByteSize,8).addAttribute(F,B.aColor,t.UNSIGNED_BYTE,!0,this.vertByteSize,12);B.aTextureId&&U.addAttribute(F,B.aTextureId,t.FLOAT,!1,this.vertByteSize,16),this.vaos[this.vertexCount]=U}this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].upload(n.vertices,0,!1),this.vertexCount++}for(O=0;O<e;++O)l[O]._virtalBoundId=-1;for(O=0;O<b;++O){for(var j=o[O],X=j.textureCount,G=0;G<X;G++)x=j.textures[G],l[j.ids[G]]!==x&&this.renderer.bindTexture(x,j.ids[G],!0),x._virtalBoundId=-1;this.renderer.state.setBlendMode(j.blend),t.drawElements(t.TRIANGLES,6*j.size,t.UNSIGNED_SHORT,6*j.start*2)}this.currentIndex=0}},e.prototype.start=function(){this.renderer.bindShader(this.shader),c.default.CAN_UPLOAD_SAME_BUFFER&&(this.renderer.bindVao(this.vaos[this.vertexCount]),this.vertexBuffers[this.vertexCount].bind())},e.prototype.stop=function(){this.flush()},e.prototype.destroy=function(){for(var e=0;e<this.vaoMax;e++)this.vertexBuffers[e]&&this.vertexBuffers[e].destroy(),this.vaos[e]&&this.vaos[e].destroy();this.indexBuffer&&this.indexBuffer.destroy(),this.renderer.off("prerender",this.onPrerender,this),t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.vertexBuffers=null,this.vaos=null,this.indexBuffer=null,this.indices=null,this.sprites=null;for(var r=0;r<this.buffers.length;++r)this.buffers[r].destroy()},e}(n.default);r.default=v,s.default.registerPlugin("sprite",v)},{"../../renderers/webgl/WebGLRenderer":82,"../../renderers/webgl/utils/ObjectRenderer":92,"../../renderers/webgl/utils/checkMaxIfStatmentsInShader":95,"../../settings":99,"../../utils":123,"../../utils/createIndicesForQuads":121,"./BatchBuffer":103,"./generateMultiTextureShader":105,"bit-twiddle":1,"pixi-gl-core":16}],105:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t,e){var r=n;r=(r=r.replace(/%count%/gi,e)).replace(/%forloop%/gi,function(t){var e="";e+="\n",e+="\n";for(var r=0;r<t;r++)r>0&&(e+="\nelse "),r<t-1&&(e+="if(textureId == "+r+".0)"),e+="\n{",e+="\n\tcolor = texture2D(uSamplers["+r+"], vTextureCoord);",e+="\n}";return e+="\n",e+="\n"}(e));for(var s=new i.default(t,"precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0
1)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vTextureId = aTextureId;\n vColor = aColor;\n}\n",r),o=[],a=0;a<e;a++)o[a]=a;return s.bind(),s.uniforms.uSamplers=o,s};var i=function(t){return t&&t.__esModule?t:{default:t}}(t("../../Shader")),n=(t("path"),["varying vec2 vTextureCoord;","varying vec4 vColor;","varying float vTextureId;","uniform sampler2D uSamplers[%count%];","void main(void){","vec4 color;","float textureId = floor(vTextureId+0.5);","%forloop%","gl_FragColor = color * vColor;","}"].join("\n"))},{"../../Shader":42,path:9}],106:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),s=i(t("../sprites/Sprite")),o=i(t("../textures/Texture")),a=t("../math"),u=t("../utils"),l=t("../const"),c=i(t("../settings")),d=i(t("./TextStyle")),f=i(t("./TextMetrics")),p=i(t("../utils/trimCanvas")),g={texture:!0,children:!1,baseTexture:!0},y=function(t){function e(r,i,n){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,e),(n=n||document.createElement("canvas")).width=3,n.height=3;var s=o.default.fromCanvas(n,c.default.SCALE_MODE,"text");s.orig=new a.Rectangle,s.trim=new a.Rectangle;var u=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this,s));return o.default.addToCache(u._texture,u._texture.baseTexture.textureCacheIds[0]),u.canvas=n,u.context=u.canvas.getContext("2d"),u.resolution=c.default.RESOLUTION,u._text=null,u._style=null,u._styleListener=null,u._font="",u.text=r,u.style=i,u.localStyleID=-1,u}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.updateText=function(t){var e=this._style;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),this.dirty||!t){this._font=this._style.toFontString();var r=this.context,i=f.default.measureText(this._text,this._style,this._style.wordWrap,this.canvas),n=i.width,s=i.height,o=i.lines,a=i.lineHeight,h=i.lineWidths,u=i.maxLineWidth,l=i.fontProperties;this.canvas.width=Math.ceil((n+2*e.padding)*this.resolution),this.canvas.height=Math.ceil((s+2*e.padding)*this.resolution),r.scale(this.resolution,this.resolution),r.clearRect(0,0,this.canvas.width,this.canvas.height),r.font=this._font,r.strokeStyle=e.stroke,r.lineWidth=e.strokeThickness,r.textBaseline=e.textBaseline,r.lineJoin=e.lineJoin,r.miterLimit=e.miterLimit;var c=void 0,d=void 0;if(e.dropShadow){r.fillStyle=e.dropShadowColor,r.globalAlpha=e.dropShadowAlpha,r.shadowBlur=e.dropShadowBlur,e.dropShadowBlur>0&&(r.shadowColor=e.dropShadowColor);for(var p=Math.cos(e.dropShadowAngle)*e.dropShadowDistance,g=Math.sin(e.dropShadowAngle)*e.dropShadowDistance,y=0;y<o.length;y++)c=e.strokeThickness/2,d=e.strokeThickness/2+y*a+l.ascent,"right"===e.align?c+=u-h[y]:"center"===e.align&&(c+=(u-h[y])/2),e.fill&&(this.drawLetterSpacing(o[y],c+p+e.padding,d+g+e.padding),e.stroke&&e.strokeThickness&&(r.strokeStyle=e.dropShadowColor,this.drawLetterSpacing(o[y],c+p+e.padding,d+g+e.padding,!0),r.strokeStyle=e.stroke))}r.shadowBlur=0,r.globalAlpha=1,r.fillStyle=this._generateFillStyle(e,o);for(var v=0;v<o.length;v++)c=e.strokeThickness/2,d=e.strokeThickness/2+v*a+l.ascent,"right"===e.align?c+=u-h[v]:"center"===e.align&&(c+=(u-h[v])/2),e.stroke&&e.strokeThickness&&this.drawLetterSpacing(o[v],c+e.padding,d+e.padding,!0),e.fill&&this.drawLetterSpacing(o[v],c+e.padding,d+e.padding);this.updateTexture()}},e.prototype.drawLetterSpacing=function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=this._style,s=n.letterSpacing;if(0!==s)for(var o=String.prototype.split.call(t,""),a=e,h=0,u="";h<t.length;)u=o[h++],i?this.context.strokeText(u,a,r):this.context.fillText(u,a,r),a+=this.context.measureText(u).width+s;else i?this.context.strokeText(t,e,r):this.context.fillText(t,e,r)},e.prototype.updateTexture=function(){var t=this.canvas;if(this._style.trim){var e=(0,p.default)(t);t.width=e.width,t.height=e.height,this.context.putImageData(e.data,0,0)}var r=this._texture,i=this._style,n=i.trim?0:i.padding,s=r.baseTexture;s.hasLoaded=!0,s.resolution=this.resolution,s.realWidth=t.width,s.realHeight=t.height,s.width=t.width/this.resolution,s.height=t.height/this.resolution,r.trim.width=r._frame.width=t.width/this.resolution,r.trim.height=r._frame.height=t.height/this.resolution,r.trim.x=-n,r.trim.y=-n,r.orig.width=r._frame.width-2*n,r.orig.height=r._frame.height-2*n,this._onTextureUpdate(),s.emit("update",s),this.dirty=!1},e.prototype.renderWebGL=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype.renderWebGL.call(this,e)},e.prototype._renderCanvas=function(e){this.resolution!==e.resolution&&(this.resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype._renderCanvas.call(this,e)},e.prototype.getLocalBounds=function(e){return this.updateText(!0),t.prototype.getLocalBounds.call(this,e)},e.prototype._calculateBounds=function(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)},e.prototype._onStyleChange=function(){this.dirty=!0},e.prototype._generateFillStyle=function(t,e){if(!Array.isArray(t.fill))return t.fill;if(navigator.isCocoonJS)return t.fill[0];var r=void 0,i=void 0,n=void 0,s=void 0,o=this.canvas.width/this.resolution,a=this.canvas.height/this.resolution,h=t.fill.slice(),u=t.fillGradientStops.slice();if(!u.length)for(var c=h.length+1,d=1;d<c;++d)u.push(d/c);if(h.unshift(t.fill[0]),u.unshift(0),h.push(t.fill[t.fill.length-1]),u.push(1),t.fillGradientType===l.TEXT_GRADIENT.LINEAR_VERTICAL){r=this.context.createLinearGradient(o/2,0,o/2,a),i=(h.length+1)*e.length,n=0;for(var f=0;f<e.length;f++){n+=1;for(var p=0;p<h.length;p++)s="number"==typeof u[p]?u[p]/e.length+f/e.length:n/i,r.addColorStop(s,h[p]),n++}}else{r=this.context.createLinearGradient(0,a/2,o,a/2),i=h.length+1,n=1;for(var g=0;g<h.length;g++)s="number"==typeof u[g]?u[g]:n/i,r.addColorStop(s,h[g]),n++}return r},e.prototype.destroy=function(e){"boolean"==typeof e&&(e={children:e}),e=Object.assign({},g,e),t.prototype.destroy.call(this,e),this.context=null,this.canvas=null,this._style=null},n(e,[{key:"width",get:function(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width}
1,set:function(t){this.updateText(!0);var e=(0,u.sign)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t}},{key:"height",get:function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){this.updateText(!0);var e=(0,u.sign)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t}},{key:"style",get:function(){return this._style},set:function(t){(t=t||{})instanceof d.default?this._style=t:this._style=new d.default(t),this.localStyleID=-1,this.dirty=!0}},{key:"text",get:function(){return this._text},set:function(t){t=String(""===t||null==t?" ":t),this._text!==t&&(this._text=t,this.dirty=!0)}}]),e}(s.default);r.default=y},{"../const":44,"../math":68,"../settings":99,"../sprites/Sprite":100,"../textures/Texture":113,"../utils":123,"../utils/trimCanvas":128,"./TextMetrics":107,"./TextStyle":108}],107:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(){function t(e,r,i,n,s,o,a,h,u){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.text=e,this.style=r,this.width=i,this.height=n,this.lines=s,this.lineWidths=o,this.lineHeight=a,this.maxLineWidth=h,this.fontProperties=u}return t.measureText=function(e,r,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t._canvas;i=i||r.wordWrap;var s=r.toFontString(),o=t.measureFont(s),a=n.getContext("2d");a.font=s;for(var h=i?t.wordWrap(e,r,n):e,u=h.split(/(?:\r\n|\r|\n)/),l=new Array(u.length),c=0,d=0;d<u.length;d++){var f=a.measureText(u[d]).width+(u[d].length-1)*r.letterSpacing;l[d]=f,c=Math.max(c,f)}var p=c+r.strokeThickness;r.dropShadow&&(p+=r.dropShadowDistance);var g=r.lineHeight||o.fontSize+r.strokeThickness,y=Math.max(g,o.fontSize+r.strokeThickness)+(u.length-1)*(g+r.leading);return r.dropShadow&&(y+=r.dropShadowDistance),new t(e,r,p,y,u,l,g+r.leading,c,o)},t.wordWrap=function(e,r){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t._canvas,n=i.getContext("2d"),s="",o=e.charAt(0),a=e.split("\n"),h=r.wordWrapWidth,u={},l=0;l<a.length;l++){for(var c=h,d=a[l].split(" "),f=0;f<d.length;f++){var p=n.measureText(d[f]).width;if(r.breakWords&&p>h)for(var g=d[f].split(""),y=0;y<g.length;y++){var v=g[y],m=u[v];void 0===m&&(m=n.measureText(v).width,u[v]=m),m>c?(s+="\n"+v,c=h-m):(0===y&&(f>0||" "===o)&&(s+=" "),s+=v,c-=m)}else{var _=p+n.measureText(" ").width;0===f||_>c?(f>0&&(s+="\n"),s+=d[f],c=h-p):(c-=_,s+=" "+d[f])}}l<a.length-1&&(s+="\n")}return s},t.measureFont=function(e){if(t._fonts[e])return t._fonts[e];var r={},i=t._canvas,n=t._context;n.font=e;var s=Math.ceil(n.measureText("|MÃq").width),o=Math.ceil(n.measureText("M").width),a=2*o;o=1.4*o|0,i.width=s,i.height=a,n.fillStyle="#f00",n.fillRect(0,0,s,a),n.font=e,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText("|MÃq",0,o);var h=n.getImageData(0,0,s,a).data,u=h.length,l=4*s,c=0,d=0,f=!1;for(c=0;c<o;++c){for(var p=0;p<l;p+=4)if(255!==h[d+p]){f=!0;break}if(f)break;d+=l}for(r.ascent=o-c,d=u-l,f=!1,c=a;c>o;--c){for(var g=0;g<l;g+=4)if(255!==h[d+g]){f=!0;break}if(f)break;d-=l}return r.descent=c-o,r.fontSize=r.ascent+r.descent,t._fonts[e]=r,r},t}();r.default=i;var n=document.createElement("canvas");n.width=n.height=10,i._canvas=n,i._context=n.getContext("2d"),i._fonts={}},{}],108:[function(t,e,r){"use strict";function i(t){return"number"==typeof t?(0,h.hex2string)(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function n(t){if(Array.isArray(t)){for(var e=0;e<t.length;++e)t[e]=i(t[e]);return t}return i(t)}function s(t,e,r){for(var i in r)Array.isArray(e[i])?t[i]=e[i].slice():t[i]=e[i]}r.__esModule=!0;var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),a=t("../const"),h=t("../utils"),u={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:a.TEXT_GRADIENT.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,wordWrap:!1,wordWrapWidth:100,leading:0},l=function(){function t(e){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.styleID=0,this.reset(),s(this,e,e)}return t.prototype.clone=function(){var e={};return s(e,this,u),new t(e)},t.prototype.reset=function(){s(this,u,u)},t.prototype.toFontString=function(){var t="number"==typeof this.fontSize?this.fontSize+"px":this.fontSize,e=this.fontFamily;Array.isArray(this.fontFamily)||(e=this.fontFamily.split(","));for(var r=e.length-1;r>=0;r--){var i=e[r].trim();/([\"\'])[^\'\"]+\1/.test(i)||(i='"'+i+'"'),e[r]=i}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},o(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}
1,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=n(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=n(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){(function(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0})(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:"leading",get:function(){return this._leading},set:function(t){this._leading!==t&&(this._leading=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=n(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}();r.default=l},{"../const":44,"../utils":123}],109:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=i(t("./BaseTexture")),s=i(t("../settings")),o=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,n=arguments[2],o=arguments[3];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this,null,n));return a.resolution=o||s.default.RESOLUTION,a.width=Math.ceil(r),a.height=Math.ceil(i),a.realWidth=a.width*a.resolution,a.realHeight=a.height*a.resolution,a.scaleMode=void 0!==n?n:s.default.SCALE_MODE,a.hasLoaded=!0,a._glRenderTargets={},a._canvasRenderTarget=null,a.valid=!1,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.resize=function(t,e){t=Math.ceil(t),e=Math.ceil(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
1("update",this))},e.prototype.destroy=function(){t.prototype.destroy.call(this,!0),this.renderer=null},e}(n.default);r.default=o},{"../settings":99,"./BaseTexture":110}],110:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=t("../utils"),s=i(t("../settings")),o=i(t("eventemitter3")),a=i(t("../utils/determineCrossOrigin")),u=i(t("bit-twiddle")),l=function(t){function e(r,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this));return a.uid=(0,n.uid)(),a.touched=0,a.resolution=o||s.default.RESOLUTION,a.width=100,a.height=100,a.realWidth=100,a.realHeight=100,a.scaleMode=void 0!==i?i:s.default.SCALE_MODE,a.hasLoaded=!1,a.isLoading=!1,a.source=null,a.origSource=null,a.imageType=null,a.sourceScale=1,a.premultipliedAlpha=!0,a.imageUrl=null,a.isPowerOfTwo=!1,a.mipmap=s.default.MIPMAP_TEXTURES,a.wrapMode=s.default.WRAP_MODE,a._glTextures={},a._enabled=0,a._virtalBoundId=-1,a._destroyed=!1,a.textureCacheIds=[],r&&a.loadSource(r),a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(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=u.default.isPow2(this.realWidth)&&u.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 r=!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(),r&&this.emit("loaded",this);else if(!t.getContext){this.isLoading=!0;var i=this;if(t.onload=function(){if(i._updateImageType(),t.onload=null,t.onerror=null,i.isLoading){if(i.isLoading=!1,i._sourceLoaded(),"svg"===i.imageType)return void i._loadSvgSource();i.emit("loaded",i)}},t.onerror=function(){t.onload=null,t.onerror=null,i.isLoading&&(i.isLoading=!1,i.emit("error",i))},t.complete&&t.src){if(t.onload=null,t.onerror=null,"svg"===i.imageType)return void i._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,n.decomposeDataUri)(this.imageUrl),e=void 0;if(t&&"image"===t.mediaType){var r=t.subType.split("+")[0];if(!(e=(0,n.getUrlFileExtension)("."+r)))throw new Error("Invalid image type in data URI.")}else(e=(0,n.getUrlFileExtension)(this.imageUrl))||(e="png");this.imageType=e}},e.prototype._loadSvgSource=function(){if("svg"===this.imageType){var t=(0,n.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 r=(0,n.getSvgSize)(t),i=r.width,s=r.height;if(!i||!s)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");this.realWidth=Math.round(i*this.sourceScale),this.realHeight=Math.round(s*this.sourceScale),this._updateDimensions();var o=document.createElement("canvas");o.width=this.realWidth,o.height=this.realHeight,o._pixiId="canvas_"+(0,n.uid)(),o.getContext("2d").drawImage(this.source,0,0,i,s,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
1("loaded",this)},e.prototype._sourceLoaded=function(){this.hasLoaded=!0,this.update()},e.prototype.destroy=function(){this.imageUrl&&(delete n.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,r,i,s){var o=n.BaseTextureCache[t];if(!o){var h=new Image;void 0===r&&0!==t.indexOf("data:")?h.crossOrigin=(0,a.default)(t):r&&(h.crossOrigin="string"==typeof r?r:"anonymous"),(o=new e(h,i)).imageUrl=t,s&&(o.sourceScale=s),o.resolution=(0,n.getResolutionOfUrl)(t),h.src=t,e.addToCache(o,t)}return o},e.fromCanvas=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas";t._pixiId||(t._pixiId=i+"_"+(0,n.uid)());var s=n.BaseTextureCache[t._pixiId];return s||(s=new e(t,r),e.addToCache(s,t._pixiId)),s},e.from=function(t,r,i){if("string"==typeof t)return e.fromImage(t,void 0,r,i);if(t instanceof HTMLImageElement){var s=t.src,o=n.BaseTextureCache[s];return o||((o=new e(t,r)).imageUrl=s,i&&(o.sourceScale=i),o.resolution=(0,n.getResolutionOfUrl)(s),e.addToCache(o,s)),o}return t instanceof HTMLCanvasElement?e.fromCanvas(t,r):t},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),n.BaseTextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=n.BaseTextureCache[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete n.BaseTextureCache[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i<t.textureCacheIds.length;++i)delete n.BaseTextureCache[t.textureCacheIds[i]];return t.textureCacheIds.length=0,t}return null},e}(o.default);r.default=l},{"../settings":99,"../utils":123,"../utils/determineCrossOrigin":122,"bit-twiddle":1,eventemitter3:4}],111:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=i(t("./BaseRenderTexture")),s=function(t){function e(r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var s=null;if(!(r instanceof n.default)){var o=arguments[1],a=arguments[2],u=arguments[3],l=arguments[4];console.warn("Please use RenderTexture.create("+o+", "+a+") instead of the ctor directly."),s=arguments[0],i=null,r=new n.default(o,a,u,l)}var c=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this,r,i));return c.legacyRenderer=s,c.valid=!0,c._updateUvs(),c}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.resize=function(t,e,r){t=Math.ceil(t),e=Math.ceil(e),this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,r||this.baseTexture.resize(t,e),this._updateUvs()},e.create=function(t,r,i,s){return new e(new n.default(t,r,i,s))},e}(i(t("./Texture")).default);r.default=s},{"./BaseRenderTexture":109,"./Texture":113}],112:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),n=t("../"),s=t("../utils"),o=function(){function t(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.baseTexture=e,this.textures={},this.data=r,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,r=(0,s.getResolutionOfUrl)(t,null);return null===r&&(r=void 0!==e?parseFloat(e):1),1!==r&&(this.baseTexture.resolution=r,this.baseTexture.update(
1)),r},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 r=e,i=t.BATCH_SIZE,s=this.baseTexture.sourceScale;r-e<i&&r<this._frameKeys.length;){var o=this._frameKeys[r],a=this._frames[o],h=a.frame;if(h){var u,l=null,c=!1!==a.trimmed&&a.sourceSize?a.sourceSize:a.frame,d=new n.Rectangle(0,0,Math.floor(c.w*s)/this.resolution,Math.floor(c.h*s)/this.resolution);u=a.rotated?new n.Rectangle(Math.floor(h.x*s)/this.resolution,Math.floor(h.y*s)/this.resolution,Math.floor(h.h*s)/this.resolution,Math.floor(h.w*s)/this.resolution):new n.Rectangle(Math.floor(h.x*s)/this.resolution,Math.floor(h.y*s)/this.resolution,Math.floor(h.w*s)/this.resolution,Math.floor(h.h*s)/this.resolution),!1!==a.trimmed&&a.spriteSourceSize&&(l=new n.Rectangle(Math.floor(a.spriteSourceSize.x*s)/this.resolution,Math.floor(a.spriteSourceSize.y*s)/this.resolution,Math.floor(h.w*s)/this.resolution,Math.floor(h.h*s)/this.resolution)),this.textures[o]=new n.Texture(this.baseTexture,u,d,l,a.rotated?2:0),n.Texture.addToCache(this.textures[o],o)}r++}},t.prototype._parseComplete=function(){var t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)},t.prototype._nextBatch=function(){var e=this;this._processFrames(this._batchIndex*t.BATCH_SIZE),this._batchIndex++,setTimeout((function(){e._batchIndex*t.BATCH_SIZE<e._frameKeys.length?e._nextBatch():e._parseComplete()}),0)},t.prototype.destroy=function(){var t=arguments.length>0&&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}();r.default=o},{"../":63,"../utils":123}],113:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}r.__esModule=!0;var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),o=i(t("./BaseTexture")),a=i(t("./VideoBaseTexture")),u=i(t("./TextureUvs")),l=i(t("eventemitter3")),c=t("../math"),d=t("../utils"),f=i(t("../settings")),p=function(t){function e(r,i,n,s,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this));if(a.noFrame=!1,i||(a.noFrame=!0,i=new c.Rectangle(0,0,1,1)),r instanceof e&&(r=r.baseTexture),a.baseTexture=r,a._frame=i,a.trim=s,a.valid=!1,a.requiresUpdate=!1,a._uvs=null,a.orig=n||i,a._rotate=Number(o||0),!0===o)a._rotate=2;else if(a._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return r.hasLoaded?(a.noFrame&&(i=new c.Rectangle(0,0,r.width,r.height),r.on("update",a.onBaseTextureUpdated,a)),a.frame=i):r.once("loaded",a.onBaseTextureLoaded,a),a._updateID=0,a.transform=null,a.textureCacheIds=[],a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.update=function(){this.baseTexture.update()},e.prototype.onBaseTextureLoaded=function(t){this._updateID++,this.noFrame?this.frame=new c.Rectangle(0,0,t.width,t.height):this.frame=this._frame,this.baseTexture.on("update",this.onBaseTextureUpdated,this),this.emit("update",this)},e.prototype.onBaseTextureUpdated=function(t){this._updateID++,this._frame.width=t.width,this._frame.height=t.height,this.emit("update",this)},e.prototype.destroy=function(t){this.baseTexture&&(t&&(d.TextureCache[this.baseTexture.imageUrl]&&e.removeFromCache(this.baseTexture.imageUrl),this.baseTexture.destroy()),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture.off("loaded",this.onBaseTextureLoaded,this),this.baseTexture=null),this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,e.removeFromCache(this),this.textureCacheIds=null},e.prototype.clone=function(){return new e(this.baseTexture,this.frame,this.orig,this.trim,this.rotate)},e.prototype._updateUvs=function(){this._uvs||(this._uvs=new u.default),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.fromImage=function(t,r,i,n){var s=d.TextureCache[t];return s||(s=new e(o.default.fromImage(t,r,i,n)),e.addToCache(s,t)),s},e.fromFrame=function(t){var e=d.TextureCache[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache');return e},e.fromCanvas=function(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas";return new e(o.default.fromCanvas(t,r,i))},e.fromVideo=function(t,r){return"string"==typeof t?e.fromVideoUrl(t,r):new e(a.default.fromVideo(t,r))},e.fromVideoUrl=function(t,r){return new e(a.default.fromUrl(t,r))},e.from=function(t){if("string"==typeof t){var r=d.TextureCache[t];return r||(null!==t.match(/\.(mp4|webm|ogg|h264|avi|mov)$/)?e.fromVideoUrl(t):e.fromImage(t))}return t instanceof HTMLImageElement?new e(o.default.from(t)):t instanceof HTMLCanvasElement?e.fromCanvas(t,f.default.SCALE_MODE,"HTMLCanvasElement"):t instanceof HTMLVideoElement?e.fromVideo(t):t instanceof o.default?new e(t):t},e.fromLoader=function(t,r,i){var n=new o.default(t,void 0,(0,d.getResolutionOfUrl)(r)),s=new e(n);return n.imageUrl=r,i||(i=r),o.default.addToCache(s.baseTexture,i),e.addToCache(s,i),i!==r&&(o.default.addToCache(s.baseTexture,r),e.addToCache(s,r)),s},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),d.TextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=d.TextureCache[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete d.TextureCache[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i<t.textureCacheIds.length;++i)d.TextureCache[t.textureCacheIds[i]]===t&&delete d.TextureCache[t.textureCacheIds[i]];return t.textureCacheIds.length=0,t}return null},s(e,[{key:"frame",get:function(){return this._frame},set:function(t){this._frame=t,this.noFrame=!1;var e=t.x,r=t.y,i=t.width,n=t.height,s=e+i>this.baseTexture.width,o=r+n>this.baseTexture.height;if(s||o){var a=s&&o?"and":"or",h="X: "+e+" + "+i+" = "+(e+i)+" > "+this.baseTexture.width,u="Y: "+r+" + "+n+" = "+(r+n)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+h+" "+a+" "+u)}this.valid=i&&n&&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}(l.default);
1r.default=p,p.EMPTY=new p(new o.default),n(p.EMPTY),n(p.EMPTY.baseTexture),p.WHITE=function(){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 p(new o.default(t))}(),n(p.WHITE),n(p.WHITE.baseTexture)},{"../math":68,"../settings":99,"../utils":123,"./BaseTexture":110,"./TextureUvs":115,"./VideoBaseTexture":116,eventemitter3:4}],114:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),n=function(t){return t&&t.__esModule?t:{default:t}}(t("../math/Matrix")),s=new n.default,o=function(){function t(e,r){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this._texture=e,this.mapCoord=new n.default,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._lastTextureID=-1,this.clampOffset=0,this.clampMargin=void 0===r?.5:r}return t.prototype.multiplyUvs=function(t,e){void 0===e&&(e=t);for(var r=this.mapCoord,i=0;i<t.length;i+=2){var n=t[i],s=t[i+1];e[i]=n*r.a+s*r.c+r.tx,e[i+1]=n*r.b+s*r.d+r.ty}return e},t.prototype.update=function(t){var e=this._texture;if(!e||!e.valid)return!1;if(!t&&this._lastTextureID===e._updateID)return!1;this._lastTextureID=e._updateID;var r=e._uvs;this.mapCoord.set(r.x1-r.x0,r.y1-r.y0,r.x3-r.x0,r.y3-r.y0,r.x0,r.y0);var i=e.orig,n=e.trim;n&&(s.set(i.width/n.width,0,0,i.height/n.height,-n.x/n.width,-n.y/n.height),this.mapCoord.append(s));var o=e.baseTexture,a=this.uClampFrame,h=this.clampMargin/o.resolution,u=this.clampOffset;return a[0]=(e._frame.x+h+u)/o.width,a[1]=(e._frame.y+h+u)/o.height,a[2]=(e._frame.x+e._frame.width-h+u)/o.width,a[3]=(e._frame.y+e._frame.height-h+u)/o.height,this.uClampOffset[0]=u/o.realWidth,this.uClampOffset[1]=u/o.realHeight,!0},i(t,[{key:"texture",get:function(){return this._texture},set:function(t){this._texture=t,this._lastTextureID=-1}}]),t}();r.default=o},{"../math/Matrix":65}],115:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t){return t&&t.__esModule?t:{default:t}}(t("../math/GroupD8")),n=function(){function t(){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(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,r){var n=e.width,s=e.height;if(r){var o=t.width/2/n,a=t.height/2/s,h=t.x/n+o,u=t.y/s+a;r=i.default.add(r,i.default.NW),this.x0=h+o*i.default.uX(r),this.y0=u+a*i.default.uY(r),r=i.default.add(r,2),this.x1=h+o*i.default.uX(r),this.y1=u+a*i.default.uY(r),r=i.default.add(r,2),this.x2=h+o*i.default.uX(r),this.y2=u+a*i.default.uY(r),r=i.default.add(r,2),this.x3=h+o*i.default.uX(r),this.y3=u+a*i.default.uY(r)}else this.x0=t.x/n,this.y0=t.y/s,this.x1=(t.x+t.width)/n,this.y1=t.y/s,this.x2=(t.x+t.width)/n,this.y2=(t.y+t.height)/s,this.x3=t.x/n,this.y3=(t.y+t.height)/s;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}();r.default=n},{"../math/GroupD8":64}],116:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function n(t,e){e||(e="video/"+t.substr(t.lastIndexOf(".")+1));var r=document.createElement("source");return r.src=t,r.type=e,r}r.__esModule=!0;var s=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),o=i(t("./BaseTexture")),a=t("../utils"),u=t("../ticker"),l=t("../const"),c=i(t("../utils/determineCrossOrigin")),d=function(t){function e(r,i){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),!r)throw new Error("No video source element specified.");(r.readyState===r.HAVE_ENOUGH_DATA||r.readyState===r.HAVE_FUTURE_DATA)&&r.width&&r.height&&(r.complete=!0);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this,r,i));return n.width=r.videoWidth,n.height=r.videoHeight,n._autoUpdate=!0,n._isAutoUpdating=!1,n.autoPlay=!0,n.update=n.update.bind(n),n._onCanPlay=n._onCanPlay.bind(n),r.addEventListener("play",n._onPlayStart.bind(n)),r.addEventListener("pause",n._onPlayStop.bind(n)),n.hasLoaded=!1,n.__loaded=!1,n._isSourceReady()?n._onCanPlay():(r.addEventListener("canplay",n._onCanPlay),r.addEventListener("canplaythrough",n._onCanPlay)),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype._isSourcePlaying=function(){var t=this.source;return t.currentTime>0&&!1===t.paused&&!1===t.ended&&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&&(u.shared.add(this.update,this,l.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0)},e.prototype._onPlayStop=function(){this._isAutoUpdating&&(u.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
1("loaded",this)),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.source.play())},e.prototype.destroy=function(){this._isAutoUpdating&&u.shared.remove(this.update,this),this.source&&this.source._pixiId&&(o.default.removeFromCache(this.source._pixiId),delete this.source._pixiId,this.source.pause(),this.source.src="",this.source.load()),t.prototype.destroy.call(this)},e.fromVideo=function(t,r){t._pixiId||(t._pixiId="video_"+(0,a.uid)());var i=a.BaseTextureCache[t._pixiId];return i||(i=new e(t,r),o.default.addToCache(i,t._pixiId)),i},e.fromUrl=function(t,r,i){var s=document.createElement("video");s.setAttribute("webkit-playsinline",""),s.setAttribute("playsinline","");var o=Array.isArray(t)?t[0].src||t[0]:t.src||t;if(void 0===i&&0!==o.indexOf("data:")?s.crossOrigin=(0,c.default)(o):i&&(s.crossOrigin="string"==typeof i?i:"anonymous"),Array.isArray(t))for(var a=0;a<t.length;++a)s.appendChild(n(t[a].src||t[a],t[a].mime));else s.appendChild(n(o,t.mime));return s.load(),e.fromVideo(s,r)},s(e,[{key:"autoUpdate",get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isAutoUpdating?(u.shared.remove(this.update,this),this._isAutoUpdating=!1):this._autoUpdate&&!this._isAutoUpdating&&(u.shared.add(this.update,this,l.UPDATE_PRIORITY.HIGH),this._isAutoUpdating=!0))}}]),e}(o.default);r.default=d,d.fromUrls=d.fromUrl},{"../const":44,"../ticker":119,"../utils":123,"../utils/determineCrossOrigin":122,"./BaseTexture":110}],117:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),s=i(t("../settings")),o=t("../const"),a=i(t("./TickerListener")),h=function(){function t(){var e=this;(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this._head=new a.default(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this.autoStart=!1,this.deltaTime=1,this.elapsedMS=1/s.default.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&null===e._requestId&&e._head.next&&(e._requestId=requestAnimationFrame(e._tick)))}}return t.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._requestId=requestAnimationFrame(this._tick))},t.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},t.prototype.add=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.UPDATE_PRIORITY.NORMAL;return this._addListener(new a.default(t,e,r))},t.prototype.addOnce=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.UPDATE_PRIORITY.NORMAL;return this._addListener(new a.default(t,e,r,!0))},t.prototype._addListener=function(t){var e=this._head.next,r=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}else t.connect(r);return this._startIfPossible(),this},t.prototype.remove=function(t,e){for(var r=this._head.next;r;)r=r.match(t,e)?r.destroy():r.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)>this._maxElapsedMS&&(e=this._maxElapsedMS),this.deltaTime=e*s.default.TARGET_FPMS*this.speed;for(var r=this._head,i=r.next;i;
1)i=i.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.elapsedMS=0;this.lastTime=t},n(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}();r.default=h},{"../const":44,"../settings":99,"./TickerListener":118}],118:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.fn=e,this.context=r,this.priority=i,this.once=n,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}();r.default=i},{}],119:[function(t,e,r){"use strict";r.__esModule=!0,r.Ticker=r.shared=void 0;var i=function(t){return t&&t.__esModule?t:{default:t}}(t("./Ticker")),n=new i.default;n.autoStart=!0,n.destroy=function(){},r.shared=n,r.Ticker=i.default},{"./Ticker":117}],120:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(){return!(navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform))}},{}],121:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){for(var e=6*t,r=new Uint16Array(e),i=0,n=0;i<e;i+=6,n+=4)r[i+0]=n+0,r[i+1]=n+1,r[i+2]=n+2,r[i+3]=n+0,r[i+4]=n+2,r[i+5]=n+3;return r}},{}],122:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location;if(0===t.indexOf("data:"))return"";e=e||window.location,n||(n=document.createElement("a")),n.href=t;var r=!(t=i.default.parse(n.href)).port&&""===e.port||t.port===e.port;return t.hostname===e.hostname&&r&&t.protocol===e.protocol?"":"anonymous"};var i=function(t){return t&&t.__esModule?t:{default:t}}(t("url")),n=void 0},{url:39}],123:[function(t,e,r){"use strict";function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function n(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0,r.premultiplyBlendMode=r.BaseTextureCache=r.TextureCache=r.mixins=r.pluginTarget=r.EventEmitter=r.removeItems=r.isMobile=void 0,r.uid=function(){return++f},r.hex2rgb=function(t,e){return(e=e||[])[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e},r.hex2string=function(t){return t=t.toString(16),"#"+("000000".substr(0,6-t.length)+t)},r.rgb2hex=function(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)},r.getResolutionOfUrl=function(t,e){var r=o.default.RETINA_PREFIX.exec(t);return r?parseFloat(r[1]):void 0!==e?e:1},r.decomposeDataUri=function(t){var e=s.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]}},r.getUrlFileExtension=function(t){var e=s.URL_FILE_EXTENSION.exec(t);if(e)return e[1].toLowerCase()},r.getSvgSize=function(t){var e=s.SVG_SIZE.exec(t),r={};return e&&(r[e[1]]=Math.round(parseFloat(e[3])),r[e[5]]=Math.round(parseFloat(e[7]))),r},r.skipHello=function(){p=!0},r.sayHello=function(t){if(!p){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var e=["\n %c %c %c PixiJS "+s.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("PixiJS "+s.VERSION+" - "+t+" - http://www.pixijs.com/");p=!0}
1},r.isWebGLSupported=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:!0};try{if(!window.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),i=!(!r||!r.getContextAttributes().stencil);if(r){var n=r.getExtension("WEBGL_lose_context");n&&n.loseContext()}return r=null,i}catch(t){return!1}},r.sign=function(t){return 0===t?0:t<0?-1:1},r.destroyTextureCache=function(){var t=void 0;for(t in g)g[t].destroy();for(t in y)y[t].destroy()},r.clearTextureCache=function(){var t=void 0;for(t in g)delete g[t];for(t in y)delete y[t]},r.correctBlendMode=function(t,e){return v[e?1:0][t]},r.premultiplyTint=function(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var r=t>>16&255,i=t>>8&255,n=255&t;return(255*e<<24)+((r=r*e+.5|0)<<16)+((i=i*e+.5|0)<<8)+(n=n*e+.5|0)},r.premultiplyRgba=function(t,e,r,i){return r=r||new Float32Array(4),i||void 0===i?(r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e):(r[0]=t[0],r[1]=t[1],r[2]=t[2]),r[3]=e,r},r.premultiplyTintToRgba=function(t,e,r,i){return(r=r||new Float32Array(4))[0]=(t>>16&255)/255,r[1]=(t>>8&255)/255,r[2]=(255&t)/255,(i||void 0===i)&&(r[0]*=e,r[1]*=e,r[2]*=e),r[3]=e,r};var s=t("../const"),o=n(t("../settings")),a=n(t("eventemitter3")),h=n(t("./pluginTarget")),u=i(t("./mixin")),l=i(t("ismobilejs")),c=n(t("remove-array-items")),d=n(t("./mapPremultipliedBlendModes")),f=0,p=!1;r.isMobile=l,r.removeItems=c.default,r.EventEmitter=a.default,r.pluginTarget=h.default,r.mixins=u;var g=r.TextureCache=Object.create(null),y=r.BaseTextureCache=Object.create(null),v=r.premultiplyBlendMode=(0,d.default)()},{"../const":44,"../settings":99,"./mapPremultipliedBlendModes":124,"./mixin":126,"./pluginTarget":127,eventemitter3:4,ismobilejs:5,"remove-array-items":32}],124:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(){for(var t=[],e=[],r=0;r<32;r++)t[r]=r,e[r]=r;t[i.BLEND_MODES.NORMAL_NPM]=i.BLEND_MODES.NORMAL,t[i.BLEND_MODES.ADD_NPM]=i.BLEND_MODES.ADD,t[i.BLEND_MODES.SCREEN_NPM]=i.BLEND_MODES.SCREEN,e[i.BLEND_MODES.NORMAL]=i.BLEND_MODES.NORMAL_NPM,e[i.BLEND_MODES.ADD]=i.BLEND_MODES.ADD_NPM,e[i.BLEND_MODES.SCREEN]=i.BLEND_MODES.SCREEN_NPM;var n=[];return n.push(e),n.push(t),n};var i=t("../const")},{"../const":44}],125:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){return i.default.tablet||i.default.phone?4:t};var i=function(t){return t&&t.__esModule?t:{default:t}}(t("ismobilejs"))},{ismobilejs:5}],126:[function(t,e,r){"use strict";function i(t,e){if(t&&e)for(var r=Object.keys(e),i=0;i<r.length;++i){var n=r[i];Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}}r.__esModule=!0,r.mixin=i,r.delayMixin=function(t,e){n.push(t,e)},r.performMixins=function(){for(var t=0;t<n.length;t+=2)i(n[t],n[t+1]);n.length=0};var n=[]},{}],127:[function(t,e,r){"use strict";r.__esModule=!0,r.default={mixin:function(t){!function(t){t.__plugins={},t.registerPlugin=function(e,r){t.__plugins[e]=r},t.prototype.initPlugins=function(){for(var e in this.plugins=this.plugins||{},t.__plugins)this.plugins[e]=new t.__plugins[e](this)},t.prototype.destroyPlugins=function(){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;this.plugins=null}}(t)}}},{}],128:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(t){var e=t.width,r=t.height,i=t.getContext("2d"),n=i.getImageData(0,0,e,r).data,s=n.length,o={top:null,left:null,right:null,bottom:null},a=void 0,h=void 0,u=void 0;for(a=0;a<s;a+=4)0!==n[a+3]&&(h=a/4%e,u=~~(a/4/e),null===o.top&&(o.top=u),null===o.left?o.left=h:h<o.left&&(o.left=h),null===o.right?o.right=h+1:o.right<h&&(o.right=h+1),null===o.bottom?o.bottom=u:o.bottom<u&&(o.bottom=u));return e=o.right-o.left,{height:r=o.bottom-o.top+1,width:e,data:i.getImageData(o.left,o.top,e,r)}}},{}],129:[function(t,e,r){"use strict";function i(t,e){t.bitmapFont=a.BitmapText.registerFont(t.data,e)}r.__esModule=!0,r.parse=i,r.default=function(){return function(t,e){if(t.data&&t.type===o.Resource.TYPE.XML)if(0!==t.data.getElementsByTagName("page").length&&0!==t.data.getElementsByTagName("info").length&&null!==t.data.getElementsByTagName("info")[0].getAttribute("face")){var r=t.isDataUrl?"":n.dirname(t.url);t.isDataUrl&&("."===r&&(r=""),this.baseUrl&&r&&"/"===this.baseUrl.charAt(this.baseUrl.length-1)&&(r+="/")),(r=r.replace(this.baseUrl,""))&&"/"!==r.charAt(r.length-1)&&(r+="/");var a=r+t.data.getElementsByTagName("page")[0].getAttribute("file");if(s.utils.TextureCache[a])i(t,s.utils.TextureCache[a]),e();else{var h={crossOrigin:t.crossOrigin,loadType:o.Resource.LOAD_TYPE.IMAGE,metadata:t.metadata.imageMetadata,parentResource:t};this.add(t.name+"_image",a,h,(function(r){i(t,r.texture),e()}))}}else e();else e()}};var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("path")),s=t("../core"),o=t("resource-loader"),a=t("../extras")},{"../core":63,"../extras":2,path:9,"resource-loader":37}],130:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}
1r.__esModule=!0,r.shared=r.Resource=r.textureParser=r.getResourcePath=r.spritesheetParser=r.parseBitmapFontData=r.bitmapFontParser=r.Loader=void 0;var n=t("./bitmapFontParser");Object.defineProperty(r,"bitmapFontParser",{enumerable:!0,get:function(){return i(n).default}}),Object.defineProperty(r,"parseBitmapFontData",{enumerable:!0,get:function(){return n.parse}});var s=t("./spritesheetParser");Object.defineProperty(r,"spritesheetParser",{enumerable:!0,get:function(){return i(s).default}}),Object.defineProperty(r,"getResourcePath",{enumerable:!0,get:function(){return s.getResourcePath}});var o=t("./textureParser");Object.defineProperty(r,"textureParser",{enumerable:!0,get:function(){return i(o).default}});var a=t("resource-loader");Object.defineProperty(r,"Resource",{enumerable:!0,get:function(){return a.Resource}});var h=i(t("../core/Application")),u=i(t("./loader"));r.Loader=u.default;var l=new u.default;l.destroy=function(){},r.shared=l;var c=h.default.prototype;c._loader=null,Object.defineProperty(c,"loader",{get:function(){if(!this._loader){var t=this._options.sharedLoader;this._loader=t?l:new u.default}return this._loader}}),c._parentDestroy=c.destroy,c.destroy=function(t){this._loader&&(this._loader.destroy(),this._loader=null),this._parentDestroy(t)}},{"../core/Application":41,"./bitmapFontParser":129,"./loader":131,"./spritesheetParser":132,"./textureParser":133,"resource-loader":37}],131:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=i(t("resource-loader")),s=t("resource-loader/lib/middlewares/parsing/blob"),o=i(t("eventemitter3")),a=i(t("./textureParser")),u=i(t("./spritesheetParser")),l=i(t("./bitmapFontParser")),c=function(t){function e(r,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this,r,i));o.default.call(n);for(var s=0;s<e._pixiMiddleware.length;++s)n.use(e._pixiMiddleware[s]());return n.onStart.add((function(t){return n.emit("start",t)})),n.onProgress.add((function(t,e){return n.emit("progress",t,e)})),n.onError.add((function(t,e,r){return n.emit("error",t,e,r)})),n.onLoad.add((function(t,e){return n.emit("load",t,e)})),n.onComplete.add((function(t,e){return n.emit("complete",t,e)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.addPixiMiddleware=function(t){e._pixiMiddleware.push(t)},e.prototype.destroy=function(){this.removeAllListeners(),this.reset()},e}(n.default);for(var d in r.default=c,o.default.prototype)c.prototype[d]=o.default.prototype[d];c._pixiMiddleware=[s.blobMiddlewareFactory,a.default,u.default,l.default];var f=n.default.Resource;f.setExtensionXhrType("fnt",f.XHR_RESPONSE_TYPE.DOCUMENT)},{"./bitmapFontParser":129,"./spritesheetParser":132,"./textureParser":133,eventemitter3:4,"resource-loader":37,"resource-loader/lib/middlewares/parsing/blob":38}],132:[function(t,e,r){"use strict";function i(t,e){return t.isDataUrl?t.data.meta.image:s.default.resolve(t.url.replace(e,""),t.data.meta.image)}r.__esModule=!0,r.default=function(){return function(t,e){var r=t.name+"_image";if(t.data&&t.type===n.Resource.TYPE.JSON&&t.data.frames&&!this.resources[r]){var s={crossOrigin:t.crossOrigin,metadata:t.metadata.imageMetadata,parentResource:t},a=i(t,this.baseUrl);this.add(r,a,s,(function(r){if(r.error)e(r.error);else{var i=new o.Spritesheet(r.texture.baseTexture,t.data,t.url);i.parse((function(){t.spritesheet=i,t.textures=i.textures,e()}))}}))}else e()}},r.getResourcePath=i;var n=t("resource-loader"),s=function(t){return t&&t.__esModule?t:{default:t}}(t("url")),o=t("../core")},{"../core":63,"resource-loader":37,url:39}],133:[function(t,e,r){"use strict";r.__esModule=!0,r.default=function(){return function(t,e){t.data&&t.type===i.Resource.TYPE.IMAGE&&(t.texture=n.default.fromLoader(t.data,t.url,t.name)),e()}};var i=t("resource-loader"),n=function(t){return t&&t.__esModule?t:{default:t}}(t("../core/textures/Texture"))},{"../core/textures/Texture":113,"resource-loader":37}],134:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(){function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,r,i){return r&&t(e.prototype,r),i&&t(e,i),e}}(),n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../core")),s=t("../core/utils"),o=function(t){function e(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1500,i=arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:16384,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var a=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this));return s>16384&&(s=16384),s>r&&(s=r),a._properties=[!1,!0,!1,!1,!1],a._maxSize=r,a._batchSize=s,a._glBuffers={},a._bufferToUpdate=0,a.interactiveChildren=!1,a.blendMode=n.BLEND_MODES.NORMAL,a.autoResize=o,a.roundPixels=!0,a.baseTexture=null,a.setProperties(i),a._tint=0,a.tintRgb=new Float32Array(4),a.tint=16777215,a}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.setProperties=function(t){t&&(this._properties[0]="vertices"in t||"scale"in t?!!t.vertices||!!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]="tint"in t||"alpha"in t?!!t.tint||!!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);e<this._bufferToUpdate&&(this._bufferToUpdate=e)},e.prototype.renderCanvas=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable){var e=t.context,r=this.worldTransform,i=!0,n=0,s=0,o=0,a=0;t.setBlendMode(this.blendMode),e.globalAlpha=this.worldAlpha,this.displayObjectUpdateTransform();for(var h=0;h<this.children.length;++h){var u=this.children[h];if(u.visible){var l=u._texture.frame;if(e.globalAlpha=this.worldAlpha*u.alpha,u.rotation%(2*Math.PI)==0)i&&(e.setTransform(r.a,r.b,r.c,r.d,r.tx*t.resolution,r.ty*t.resolution),i=!1),n=u.anchor.x*(-l.width*u.scale.x)+u.position.x+.5,s=u.anchor.y*(-l.height*u.scale.y)+u.position.y+.5,o=l.width*u.scale.x,a=l.height*u.scale.y;else{i||(i=!0),u.displayObjectUpdateTransform();var c=u.worldTransform;t.roundPixels?e.setTransform(c.a,c.b,c.c,c.d,c.tx*t.resolution|0,c.ty*t.resolution|0):e.setTransform(c.a,c.b,c.c,c.d,c.tx*t.resolution,c.ty*t.resolution),n=u.anchor.x*-l.width+.5,s=u.anchor.y*-l.height+.5,o=l.width,a=l.height}var d=u._texture.baseTexture.resolution;e.drawImage(u._texture.baseTexture.source,l.x*d,l.y*d,l.width*d,l.height*d,n*t.resolution,s*t.resolution,o*t.resolution,a*t.resolution)}}}},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._buffers)for(var r=0;r<this._buffers.length;++r)this._buffers[r].destroy();this._properties=null,this._buffers=null},i(e,[{key:"tint",get:function(){return this._tint},set:function(t){this._tint=t,(0,s.hex2rgb)(t,this.tintRgb)}}]),e}(n.Container);r.default=o},{"../core":63,"../core/utils":123}],135:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}
1r.__esModule=!0;var n=t("./ParticleContainer");Object.defineProperty(r,"ParticleContainer",{enumerable:!0,get:function(){return i(n).default}});var s=t("./webgl/ParticleRenderer");Object.defineProperty(r,"ParticleRenderer",{enumerable:!0,get:function(){return i(s).default}})},{"./ParticleContainer":134,"./webgl/ParticleRenderer":137}],136:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=i(t("pixi-gl-core")),s=i(t("../../core/utils/createIndicesForQuads")),o=function(){function t(e,r,i,n){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),this.gl=e,this.size=n,this.dynamicProperties=[],this.staticProperties=[];for(var s=0;s<r.length;++s){var o=r[s];o={attribute:o.attribute,size:o.size,uploadFunction:o.uploadFunction,unsignedByte:o.unsignedByte,offset:o.offset},i[s]?this.dynamicProperties.push(o):this.staticProperties.push(o)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.initBuffers()}return t.prototype.initBuffers=function(){var t=this.gl,e=0;this.indices=(0,s.default)(this.size),this.indexBuffer=n.default.GLBuffer.createIndexBuffer(t,this.indices,t.STATIC_DRAW),this.dynamicStride=0;for(var r=0;r<this.dynamicProperties.length;++r){var i=this.dynamicProperties[r];i.offset=e,e+=i.size,this.dynamicStride+=i.size}var o=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(o),this.dynamicDataUint32=new Uint32Array(o),this.dynamicBuffer=n.default.GLBuffer.createVertexBuffer(t,o,t.STREAM_DRAW);var a=0;this.staticStride=0;for(var h=0;h<this.staticProperties.length;++h){var u=this.staticProperties[h];u.offset=a,a+=u.size,this.staticStride+=u.size}var l=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(l),this.staticDataUint32=new Uint32Array(l),this.staticBuffer=n.default.GLBuffer.createVertexBuffer(t,l,t.STATIC_DRAW),this.vao=new n.default.VertexArrayObject(t).addIndex(this.indexBuffer);for(var c=0;c<this.dynamicProperties.length;++c){var d=this.dynamicProperties[c];d.unsignedByte?this.vao.addAttribute(this.dynamicBuffer,d.attribute,t.UNSIGNED_BYTE,!0,4*this.dynamicStride,4*d.offset):this.vao.addAttribute(this.dynamicBuffer,d.attribute,t.FLOAT,!1,4*this.dynamicStride,4*d.offset)}for(var f=0;f<this.staticProperties.length;++f){var p=this.staticProperties[f];p.unsignedByte?this.vao.addAttribute(this.staticBuffer,p.attribute,t.UNSIGNED_BYTE,!0,4*this.staticStride,4*p.offset):this.vao.addAttribute(this.staticBuffer,p.attribute,t.FLOAT,!1,4*this.staticStride,4*p.offset)}},t.prototype.uploadDynamic=function(t,e,r){for(var i=0;i<this.dynamicProperties.length;i++){var n=this.dynamicProperties[i];n.uploadFunction(t,e,r,n.unsignedByte?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,n.offset)}this.dynamicBuffer.upload()},t.prototype.uploadStatic=function(t,e,r){for(var i=0;i<this.staticProperties.length;i++){var n=this.staticProperties[i];n.uploadFunction(t,e,r,n.unsignedByte?this.staticDataUint32:this.staticData,this.staticStride,n.offset)}this.staticBuffer.upload()},t.prototype.destroy=function(){this.dynamicProperties=null,this.dynamicBuffer.destroy(),this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer.destroy(),this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null},t}();r.default=o},{"../../core/utils/createIndicesForQuads":121,"pixi-gl-core":16}],137:[function(t,e,r){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}r.__esModule=!0;var n=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(t("../../core")),s=i(t("./ParticleShader")),o=i(t("./ParticleBuffer")),a=t("../../core/utils"),u=function(t){function e(r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var i=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this,r));return i.shader=null,i.indexBuffer=null,i.properties=null,i.tempMatrix=new n.Matrix,i.CONTEXT_UID=0,i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e.prototype.onContextChange=function(){var t=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.shader=new s.default(t),this.properties=[{attribute:this.shader.attributes.aVertexPosition,size:2,uploadFunction:this.uploadVertices,offset:0},{attribute:this.shader.attributes.aPositionCoord,size:2,uploadFunction:this.uploadPosition,offset:0},{attribute:this.shader.attributes.aRotation,size:1,uploadFunction:this.uploadRotation,offset:0},{attribute:this.shader.attributes.aTextureCoord,size:2,uploadFunction:this.uploadUvs,offset:0},{attribute:this.shader.attributes.aColor,size:1,unsignedByte:!0,uploadFunction:this.uploadTint,offset:0}]},e.prototype.start=function(){this.renderer.bindShader(this.shader)},e.prototype.render=function(t){var e=t.children,r=t._maxSize,i=t._batchSize,s=this.renderer,o=e.length;if(0!==o){o>r&&(o=r);var a=t._glBuffers[s.CONTEXT_UID];a||(a=t._glBuffers[s.CONTEXT_UID]=this.generateBuffers(t));var h=e[0]._texture.baseTexture;this.renderer.setBlendMode(n.utils.correctBlendMode(t.blendMode,h.premultipliedAlpha));var u=s.gl,l=t.worldTransform.copy(this.tempMatrix);
1l.prepend(s._activeRenderTarget.projectionMatrix),this.shader.uniforms.projectionMatrix=l.toArray(!0),this.shader.uniforms.uColor=n.utils.premultiplyRgba(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,h.premultipliedAlpha),this.shader.uniforms.uSampler=s.bindTexture(h);for(var c=0,d=0;c<o;c+=i,d+=1){var f=o-c;if(f>i&&(f=i),d>=a.length){if(!t.autoResize)break;a.push(this._generateOneMoreBuffer(t))}var p=a[d];p.uploadDynamic(e,c,f),t._bufferToUpdate===d&&(p.uploadStatic(e,c,f),t._bufferToUpdate=d+1),s.bindVao(p.vao),p.vao.draw(u.TRIANGLES,6*f)}}},e.prototype.generateBuffers=function(t){for(var e=this.renderer.gl,r=[],i=t._maxSize,n=t._batchSize,s=t._properties,a=0;a<i;a+=n)r.push(new o.default(e,this.properties,s,n));return r},e.prototype._generateOneMoreBuffer=function(t){var e=this.renderer.gl,r=t._batchSize,i=t._properties;return new o.default(e,this.properties,i,r)},e.prototype.uploadVertices=function(t,e,r,i,n,s){for(var o=0,a=0,h=0,u=0,l=0;l<r;++l){var c=t[e+l],d=c._texture,f=c.scale.x,p=c.scale.y,g=d.trim,y=d.orig;g?(o=(a=g.x-c.anchor.x*y.width)+g.width,h=(u=g.y-c.anchor.y*y.height)+g.height):(o=y.width*(1-c.anchor.x),a=y.width*-c.anchor.x,h=y.height*(1-c.anchor.y),u=y.height*-c.anchor.y),i[s]=a*f,i[s+1]=u*p,i[s+n]=o*f,i[s+n+1]=u*p,i[s+2*n]=o*f,i[s+2*n+1]=h*p,i[s+3*n]=a*f,i[s+3*n+1]=h*p,s+=4*n}},e.prototype.uploadPosition=function(t,e,r,i,n,s){for(var o=0;o<r;o++){var a=t[e+o].position;i[s]=a.x,i[s+1]=a.y,i[s+n]=a.x,i[s+n+1]=a.y,i[s+2*n]=a.x,i[s+2*n+1]=a.y,i[s+3*n]=a.x,i[s+3*n+1]=a.y,s+=4*n}},e.prototype.uploadRotation=function(t,e,r,i,n,s){for(var o=0;o<r;o++){var a=t[e+o].rotation;i[s]=a,i[s+n]=a,i[s+2*n]=a,i[s+3*n]=a,s+=4*n}},e.prototype.uploadUvs=function(t,e,r,i,n,s){for(var o=0;o<r;++o){var a=t[e+o]._texture._uvs;a?(i[s]=a.x0,i[s+1]=a.y0,i[s+n]=a.x1,i[s+n+1]=a.y1,i[s+2*n]=a.x2,i[s+2*n+1]=a.y2,i[s+3*n]=a.x3,i[s+3*n+1]=a.y3,s+=4*n):(i[s]=0,i[s+1]=0,i[s+n]=0,i[s+n+1]=0,i[s+2*n]=0,i[s+2*n+1]=0,i[s+3*n]=0,i[s+3*n+1]=0,s+=4*n)}},e.prototype.uploadTint=function(t,e,r,i,n,s){for(var o=0;o<r;++o){var h=t[e+o],u=h._texture.baseTexture.premultipliedAlpha,l=h.alpha,c=l<1&&u?(0,a.premultiplyTint)(h._tintRGB,l):h._tintRGB+(255*l<<24);i[s]=c,i[s+n]=c,i[s+2*n]=c,i[s+3*n]=c,s+=4*n}},e.prototype.destroy=function(){this.renderer.gl&&this.renderer.gl.deleteBuffer(this.indexBuffer),t.prototype.destroy.call(this),this.shader.destroy(),this.indices=null,this.tempMatrix=null},e}(n.ObjectRenderer);r.default=u,n.WebGLRenderer.registerPlugin("particle",u)},{"../../core":63,"../../core/utils":123,"./ParticleBuffer":136,"./ParticleShader":138}],138:[function(t,e,r){"use strict";r.__esModule=!0;var i=function(t){function e(r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=h(e)&&"function"!=typeof e?t:e}(this,t.call(this,r,["attribute vec2 aVertexPosition;","attribute vec2 aTextureCoord;","attribute vec4 aColor;","attribute vec2 aPositionCoord;","attribute float aRotation;","uniform mat3 projectionMatrix;","uniform vec4 uColor;","varying vec2 vTextureCoord;","varying vec4 vColor;","void main(void){"," float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);"," float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);"," vec2 v = vec2(x, y);"," v = v + aPositionCoord;"," gl_Position = vec4((projectionMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);"," vTextureCoord = aTextureCoord;"," vColor = aColor * uColor;","}"].join("\n"),["varying vec2 vTextureCoord;","varying vec4 vColor;","uniform sampler2D uSampler;","void main(void){"," vec4 color = texture2D(uSampler, vTextureCoord) * vColor;"," gl_FragColor = color;","}"].join("\n")))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+h(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)}(e,t),e}(function(t){return t&&t.__esModule?t:{default:t}}(t("../../core/Shader")).default);r.default=i},{"../../core/Shader":42}],139:[function(t,e,r){"use strict";Math.sign||(Math.sign=function(t){return 0===(t=Number(t))||isNaN(t)?t:t>0?1:-1})},{}],140:[function(t,e,r){"use strict";var i=function(t){return t&&t.__esModule?t:{default:t}}(t("object-assign"));Object.assign||(Object.assign=i.default)},{"object-assign":7}],141:[function(t,e,r){"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":139,"./Object.assign":140,"./requestAnimationFrame":142}],142:[function(t,e,r){(function(t){"use strict";if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!t.performance||!t.performance.now){var e=Date.now();t.performance||(t.performance={}),t.performance.now=function(){return Date.now()-e}}
1for(var r=Date.now(),i=["ms","moz","webkit","o"],n=0;n<i.length&&!t.requestAnimationFrame;++n){var s=i[n];t.requestAnimationFrame=t[s+"RequestAnimationFrame"],t.cancelAnimationFrame=t[s+"CancelAnimationFrame"]||t[s+"CancelRequestAnimationFrame"]}t.requestAnimationFrame||(t.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),i=16+r-e;return i<0&&(i=0),r=e,setTimeout((function(){r=Date.now(),t(performance.now())}),i)}),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(t){return clearTimeout(t)})}).call(this,void 0!==i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],143:[function(t,e,r){(function(e){"use strict";function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}r.__esModule=!0,r.loader=r.prepare=r.particles=r.mesh=r.loaders=r.interaction=r.filters=r.extras=r.extract=r.accessibility=void 0;var n=t("./polyfill");Object.keys(n).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(r,t,{enumerable:!0,get:function(){return n[t]}})}));var s=t("./core");Object.keys(s).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(r,t,{enumerable:!0,get:function(){return s[t]}})}));var o=function(t){return t&&t.__esModule?t:{default:t}}(t("./deprecation")),a=i(t("./accessibility")),h=i(t("./extract")),u=i(t("./extras")),l=i(t("./filters")),c=i(t("./interaction")),d=i(t("./loaders")),f=i(t("./mesh")),p=i(t("./particles")),g=i(t("./prepare"));s.utils.mixins.performMixins();var y=d.shared||null;r.accessibility=a,r.extract=h,r.extras=u,r.filters=l,r.interaction=c,r.loaders=d,r.mesh=f,r.particles=p,r.prepare=g,r.loader=y,"function"==typeof o.default&&(0,o.default)(r),e.PIXI=r}).call(this,void 0!==i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./accessibility":2,"./core":63,"./deprecation":2,"./extract":2,"./extras":2,"./filters":2,"./interaction":2,"./loaders":130,"./mesh":2,"./particles":135,"./polyfill":141,"./prepare":2}]},{},[143])(143)}))}).call(this,r("yLpj"))},rn8W:function(t,e,r){"use strict";r.d(e,"a",(function(){return h})),r.d(e,"b",(function(){return u}));var i=r("lwsE"),n=r.n(i),s=r("W8MJ"),o=r.n(s);function a(t,e){this.x=0,this.y=0,this.xVelocity=0,this.yVelocity=0,this.aVelocity=0,this.tint=16777215,this.angle=0,this.opacity=1,this.scale=1,this.maxLifeTime=1e3,this.startLife=Date.now(),this.fadeInTime=300,this.sleep=!1,this.draw=function(){this.sprite&&!this.sleep&&(this.sprite.scale.set(this.scale),this.sprite.alpha=e.hide?0:this.opacity,this.sprite.x=this.x,this.sprite.y=this.y,this.sprite.tint=this.tint,this.sprite.rotation=this.angle/180*Math.PI)},this.dispose=function(){this.sprite&&t.removeChild(this.sprite)},this.update=function(t,e){var r=Date.now()-this.startLife;if(this.sleep=r<0,!this.sleep){var i=t?6*r/100:e;this.x+=this.xVelocity*i,this.y+=this.yVelocity*i,this.angle+=this.aVelocity*i;var n=r/this.maxLifeTime;this.scale=this.lerp(this.scaleFrom,this.scaleTo,n);var s=r<this.fadeInTime?1-r/this.fadeInTime:n;this.opacity=Math.max(1-s,0),r>this.maxLifeTime&&this.reset()}},this.reset=function(t){if((!e.burst||t)&&(this.setPosition(this.generateRandom(e.xMin,e.xMax),this.generateRandom(e.yMin,e.yMax),this.generateRandom(e.aMin,e.aMax),this.generateRandom(e.scaleMin,e.scaleMax),this.generateRandom(e.scaleToMin,e.scaleToMax)),this.setVelocity(this.generateRandom(e.xVelocityMin,e.xVelocityMax),this.generateRandom(e.yVelocityMin,e.yVelocityMax),this.generateRandom(e.aVelocityMin,e.aVelocityMax)),this.setTtl(this.generateRandom(e.ttlMin,e.ttlMax),t&&!e.burst?this.generateRandom(0,e.ttlMax):0,this.generateRandom(e.delayMin,e.delayMax)),e.tintColours&&e.tintColours.length)){var r=Math.floor(this.generateRandom(0,e.tintColours.length-1));this.tint=e.tintColours[r],("string"==typeof this.tint||this.tint instanceof String)&&(this.tint=parseInt(this.tint.replace(/^#/,""),16))}},this.setPosition=function(t,e,r,i,n){this.x=t,this.y=e,this.angle=r,this.scale=this.scaleFrom=i,this.scaleTo=n},this.setVelocity=function(t,e,r){this.xVelocity=t,this.yVelocity=e,this.aVelocity=r},this.setTtl=function(t,e,r){this.startLife=Date.now()-e+r,this.maxLifeTime=t,this.sleep=r>0,e&&this.update(!0)},this.setImage=function(e){var r=new PIXI.Sprite(e);r.alpha=0,r.anchor.set(.5),t.addChild(r),this.sprite=r},this.generateRandom=function(t,e){return Math.random()*(e-t)+t},this.lerp=function(t,e,r){return t+(e-t)*(r=(r=r<0?0:r)>1?1:r)}}function h(t,e){var r=this;this.particles=[],this.images=[],this.imageWeights=[],this.emitter=t,this.emitter.bindEffect(this),this.init=function(t){this.container=t;for(var e=0;e<this.emitter.particleCount;++e){var r=new a(t,this.emitter);r.setImage(this.images[i[e%i.length]]),r.reset(!0),this.particles.push(r)}}
1,this.reset=function(){this.particles.forEach((function(t){t.dispose()})),this.particles=[],this.container&&this.init(this.container)},this.draw=function(){this.particles.forEach((function(t){t.draw()}))},this.update=function(t){this.particles.forEach((function(e){e.update(!1,t)}))},this.onImageLoad=function(){var t=this;if(every(this.images,(function(t){return t.complete&&0!==t.naturalHeight}))){this.imageWeights.reduce((function(t,e){return t+e}),0);for(var e=[],r=0;r<this.imageWeights.length;){for(var i=0;i<this.imageWeights[r];i++)e[e.length]=r;r++}e=this.shuffle(e),this.particles.forEach((function(r,i){r.setImage(t.images[e[i%e.length]])}))}},this.loadImage=function(t,e){var r=new Image;r.onload=this.onImageLoad.bind(this),r.src=t,this.images.push(r),this.imageWeights.push(e)},this.shuffle=function(t){for(var e,r,i=t.length;0!==i;)r=Math.floor(Math.random()*i),e=t[i-=1],t[i]=t[r],t[r]=e;return t},e.forEach((function(t){r.images.push(t.image),r.imageWeights.push(t.weight)}));this.imageWeights.reduce((function(t,e){return t+e}),0);for(var i=[],n=0;n<this.imageWeights.length;){for(var s=0;s<this.imageWeights[n];s++)i[i.length]=n;n++}i=this.shuffle(i)}var u=function(){function t(e,r,i,s,o,a,h,u,l,c,d,f,p,g,y,v,m,_,x,b,T,w,E,S){n()(this,t),this.enabled=e,this.particleCount=r,this.xMin=i,this.yMin=o,this.xMax=s,this.yMax=a,this.aMin=h,this.aMax=u,this.xVelocityMin=l,this.xVelocityMax=c,this.yVelocityMin=d,this.yVelocityMax=f,this.aVelocityMin=p,this.aVelocityMax=g,this.ttlMin=y,this.ttlMax=v,this.scaleMin=m,this.scaleMax=_,this.scaleToMin=x||m,this.scaleToMax=b||_,this.delayMin=0|w,this.delayMax=0|E,this.burst=!1|T,this.tintColours=S,this.hide=!1}return o()(t,[{key:"update",value:function(t,e,r,i,n,s){this.xMin=e,this.yMin=i,this.xMax=r,this.yMax=n,(s||this.particleCount!=t)&&(this.particleCount=t,this.resetEffect())}},{key:"bindEffect",value:function(t){this.effect=t}},{key:"resetEffect",value:function(){this.effect&&this.effect.reset()}}]),t}()}},[["kvZ7","runtime",7]]]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.